Re: [asterisk-users] Dial to FastAGI application appears as 1-second CDR - how do I fix?

2018-05-29 Thread Alex Villací­s Lasso

El 29/05/18 a las 05:24, Tony Mountifield escribió:

In article <3a005ff6-19a4-215b-4751-bee616ec7...@palosanto.com>,
Alex Villací­s Lasso  wrote:

In my application, I am using AMI to run an Originate command between a channel 
and a dialplan application (NOT a
context). In my case, the application I want to invoke is FastAGI. The 
Originate AMI command works correctly, but
Asterisk generates a very
short (0-1s) duration for the CDR that results from this call, regardless of 
the time spent running the FastAGI
application. I want the CDR duration to reflect the time spent in the entirety 
of the call, as is normal for ordinary
calls. What should I do? I
am running Asterisk 11.25.3 .

Are you using Local channels as the target channel?

Yes, this is the standard way my application works.


I found what I believe is an issue with CDR handling when masquerading Local 
channels, when I ported
one of my old applications from Asterisk 1.2.32 to 11.25.3. It was recording an 
incorrect CDR
for the setup part of the call, and none for the answered part. In 1.2.32 I was 
getting two CDRs,
one for the setup part and another for the answered part.

I eventually tracked it down to ast_do_masquerade() in channel.c, and made the 
following change,
which corrected the CDR behaviour back to the same as what Asterisk 1.2 had 
done:

$ diff -u --show-c-function channel.c.orig channel.c
--- channel.c.orig  2017-09-19 17:03:38.0 +0100
+++ channel.c   2018-05-29 11:13:41.0 +0100
@@ -6864,7 +6864,9 @@ int ast_do_masquerade(struct ast_channel
 } exchange;
 struct ast_channel *clonechan, *chans[2];
 struct ast_channel *bridged;
+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
 struct ast_cdr *cdr;
+#endif
 struct ast_datastore *xfer_ds;
 struct xfer_masquerade_ds *xfer_colp;
 struct ast_format rformat;
@@ -7035,10 +7037,12 @@ int ast_do_masquerade(struct ast_channel
 ast_channel_tech_pvt_set(original, ast_channel_tech_pvt(clonechan));
 ast_channel_tech_pvt_set(clonechan, t_pvt);

+#ifdef I_THINK_THIS_IS_WRONG /* Tony Mountifield, 2018-03-29. Removing this 
code fixes lost CDRs with masquerade */
 /* Swap the cdrs */
 cdr = ast_channel_cdr(original);
 ast_channel_cdr_set(original, ast_channel_cdr(clonechan));
 ast_channel_cdr_set(clonechan, cdr);
+#endif

 /* Swap the alertpipes */
 ast_channel_internal_alertpipe_swap(original, clonechan);
$

I didn't research what version this change appeared in, nor whether it has been 
subsequently fixed in
later versions of Asterisk. There was no point reporting it in Asterisk 11, as 
that was out of LTS
by the time I discovered it.

So you could try making the above changes to channel.c and see if it improves 
the CDRs for you.

Cheers
Tony


I will try doing this change and recompiling to see what happens.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Dial to FastAGI application appears as 1-second CDR - how do I fix?

2018-05-28 Thread Alex Villací­s Lasso
In my application, I am using AMI to run an Originate command between a channel and a dialplan application (NOT a context). In my case, the application I want to invoke is FastAGI. The Originate AMI command works correctly, but Asterisk generates a very 
short (0-1s) duration for the CDR that results from this call, regardless of the time spent running the FastAGI application. I want the CDR duration to reflect the time spent in the entirety of the call, as is normal for ordinary calls. What should I do? I 
am running Asterisk 11.25.3 .



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] AMI ManagerAction UpdateConfig on file with #include may corrupt the file

2017-03-20 Thread Alex Villací­s Lasso

I have seen the following scenario that may lead to a corrupted and possibly 
invalid configuration file after using UpdateConfig through AMI, at least with 
Asterisk 11.25:

There is a configuration file a.conf that contains several sections and also contains a #include "b.conf", which defines a few sections of its own. Both files a.conf and b.conf start out syntactically valid and with no duplicate categories between the two 
files.


An AMI client requests a category listing (ListCategories) from a.conf . The 
listing of categories is returned, including the ones defined in b.conf. There 
is no indication in the answer about the true source of the categories.

The AMI client attempts to use UpdateConfig with the set of actions EmptyCat, followed by a few Append to define new variables. The intent is to complete replace the content of the category with a new set of variables. It happens that the chosen category 
is actually defined in b.conf.


The actual result is that b.conf is left unmodified, and the variables that were supposed to go in the emptied category are instead prepended to the #include "b.conf" statement, without the [category] delimiter that starts a new category. This 
syntactically places the variables as a content of whatever section was before the #include, and if the #include happens to appear as the first line of the file a.conf, it leads to variables outside of any category, leading to an invalid configuration file.


Is there a way to prevent this scenario, without actually going to the filesystem and trying my hand at parsing the configuration file for any #include's that might be the true source of the categories I want to update? For the sake of argument, my AMI 
client runs on a different machine, so direct filesystem access is nontrivial.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Representation of category templates and template inheritance in ARA Static Realtime

2017-03-20 Thread Alex Villací­s Lasso

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_UpdateConfig

According to the link above, the NewCat action allows for options that specify 
whether the newly created category is a template, and whether it should inherit 
from an existing set of templates.


https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration

The link above has a comment with an example of an ast_config table that can be 
used for ARA Static Realtime to load configuration files from my database.

Is it possible to represent templates in ARA Static Realtime? If so, how?

What will happen if I store my configuration in ARA Static Realtime and I 
attempt to create a category template using NewCat ?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Can Asterisk handle in any way an SDP with m=application webrtc-datachannel ?

2016-11-21 Thread Alex Villací­s Lasso

I have a working telephone project that uses SIP.js 0.7.5 with Asterisk on the 
server side. Currently it handles both audio and video correctly.

The SIP.js webpage has instructions for setting up a datachannel through a SIP 
call. The online demo uses OpenSIPS.

When setting up a SIP call with a datachannel through the SIP.js online demo, 
the SDP looks like this:

v=0
o=- 2849011408178506361 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS
m=application 45029 DTLS/SCTP 5000
c=IN IP4 201.234.196.170
a=candidate:1184643355 1 udp 2122260223 10.1.0.1 33877 typ host generation 0 
network-id 3
a=candidate:2680228395 1 udp 2122194687 10.0.0.245 49916 typ host generation 0 
network-id 2
a=candidate:3700057831 1 udp 2122129151 192.168.3.2 45029 typ host generation 0 
network-id 1
a=candidate:136300011 1 tcp 1518280447 10.1.0.1 9 typ host tcptype active 
generation 0 network-id 3
a=candidate:3510826715 1 tcp 1518214911 10.0.0.245 9 typ host tcptype active 
generation 0 network-id 2
a=candidate:2450102807 1 tcp 1518149375 192.168.3.2 9 typ host tcptype active 
generation 0 network-id 1
a=candidate:1976953138 1 udp 1685921535 201.234.196.170 45029 typ srflx raddr 
192.168.3.2 rport 45029 generation 0 network-id 1
a=ice-ufrag:8Dt8
a=ice-pwd:CPt/905Ehc9EKsY+Dpu4UQ7d
a=fingerprint:sha-256 
20:46:82:E4:29:DE:EB:9A:04:74:A4:31:F7:A5:7A:45:15:8B:9C:61:50:CB:8A:EE:2E:35:5A:74:10:33:09:B3
a=setup:actpass
a=mid:data
a=sctpmap:5000 webrtc-datachannel 1024
a=sendrecv
a=candidate:0dspPHO0b1Ifs6Nv 1 UDP 16777215 199.7.173.73 56338 typ relay raddr 
199.7.173.73 rport 56338

The media m= is of type application.

Is Asterisk capable of handling such a SDP, so that two SIP endpoints registered through Asterisk can begin exchanging data? From what I understand in the code, Asterisk will reject such a call. However, I want to exhaust what Asterisk can do before 
resorting to setting up a SIP proxy between the endpoint and Asterisk. I remember reading a report about a webrtc success story where the webphones were also exchanging data using datachannels.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Getting 'no shared cipher' on call to webrtc endpoint from asterisk-11.24.0

2016-10-26 Thread Alex Villací­s Lasso

El 26/10/16 a las 13:16, Alex Villací­s Lasso escribió:
I am making SIP calls using SIP.js and configuring Asterisk 11.x for websockets calls under CentOS 7. On 11.23.1 and earlier, I had to patch the code to disable auto negociation due to ASTERISK-25659. Now that the bug is supposedly fixed in commit 
8653da4fa228e1e289e09e5d024e11d24da87d94, I reverted my local patch. Calls from Firefox 49 to Asterisk connect normally. However, when Asterisk originates a call to Firefox, the call hangs up immediately with this message:


[2016-10-26 12:38:09] ERROR[2888][C-0004]: res_rtp_asterisk.c:2173 
__rtp_recvfrom: DTLS failure occurred on RTP instance '0x7f5f0802f378' due to 
reason 'no shared cipher', terminating
[2016-10-26 12:38:09] WARNING[2888][C-0004]: res_rtp_asterisk.c:3924 
ast_rtcp_read: RTCP Read error: Unspecified.  Hanging up.

I suspect this has something to do with the dtlscipher setting, which is 
currently not set anywhere in my setup.

Is my suspicion correct? How do I debug which ciphers need to be enabled?



For Asterisk 11.24.0, the elliptic curve code is #ifdef'ed around 
HAVE_OPENSSL_EC . However, nowhere in the configure.ac is a check to enable 
HAVE_OPENSSL_EC. Therefore elliptic curve is always disabled on Asterisk 
11.24.0 despite the intent of the code.




-bash-4.2# openssl ciphers -v DEFAULT
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) 
Mac=AEAD
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA  Enc=AES(256) Mac=SHA384
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256)  Mac=SHA384
ECDHE-RSA-AES256-SHASSLv3 Kx=ECDH Au=RSA  Enc=AES(256) Mac=SHA1
ECDHE-ECDSA-AES256-SHA  SSLv3 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH   Au=DSS Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH   Au=RSA Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH   Au=RSA  Enc=AES(256) Mac=SHA256
DHE-DSS-AES256-SHA256   TLSv1.2 Kx=DH   Au=DSS  Enc=AES(256) Mac=SHA256
DHE-RSA-AES256-SHA  SSLv3 Kx=DH   Au=RSA  Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-SHA  SSLv3 Kx=DH   Au=DSS  Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH   Au=RSA Enc=Camellia(256) Mac=SHA1
DHE-DSS-CAMELLIA256-SHA SSLv3 Kx=DH   Au=DSS Enc=Camellia(256) Mac=SHA1
ECDH-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(256) Mac=AEAD
ECDH-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(256) 
Mac=AEAD
ECDH-RSA-AES256-SHA384  TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(256) Mac=SHA384
ECDH-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(256)  Mac=SHA384
ECDH-RSA-AES256-SHA SSLv3 Kx=ECDH/RSA Au=ECDH Enc=AES(256) Mac=SHA1
ECDH-ECDSA-AES256-SHA   SSLv3 Kx=ECDH/ECDSA Au=ECDH Enc=AES(256) Mac=SHA1
AES256-GCM-SHA384   TLSv1.2 Kx=RSA  Au=RSA Enc=AESGCM(256) Mac=AEAD
AES256-SHA256   TLSv1.2 Kx=RSA  Au=RSA  Enc=AES(256) Mac=SHA256
AES256-SHA  SSLv3 Kx=RSA  Au=RSA  Enc=AES(256) Mac=SHA1
CAMELLIA256-SHA SSLv3 Kx=RSA  Au=RSA Enc=Camellia(256) Mac=SHA1
PSK-AES256-CBC-SHA  SSLv3 Kx=PSK  Au=PSK  Enc=AES(256) Mac=SHA1
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) 
Mac=AEAD
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA  Enc=AES(128) Mac=SHA256
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128)  Mac=SHA256
ECDHE-RSA-AES128-SHASSLv3 Kx=ECDH Au=RSA  Enc=AES(128) Mac=SHA1
ECDHE-ECDSA-AES128-SHA  SSLv3 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA1
DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH   Au=DSS Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH   Au=RSA Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH   Au=RSA  Enc=AES(128) Mac=SHA256
DHE-DSS-AES128-SHA256   TLSv1.2 Kx=DH   Au=DSS  Enc=AES(128) Mac=SHA256
DHE-RSA-AES128-SHA  SSLv3 Kx=DH   Au=RSA  Enc=AES(128) Mac=SHA1
DHE-DSS-AES128-SHA  SSLv3 Kx=DH   Au=DSS  Enc=AES(128) Mac=SHA1
DHE-RSA-SEED-SHASSLv3 Kx=DH   Au=RSA  Enc=SEED(128) Mac=SHA1
DHE-DSS-SEED-SHASSLv3 Kx=DH   Au=DSS  Enc=SEED(128) Mac=SHA1
DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH   Au=RSA Enc=Camellia(128) Mac=SHA1
DHE-DSS-CAMELLIA128-SHA SSLv3 Kx=DH   Au=DSS Enc=Camellia(128) Mac=SHA1
ECDH-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(128) Mac=AEAD
ECDH-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(128) 
Mac=AEAD
ECDH-RSA-AES128-SHA256  TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(128) Mac=SHA256
ECDH-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128)  Mac=SHA256
ECDH-RSA-AES128-SHA SSLv3 Kx=ECDH/RSA Au=ECDH Enc=AES(128) Mac=SHA1
ECDH-ECDSA-AES128-SHA   SSLv3 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128) Mac=SHA1
AES128-GCM-SHA256   TLSv1.2 Kx=RSA  Au=RSA Enc

[asterisk-users] Getting 'no shared cipher' on call to webrtc endpoint from asterisk-11.24.0

2016-10-26 Thread Alex Villací­s Lasso
I am making SIP calls using SIP.js and configuring Asterisk 11.x for websockets calls under CentOS 7. On 11.23.1 and earlier, I had to patch the code to disable auto negociation due to ASTERISK-25659. Now that the bug is supposedly fixed in commit 
8653da4fa228e1e289e09e5d024e11d24da87d94, I reverted my local patch. Calls from Firefox 49 to Asterisk connect normally. However, when Asterisk originates a call to Firefox, the call hangs up immediately with this message:


[2016-10-26 12:38:09] ERROR[2888][C-0004]: res_rtp_asterisk.c:2173 
__rtp_recvfrom: DTLS failure occurred on RTP instance '0x7f5f0802f378' due to 
reason 'no shared cipher', terminating
[2016-10-26 12:38:09] WARNING[2888][C-0004]: res_rtp_asterisk.c:3924 
ast_rtcp_read: RTCP Read error: Unspecified.  Hanging up.

I suspect this has something to do with the dtlscipher setting, which is 
currently not set anywhere in my setup.

Is my suspicion correct? How do I debug which ciphers need to be enabled?


-bash-4.2# openssl ciphers -v DEFAULT
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) 
Mac=AEAD
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA  Enc=AES(256) Mac=SHA384
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256)  Mac=SHA384
ECDHE-RSA-AES256-SHASSLv3 Kx=ECDH Au=RSA  Enc=AES(256) Mac=SHA1
ECDHE-ECDSA-AES256-SHA  SSLv3 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH   Au=DSS Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH   Au=RSA Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH   Au=RSA  Enc=AES(256) Mac=SHA256
DHE-DSS-AES256-SHA256   TLSv1.2 Kx=DH   Au=DSS  Enc=AES(256) Mac=SHA256
DHE-RSA-AES256-SHA  SSLv3 Kx=DH   Au=RSA  Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-SHA  SSLv3 Kx=DH   Au=DSS  Enc=AES(256) Mac=SHA1
DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH   Au=RSA Enc=Camellia(256) Mac=SHA1
DHE-DSS-CAMELLIA256-SHA SSLv3 Kx=DH   Au=DSS Enc=Camellia(256) Mac=SHA1
ECDH-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(256) Mac=AEAD
ECDH-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(256) 
Mac=AEAD
ECDH-RSA-AES256-SHA384  TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(256) Mac=SHA384
ECDH-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(256)  Mac=SHA384
ECDH-RSA-AES256-SHA SSLv3 Kx=ECDH/RSA Au=ECDH Enc=AES(256) Mac=SHA1
ECDH-ECDSA-AES256-SHA   SSLv3 Kx=ECDH/ECDSA Au=ECDH Enc=AES(256) Mac=SHA1
AES256-GCM-SHA384   TLSv1.2 Kx=RSA  Au=RSA Enc=AESGCM(256) Mac=AEAD
AES256-SHA256   TLSv1.2 Kx=RSA  Au=RSA  Enc=AES(256) Mac=SHA256
AES256-SHA  SSLv3 Kx=RSA  Au=RSA  Enc=AES(256) Mac=SHA1
CAMELLIA256-SHA SSLv3 Kx=RSA  Au=RSA Enc=Camellia(256) Mac=SHA1
PSK-AES256-CBC-SHA  SSLv3 Kx=PSK  Au=PSK  Enc=AES(256) Mac=SHA1
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) 
Mac=AEAD
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA  Enc=AES(128) Mac=SHA256
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128)  Mac=SHA256
ECDHE-RSA-AES128-SHASSLv3 Kx=ECDH Au=RSA  Enc=AES(128) Mac=SHA1
ECDHE-ECDSA-AES128-SHA  SSLv3 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA1
DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH   Au=DSS Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH   Au=RSA Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH   Au=RSA  Enc=AES(128) Mac=SHA256
DHE-DSS-AES128-SHA256   TLSv1.2 Kx=DH   Au=DSS  Enc=AES(128) Mac=SHA256
DHE-RSA-AES128-SHA  SSLv3 Kx=DH   Au=RSA  Enc=AES(128) Mac=SHA1
DHE-DSS-AES128-SHA  SSLv3 Kx=DH   Au=DSS  Enc=AES(128) Mac=SHA1
DHE-RSA-SEED-SHASSLv3 Kx=DH   Au=RSA  Enc=SEED(128) Mac=SHA1
DHE-DSS-SEED-SHASSLv3 Kx=DH   Au=DSS  Enc=SEED(128) Mac=SHA1
DHE-RSA-CAMELLIA128-SHA SSLv3 Kx=DH   Au=RSA Enc=Camellia(128) Mac=SHA1
DHE-DSS-CAMELLIA128-SHA SSLv3 Kx=DH   Au=DSS Enc=Camellia(128) Mac=SHA1
ECDH-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(128) Mac=AEAD
ECDH-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(128) 
Mac=AEAD
ECDH-RSA-AES128-SHA256  TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(128) Mac=SHA256
ECDH-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128)  Mac=SHA256
ECDH-RSA-AES128-SHA SSLv3 Kx=ECDH/RSA Au=ECDH Enc=AES(128) Mac=SHA1
ECDH-ECDSA-AES128-SHA   SSLv3 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128) Mac=SHA1
AES128-GCM-SHA256   TLSv1.2 Kx=RSA  Au=RSA Enc=AESGCM(128) Mac=AEAD
AES128-SHA256   TLSv1.2 Kx=RSA  Au=RSA  Enc=AES(128) Mac=SHA256
AES128-SHA  SSLv3 Kx=RSA  Au=RSA  Enc=AES(128) Mac=SHA1
SEED-SHASSLv3 Kx=RSA  Au=RSA  Enc=SEED(128) Mac=SHA1
CAMELLIA128-SHA SSLv3 Kx=RSA  Au=RSA Enc=Camellia(128) Mac=SHA1

Re: [asterisk-users] Replacement for phpagi?

2016-08-10 Thread Alex Villací­s Lasso

El 10/08/16 a las 12:06, Carlos Chavez escribió:

Anyone know a good replacement for phpagi? Unfortunately development 
stalled long ago and it has not been updated.  What is the best solution for 
AMI and AGI on PHP? Thanks.



In the case of AMI, you could use the AMI client from the Elastix CallCenter 
dialer daemon:

https://sourceforge.net/p/elastix/code/HEAD/tree/branches/2.5.0/apps/extras/callcenter/setup/dialer_process/dialer/AMIClientConn.class.php

This class was once based on phpagi-asmanager.php but has since been completely 
rewritten to make use of an internal non-blocking I/O model. The main internal 
client is the AMIEventProcess class in the same project directory.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Trouble applying regex to dialplan variable that contains double-quotes

2016-08-09 Thread Alex Villací­s Lasso

El 08/08/16 a las 21:34, Eric Wieling escribió:


How Set handles quotes can be changed with the 'app_set' setting in the 
[compat] section of /etc/asterisk/asterisk.conf.  See also: 
https://wiki.asterisk.org/wiki/display/AST/Application_Set Perhaps you have the 
value left over from an old Asterisk setup.



I do not have any [compat] section in my /etc/asterisk/asterisk.conf file. Also the previous assignments to RX and T1 work correctly and the values are set as they appear in the dialplan. It is only the evaluation of the regex operator inside the $[ that 
gives me trouble. I thought the QUOTE() function would be the way to use a dialplan variable with special characters inside an expression, but apparently the backslash-double quote sequence is not being recognized as an escape sequence for a literal 
double-quote character in the string. See below for the actual result. So, what am I doing wrong?



On 08/08/2016 04:31 PM, Alex Villací­s Lasso wrote:
I am writing a dialplan context under asterisk 11.21.0 to handle SIP message routing between registered SIP peers using chan_sip. I am having trouble with double-quotes when the source peer uses a display name, which appears in quotes before the SIP 
URI. I want to extract the SIP URI from MESSAGE(from) in order to (conditionally) route a failure message back to the source peer.


My test dialplan sets up variables like these:

exten => _X.,n,Set(RX=".*<(.+)>")
exten => _X.,n,Set(T1="Example name" <sip:exam...@example.com>)

If I just apply the regex operator (:) on T1 using regexp RX, like this:

exten => _X.,n,Set(FROM_SIPURI=$[${T1}:${RX}])

...I get this syntax error:

[2016-08-08 15:04:02] WARNING[1653][C-]: ast_expr2.fl:470 ast_yyerror: 
ast_yyerror():  syntax error: syntax error, unexpected ':', expecting '-' or '!' or 
'(' or ''; Input:
"Example name" <sip:exam...@example.com>:".*<(.+)>"
^
(caret points at the colon character)

If I enclose the T1 variable in double quotes, like this:

exten => _X.,n,Set(FROM_SIPURI=$["${T1}":${RX}])

...I get this syntax error:

[2016-08-08 15:05:40] WARNING[1653][C-]: ast_expr2.fl:470 ast_yyerror: 
ast_yyerror():  syntax error: syntax error, unexpected '', expecting 
$end; Input:
""Example name" <sip:exam...@example.com>":".*<(.+)>"
  ^
(caret points at letter E)

If I use the QUOTE() function to quote the double quotes before applying the 
regexp, like this:

exten => _X.,n,Set(FROM_SIPURI=$[${QUOTE(${T1})}:${RX}])

... I get this syntax error:

[2016-08-08 14:53:35] WARNING[1653][C-]: ast_expr2.fl:470 ast_yyerror: 
ast_yyerror():  syntax error: syntax error, unexpected '', expecting 
$end; Input:
"\"Example name\" <sip:exam...@example.com>":".*<(.+)>"
   ^
(caret points at letter E)

Currently I am working around the issue by using REPLACE() to strip all 
double-quotes, but I believe this is not a correct solution. How should I write 
the $[ expression so that the double-quotes are handled correctly?







--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Trouble applying regex to dialplan variable that contains double-quotes

2016-08-08 Thread Alex Villací­s Lasso
I am writing a dialplan context under asterisk 11.21.0 to handle SIP message routing between registered SIP peers using chan_sip. I am having trouble with double-quotes when the source peer uses a display name, which appears in quotes before the SIP URI. I 
want to extract the SIP URI from MESSAGE(from) in order to (conditionally) route a failure message back to the source peer.


My test dialplan sets up variables like these:

exten => _X.,n,Set(RX=".*<(.+)>")
exten => _X.,n,Set(T1="Example name" )

If I just apply the regex operator (:) on T1 using regexp RX, like this:

exten => _X.,n,Set(FROM_SIPURI=$[${T1}:${RX}])

...I get this syntax error:

[2016-08-08 15:04:02] WARNING[1653][C-]: ast_expr2.fl:470 ast_yyerror: 
ast_yyerror():  syntax error: syntax error, unexpected ':', expecting '-' or '!' or 
'(' or ''; Input:
"Example name" :".*<(.+)>"
^
(caret points at the colon character)

If I enclose the T1 variable in double quotes, like this:

exten => _X.,n,Set(FROM_SIPURI=$["${T1}":${RX}])

...I get this syntax error:

[2016-08-08 15:05:40] WARNING[1653][C-]: ast_expr2.fl:470 ast_yyerror: 
ast_yyerror():  syntax error: syntax error, unexpected '', expecting 
$end; Input:
""Example name" ":".*<(.+)>"
  ^
(caret points at letter E)

If I use the QUOTE() function to quote the double quotes before applying the 
regexp, like this:

exten => _X.,n,Set(FROM_SIPURI=$[${QUOTE(${T1})}:${RX}])

... I get this syntax error:

[2016-08-08 14:53:35] WARNING[1653][C-]: ast_expr2.fl:470 ast_yyerror: 
ast_yyerror():  syntax error: syntax error, unexpected '', expecting 
$end; Input:
"\"Example name\" ":".*<(.+)>"
   ^
(caret points at letter E)

Currently I am working around the issue by using REPLACE() to strip all 
double-quotes, but I believe this is not a correct solution. How should I write 
the $[ expression so that the double-quotes are handled correctly?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Incoming webrtc call succeeds in Firefox but fails in Google Chrome

2016-01-20 Thread Alex Villací­s Lasso

I am having trouble getting Google Chrome to accept a WebRTC call coming from 
Asterisk, even though Firefox can (now) accept the same call without issue.

My setup is as follows:

Server:
CentOS 7 x86_64 (Elastix 4 RC) with IP: 10.1.0.4 192.168.5.146
asterisk-11.21.0 patched to work around 
https://issues.asterisk.org/jira/browse/ASTERISK-25659
openssl-1.0.1e-51.el7_2.2.x86_64
[root@elx4 ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[root@elx4 ~]# openssl ecparam -list_curves
  secp384r1 : NIST/SECG curve over a 384 bit prime field
  secp521r1 : NIST/SECG curve over a 521 bit prime field
  prime256v1: X9.62/SECG curve over a 256 bit prime field

Client:
Fedora 23 x86_64
Linphone (linphone-3.6.1-10.fc23.x86_64)
Firefox 43 (firefox-43.0.3-1.fc23.x86_64)
Google Chrome (google-chrome-stable-47.0.2526.111-1.x86_64)
SIP.js 0.7.2

I set up my SIP configuration to have two SIP accounts. Account 1000 is the 
Linphone and 1001 is the webrtc:

[general]
faxdetect=no
vmexten=*97
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
useragent=FPBX-2.11.0(11.20.0)
disallow=all
allow=g723
allow=ulaw
allow=gsm
allow=alaw
allow=g729
allow=speex
allow=g722
allow=h264
allow=h263p
allow=h263
allow=h261
tlsenable=yes
tlsbindaddr=0.0.0.0
tlscipher=ALL
tlsclientmethod=tlsv1
tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscafile=/etc/asterisk/keys/ca.crt
callevents=no
jbenable=no
videosupport=yes
allowguest=no
srvlookup=no
defaultexpiry=120
minexpiry=60
maxexpiry=3600
registerattempts=0
registertimeout=20
g726nonstandard=no
maxcallbitrate=384
canreinvite=no
rtptimeout=30
rtpholdtimeout=300
rtpkeepalive=0
checkmwi=10
notifyringing=yes
notifyhold=yes
nat=yes

[1000]
deny=0.0.0.0/0.0.0.0
secret=6ff108122cce3b0b45e0abf374c14ef4
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
icesupport=no
dtlsenable=no
dtlsverify=no
dtlssetup=actpass
encryption=no
callgroup=
pickupgroup=
dial=SIP/1000
mailbox=1000@device
permit=0.0.0.0/0.0.0.0
callerid=Usuario 1 elx4 <1000>
callcounter=yes
faxdetect=no

[1001]
deny=0.0.0.0/0.0.0.0
secret=ce93963b0751ed9a88ec1badbc073fce
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=yes
qualifyfreq=60
transport=wss,ws,udp,tcp,tls
avpf=yes
icesupport=yes
dtlsenable=yes
dtlsverify=no
dtlssetup=actpass
dtlscertfile=/var/lib/asterisk/keys/localhost.crt
dtlsprivatekey=/var/lib/asterisk/keys/localhost.key
encryption=yes
callgroup=
pickupgroup=
dial=SIP/1001
mailbox=1001@device
permit=0.0.0.0/0.0.0.0
callerid=Usuario Alex <1001>
callcounter=yes
faxdetect=no


With this setup, I can make calls using the SIP softphone as usual, both into and out of asterisk. After approving the certificate exceptions, I can also use the webrtc account to generate a call from either Firefox or Google Chrome into asterisk, out to 
the SIP softphone.


The problem arises when I try to make asterisk send a call into the browser. When using Firefox 43 I can receive the call normally (this required patching around ASTERISK-25659) and all is well. However, in Google Chrome, the call is rejected with a 
message of "Failed to set remote video description send parameters.." as shown in this SIP trace in the browser console:




Wed Jan 20 2016 13:54:53 GMT-0500 (ECT) | sip.transport | received WebSocket 
text message:

INVITE sip:8dgpkoa2@192.0.2.210;transport=wss SIP/2.0
Via: SIP/2.0/WS 10.1.0.4:5060;branch=z9hG4bK4f80b96d;rport
Max-Forwards: 70
From: "Anonymous" ;tag=as37a33245
To: 
Contact: 
Call-ID: 61c6be5b44d587c80b56f98e756037ab@10.1.0.4:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0(11.20.0)
Date: Wed, 20 Jan 2016 18:54:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 1799

v=0
o=root 469858785 469858785 IN IP4 10.1.0.4
s=Asterisk PBX 11.21.0
c=IN IP4 10.1.0.4
b=CT:384
t=0 0
m=audio 14814 UDP/TLS/RTP/SAVPF 4 0 3 8 18 110 9 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:0e746cd50c88ce6e383ff3882acebb80
a=ice-pwd:1a9a09862254ae253f06a0bb184fd1b5
a=candidate:Ha010004 1 UDP 2130706431 10.1.0.4 14814 typ host
a=candidate:Hc0a80592 1 UDP 2130706431 192.168.5.146 14814 typ host
a=candidate:Ha010004 2 UDP 2130706430 10.1.0.4 14815 typ host
a=candidate:Hc0a80592 2 UDP 2130706430 192.168.5.146 14815 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 

Re: [asterisk-users] Incoming webrtc call succeeds in Firefox but fails in Google Chrome

2016-01-20 Thread Alex Villací­s Lasso

El 20/01/16 a las 16:25, Alex Villací­s Lasso escribió:

I am having trouble getting Google Chrome to accept a WebRTC call coming from 
Asterisk, even though Firefox can (now) accept the same call without issue.

My setup is as follows:

Server:
CentOS 7 x86_64 (Elastix 4 RC) with IP: 10.1.0.4 192.168.5.146
asterisk-11.21.0 patched to work around 
https://issues.asterisk.org/jira/browse/ASTERISK-25659
openssl-1.0.1e-51.el7_2.2.x86_64
[root@elx4 ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[root@elx4 ~]# openssl ecparam -list_curves
  secp384r1 : NIST/SECG curve over a 384 bit prime field
  secp521r1 : NIST/SECG curve over a 521 bit prime field
  prime256v1: X9.62/SECG curve over a 256 bit prime field

Client:
Fedora 23 x86_64
Linphone (linphone-3.6.1-10.fc23.x86_64)
Firefox 43 (firefox-43.0.3-1.fc23.x86_64)
Google Chrome (google-chrome-stable-47.0.2526.111-1.x86_64)
SIP.js 0.7.2

I set up my SIP configuration to have two SIP accounts. Account 1000 is the 
Linphone and 1001 is the webrtc:

[general]
faxdetect=no
vmexten=*97
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
useragent=FPBX-2.11.0(11.20.0)
disallow=all
allow=g723
allow=ulaw
allow=gsm
allow=alaw
allow=g729
allow=speex
allow=g722
allow=h264
allow=h263p
allow=h263
allow=h261
tlsenable=yes
tlsbindaddr=0.0.0.0
tlscipher=ALL
tlsclientmethod=tlsv1
tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscafile=/etc/asterisk/keys/ca.crt
callevents=no
jbenable=no
videosupport=yes
allowguest=no
srvlookup=no
defaultexpiry=120
minexpiry=60
maxexpiry=3600
registerattempts=0
registertimeout=20
g726nonstandard=no
maxcallbitrate=384
canreinvite=no
rtptimeout=30
rtpholdtimeout=300
rtpkeepalive=0
checkmwi=10
notifyringing=yes
notifyhold=yes
nat=yes

[1000]
deny=0.0.0.0/0.0.0.0
secret=6ff108122cce3b0b45e0abf374c14ef4
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
icesupport=no
dtlsenable=no
dtlsverify=no
dtlssetup=actpass
encryption=no
callgroup=
pickupgroup=
dial=SIP/1000
mailbox=1000@device
permit=0.0.0.0/0.0.0.0
callerid=Usuario 1 elx4 <1000>
callcounter=yes
faxdetect=no

[1001]
deny=0.0.0.0/0.0.0.0
secret=ce93963b0751ed9a88ec1badbc073fce
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=yes
qualifyfreq=60
transport=wss,ws,udp,tcp,tls
avpf=yes
icesupport=yes
dtlsenable=yes
dtlsverify=no
dtlssetup=actpass
dtlscertfile=/var/lib/asterisk/keys/localhost.crt
dtlsprivatekey=/var/lib/asterisk/keys/localhost.key
encryption=yes
callgroup=
pickupgroup=
dial=SIP/1001
mailbox=1001@device
permit=0.0.0.0/0.0.0.0
callerid=Usuario Alex <1001>
callcounter=yes
faxdetect=no


With this setup, I can make calls using the SIP softphone as usual, both into and out of asterisk. After approving the certificate exceptions, I can also use the webrtc account to generate a call from either Firefox or Google Chrome into asterisk, out to 
the SIP softphone.


The problem arises when I try to make asterisk send a call into the browser. When using Firefox 43 I can receive the call normally (this required patching around ASTERISK-25659) and all is well. However, in Google Chrome, the call is rejected with a 
message of "Failed to set remote video description send parameters.." as shown in this SIP trace in the browser console:




Wed Jan 20 2016 13:54:53 GMT-0500 (ECT) | sip.transport | received WebSocket 
text message:

INVITE sip:8dgpkoa2@192.0.2.210;transport=wss SIP/2.0
Via: SIP/2.0/WS 10.1.0.4:5060;branch=z9hG4bK4f80b96d;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as37a33245
To: <sip:8dgpkoa2@192.0.2.210;transport=wss>
Contact: <sip:anonymous@10.1.0.4:5060;transport=WS>
Call-ID: 61c6be5b44d587c80b56f98e756037ab@10.1.0.4:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0(11.20.0)
Date: Wed, 20 Jan 2016 18:54:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 1799

v=0
o=root 469858785 469858785 IN IP4 10.1.0.4
s=Asterisk PBX 11.21.0
c=IN IP4 10.1.0.4
b=CT:384
t=0 0
m=audio 14814 UDP/TLS/RTP/SAVPF 4 0 3 8 18 110 9 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:0e746cd50c88ce6e383ff3882acebb80
a=ice-pwd:1a9a09862254ae253f06a0bb184fd1b5
a=candidate:Ha010004 1 UDP 2130706431 10.1.0.4 14814 typ host
a=candidate:Hc0a80592 1 UDP 2130706431 192.168.5.146 14814 typ host
a=candidate:Ha010004 2 UDP 2130706430 10.1.0.4 14815 typ host
a=candidate:Hc0a80592 2 UDP 2130706430 192.168.5.146 14815 typ host

Re: [asterisk-users] Incoming webrtc call succeeds in Firefox but fails in Google Chrome

2016-01-20 Thread Alex Villací­s Lasso

El 20/01/16 a las 18:33, Alex Villací­s Lasso escribió:

El 20/01/16 a las 16:25, Alex Villací­s Lasso escribió:

Partial fix: Google Chrome accepts the call if videosupport is set to "no". 
This is the SDP of the successful INVITE that Chrome accepts:

INVITE sip:8cj802p8@192.0.2.240;transport=wss SIP/2.0
Via: SIP/2.0/WS 10.1.0.4:5060;branch=z9hG4bK65071dc5;rport
Max-Forwards: 70
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as474012b5
To: <sip:8cj802p8@192.0.2.240;transport=wss>
Contact: <sip:anonymous@10.1.0.4:5060;transport=WS>
Call-ID: 73b82a5b6fbaab50741cd99424b1f31a@10.1.0.4:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.11.0(11.20.0)
Date: Wed, 20 Jan 2016 23:27:51 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 937

v=0
o=root 2094440180 2094440180 IN IP4 10.1.0.4
s=Asterisk PBX 11.21.0
c=IN IP4 10.1.0.4
t=0 0
m=audio 18758 UDP/TLS/RTP/SAVPF 4 0 3 8 18 110 9 101
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=ice-ufrag:0033e2a20fe4becd1c34b13f5efcf1e3
a=ice-pwd:65693b30588f061710baa3584253eaba
a=candidate:Ha010004 1 UDP 2130706431 10.1.0.4 18758 typ host
a=candidate:Hc0a80592 1 UDP 2130706431 192.168.5.146 18758 typ host
a=candidate:Ha010004 2 UDP 2130706430 10.1.0.4 18759 typ host
a=candidate:Hc0a80592 2 UDP 2130706430 192.168.5.146 18759 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 
A1:9E:D0:11:26:AA:30:00:AF:06:87:9C:A7:C2:70:4F:A3:3F:89:B5:7D:5C:FA:90:89:7E:D0:8A:F0:72:F5:2A
a=sendrecv

However, I want to enable full video passthrough. Is this some kind of video 
codec incompatibility?



If I enable allow=vp8 to the set of allowed codecs, Chrome accepts the video 
call, but now I get no sound with the demo-congrats command.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Detect queue agent in wrapuptime period through AMI

2015-10-08 Thread Alex Villací­s Lasso

Is there a way to use AMI to detect whether an agent that appears to be free is 
in its wrap-up-time period?

I am using AMI to query the queue status and its members, in order to generate 
calls directed to the queue, and I do not want to originate calls if some of 
them will not be assigned immediately to agents because of the wrap-up time.

As far as I can see in the Asterisk 11 source code, the QueueStatus AMI command 
does not report the wrapuptime value, and the QueueMember event does not report 
whether the agent is waiting its wrapup time either.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Why is CDR(recordingfile) not being written to the database despite being set in the dialplan?

2015-04-17 Thread Alex Villací­s Lasso


I am using Asterisk 11.17.1 with my program that uses AMI Originate calls to generate a bunch of calls for a callcenter. The PBX configuration is handled by FreePBX 2.11. I want to understand the dialplan behavior in order to figure out why the 
CDR(recordingfile) is blank on the CDR records despite the dialplan setting it.


My program generates the calls by setting Channel=Local/NUMBERTODIAL@from-internal and by setting Exten=QUEUENUM, Context=from-internal, Priority=1 . The FreePBX-generated dialplan results in the following trace as seen in the Asterisk console. In 
particular, please note that CDR(recordingfile) is being set in Local/9991416445@from-internal-017b;1 :


-- Executing [9991416445@from-internal:1] 
Macro(Local/9991416445@from-internal-017b;2, 
user-callerid,LIMIT,EXTERNAL,) in new stack
-- Executing [s@macro-user-callerid:1] 
Set(Local/9991416445@from-internal-017b;2, 
TOUCH_MONITOR=1429224932.21697) in new stack
-- Executing [s@macro-user-callerid:2] 
Set(Local/9991416445@from-internal-017b;2, AMPUSER=9991416445) in new 
stack
-- Executing [s@macro-user-callerid:3] 
GotoIf(Local/9991416445@from-internal-017b;2, 0?report) in new stack
...
-- Executing [s@sub-record-check:19] Set(Local/9991416445@from-internal-017b;2, 
__TIMESTR=20150416-175532) in new stack
-- Executing [s@sub-record-check:20] Set(Local/9991416445@from-internal-017b;2, 
__FROMEXTEN=9991416445) in new stack
-- Executing [s@sub-record-check:21] Set(Local/9991416445@from-internal-017b;2, 
__CALLFILENAME=out-9991416445-9991416445-20150416-175532-1429224932.21697) in new stack
-- Executing [s@sub-record-check:22] 
Goto(Local/9991416445@from-internal-017b;2, out,1) in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] 
ExecIf(Local/9991416445@from-internal-017b;2, 
1?Set(__REC_POLICY_MODE=)) in new stack
-- Executing [out@sub-record-check:2] 
GosubIf(Local/9991416445@from-internal-017b;2, 
0?record,1(exten,9991416445,9991416445)) in new stack
-- Executing [out@sub-record-check:3] 
Return(Local/9991416445@from-internal-017b;2, ) in new stack
-- Executing [9991416445@from-internal:5] 
PlayTones(Local/9991416445@from-internal-017b;2, ring) in new stack
-- Executing [9991416445@from-internal:6] 
Dial(Local/9991416445@from-internal-017b;2, 
SIP/5547741200/019991416445,40,tTorR) in new stack
...
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
-- Called SIP/5547741200/0459991416445
-- SIP/5547741200-51cb is ringing

-- SIP/5547741200-51cb is ringing
-- SIP/5547741200-51cb is making progress passing it to 
Local/9991416445@from-internal-017b;2

-- SIP/5547741200-51cb is making progress passing it to 
Local/9991416445@from-internal-017b;2

-- SIP/5547741200-51cb is making progress passing it to 
Local/9991416445@from-internal-017b;2

-- SIP/5547741200-51cb is ringing
-- SIP/5547741200-51cb is making progress passing it to 
Local/9991416445@from-internal-017b;2
-- SIP/5547741200-51cb answered 
Local/9991416445@from-internal-017b;2
-- Executing [6001@from-internal:1] 
Macro(Local/9991416445@from-internal-017b;1, user-callerid,) in new 
stack
-- Executing [s@macro-user-callerid:1] 
Set(Local/9991416445@from-internal-017b;1, 
TOUCH_MONITOR=1429224932.21696) in new stack
-- Executing [s@macro-user-callerid:2] 
Set(Local/9991416445@from-internal-017b;1, AMPUSER=9991416445) in new 
stack
-- Executing [s@macro-user-callerid:3] 
GotoIf(Local/9991416445@from-internal-017b;1, 0?report) in new stack
-- Executing [s@macro-user-callerid:4] 
ExecIf(Local/9991416445@from-internal-017b;1, 
1?Set(REALCALLERIDNUM=9991416445)) in new stack
-- Executing [s@macro-user-callerid:5] 
Set(Local/9991416445@from-internal-017b;1, AMPUSER=) in new stack
...
-- Executing [6001@from-internal:29] Set(Local/9991416445@from-internal-017b;1, 
VQ_POSITION=) in new stack
-- Executing [6001@from-internal:30] Set(Local/9991416445@from-internal-017b;1, 
__MIXMON_FORMAT=wav) in new stack
-- Executing [6001@from-internal:31] Set(Local/9991416445@from-internal-017b;1, 
MONITOR_OPTIONS=b) in new stack
-- Executing [6001@from-internal:32] 
Gosub(Local/9991416445@from-internal-017b;1, 
sub-record-check,s,1(q,6001,always)) in new stack
-- Executing [s@sub-record-check:1] Set(Local/9991416445@from-internal-017b;1, 
REC_POLICY_MODE_SAVE=) in new stack
-- Executing [s@sub-record-check:2] 
GotoIf(Local/9991416445@from-internal-017b;1, 1?check) in new stack
-- Goto (sub-record-check,s,7)
-- Executing [s@sub-record-check:7] Set(Local/9991416445@from-internal-017b;1, 
__MON_FMT=wav) in new stack
...
-- Executing [q@sub-record-check:1] 
GosubIf(Local/9991416445@from-internal-017b;1, 
1?recq,1(q,6001,9991416445)) in new stack
-- 

[asterisk-users] Help debugging a possible SIP channel leak in 11.17.0, possible race condition

2015-04-07 Thread Alex Villací­s Lasso

I am trying to collect enough information about an problem a client is having 
with its asterisk 11.17.0  x86_64. This issue was observed before in 1.8.20, 
and we upgraded to 11.15.0 and then to 11.17.0 with no solution.

Background: this client is a telemarketing call-center that generates outgoing calls with close to a hundred agents operating simultaneously in peak hours. The system uses asterisk with FreePBX 2.8. In order to generate the calls, I wrote a program that 
connects to Asterisk using the AMI protocol. This program expects the SIP agent extensions to be assigned as members of queues, of which there are about 20, as shown below:


9007 has 0 calls (max unlimited) in 'random' strategy (5s holdtime, 68s 
talktime), W:0, C:581, A:260, SL:82.6% within 60s
   Members:
  SIP/147 (ringinuse disabled) (dynamic) (On Hold) has taken 21 calls (last 
was 800 secs ago)
  SIP/417 (ringinuse disabled) (dynamic) (In use) has taken 77 calls (last 
was 708 secs ago)
  SIP/416 (ringinuse disabled) (dynamic) (In use) has taken 41 calls (last 
was 656 secs ago)
  SIP/408 (ringinuse disabled) (dynamic) (In use) has taken 50 calls (last 
was 789 secs ago)
   No Callers

The program runs queue show through AMI every few seconds. For each queue to be used in telemarketing, the program counts the number of members that are Not In Use. If at least one is found, it reads that many phone numbers from the database and uses 
the AMI Originate command on each one, as follows:


Action: Originate
Channel: Local/NN@from-internal
Exten: 
Context: from-internal
Priority: 1
Async: true
ActionID: xxx

Here, NN is the number read from the database and  is the queue extension in the FreePBX-created context that eventually runs the Queue() dialplan application for the corresponding queue. This causes the call to be connected between the 
outgoing number and the queue, and is then assigned to a queue member by Asterisk. The dialplan is configured to route NN through one of a series of SIP trunks using the outbound routes as configured by FreePBX.


The issue is that although this strategy works correctly on the user's machine for a few days, we have been observing that eventually the application stops placing calls. The agents are all idle (all 90 to 100 of them), but the queue show command shows 
them to be In Use on all queues. Furthermore, in normal operation, the core show channels command shows at most one channel for each configured SIP client in the Up state, but when calls stop being placed, the same command reports multiple channels 
in the Up state, as follows (after sorting):


Local/9757007441@from-internal-a447;2!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740412/5557007441,300,!47740412!!!3!572!(None)!1428426012.169192
Local/9759315789@from-internal-a456;1ZOMBIE!from-trunk-sip-5547740412!!1!Up!AppDial!(Outgoing
 Line)!9759315789!!!3!500!(None)!1428426084.169326
Local/9759315789@from-internal-a456;2!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740412/5559315789,300,!47740412!!!3!500!(None)!1428426084.169323
SIP/104-00014c61!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/0453511309468,300,!47740413!!!3!562!SIP/5547740413-00014c62!1428426022.169224
SIP/110-00014c2b!EjecutivoROLLRATE!9014!1!Up!AppQueue!(Outgoing 
Line)!110!!!3!590!(None)!1428425994.169124
SIP/110-00014e4e!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/5552114757,300,!47740413!!!3!92!(None)!1428426491.169760
SIP/113-00014c8c!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740420/0016499465293,300,!47740420!!!3!532!(None)!1428426052.169273
SIP/114-00014ce6!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740410/040,300,!47740410!!!3!430!(None)!1428426154.169384
SIP/115-00014ea4!macro-dialout-trunk!s!19!Ring!Dial!SIP/5547740400/0059144681666,300,!47740400!!!3!10!(None)!1428426574.169850
SIP/119-00014c26!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/016255863252,300,!47740413!!!3!593!(None)!1428425991.169113
SIP/119-00014d1a!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/5552716011,300,!47740413!!!3!383!(None)!1428426201.169436
SIP/119-00014d4d!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/5556802622,300,!47740413!!!3!327!(None)!1428426257.169493
SIP/120-00014d5e!macro-dial-one!s!37!Up!Dial!SIP/230,,trT!120!!!3!314!SIP/230-00014d5f!1428426270.169510
SIP/121-00014c24!EjecutivoROLLRATE!9014!1!Up!AppQueue!(Outgoing 
Line)!121!!!3!596!(None)!1428425988.169111
SIP/122-00014b56!EjecutivoQUADS!93000!1!Up!AppQueue!(Outgoing 
Line)!122!!!3!677!(None)!1428425906.168693
SIP/123-00014d53!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740410/017222497260,300,!47740410!!!3!320!(None)!1428426264.169499
SIP/123-00014e35!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740410/017222497260,300,!47740410!!!3!121!(None)!1428426463.169735
SIP/123-00014e9e!macro-dialout-trunk!s!19!Ring!Dial!SIP/5547740410/5556350254,300,!47740410!!!3!13!(None)!1428426570.169844

Re: [asterisk-users] Help debugging a possible SIP channel leak in 11.17.0, possible race condition

2015-04-07 Thread Alex Villací­s Lasso

El 07/04/15 a las 17:38, Alex Villací­s Lasso escribió:

I am trying to collect enough information about an problem a client is having 
with its asterisk 11.17.0  x86_64. This issue was observed before in 1.8.20, 
and we upgraded to 11.15.0 and then to 11.17.0 with no solution.

Background: this client is a telemarketing call-center that generates outgoing calls with close to a hundred agents operating simultaneously in peak hours. The system uses asterisk with FreePBX 2.8. In order to generate the calls, I wrote a program that 
connects to Asterisk using the AMI protocol. This program expects the SIP agent extensions to be assigned as members of queues, of which there are about 20, as shown below:


9007 has 0 calls (max unlimited) in 'random' strategy (5s holdtime, 68s 
talktime), W:0, C:581, A:260, SL:82.6% within 60s
   Members:
  SIP/147 (ringinuse disabled) (dynamic) (On Hold) has taken 21 calls (last 
was 800 secs ago)
  SIP/417 (ringinuse disabled) (dynamic) (In use) has taken 77 calls (last 
was 708 secs ago)
  SIP/416 (ringinuse disabled) (dynamic) (In use) has taken 41 calls (last 
was 656 secs ago)
  SIP/408 (ringinuse disabled) (dynamic) (In use) has taken 50 calls (last 
was 789 secs ago)
   No Callers

The program runs queue show through AMI every few seconds. For each queue to be used in telemarketing, the program counts the number of members that are Not In Use. If at least one is found, it reads that many phone numbers from the database and uses 
the AMI Originate command on each one, as follows:


Action: Originate
Channel: Local/NN@from-internal
Exten: 
Context: from-internal
Priority: 1
Async: true
ActionID: xxx

Here, NN is the number read from the database and  is the queue extension in the FreePBX-created context that eventually runs the Queue() dialplan application for the corresponding queue. This causes the call to be connected between the 
outgoing number and the queue, and is then assigned to a queue member by Asterisk. The dialplan is configured to route NN through one of a series of SIP trunks using the outbound routes as configured by FreePBX.


The issue is that although this strategy works correctly on the user's machine for a few days, we have been observing that eventually the application stops placing calls. The agents are all idle (all 90 to 100 of them), but the queue show command shows 
them to be In Use on all queues. Furthermore, in normal operation, the core show channels command shows at most one channel for each configured SIP client in the Up state, but when calls stop being placed, the same command reports multiple channels 
in the Up state, as follows (after sorting):


Local/9757007441@from-internal-a447;2!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740412/5557007441,300,!47740412!!!3!572!(None)!1428426012.169192
Local/9759315789@from-internal-a456;1ZOMBIE!from-trunk-sip-5547740412!!1!Up!AppDial!(Outgoing
 Line)!9759315789!!!3!500!(None)!1428426084.169326
Local/9759315789@from-internal-a456;2!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740412/5559315789,300,!47740412!!!3!500!(None)!1428426084.169323
SIP/104-00014c61!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/0453511309468,300,!47740413!!!3!562!SIP/5547740413-00014c62!1428426022.169224
SIP/110-00014c2b!EjecutivoROLLRATE!9014!1!Up!AppQueue!(Outgoing 
Line)!110!!!3!590!(None)!1428425994.169124
SIP/110-00014e4e!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/5552114757,300,!47740413!!!3!92!(None)!1428426491.169760
SIP/113-00014c8c!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740420/0016499465293,300,!47740420!!!3!532!(None)!1428426052.169273
SIP/114-00014ce6!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740410/040,300,!47740410!!!3!430!(None)!1428426154.169384
SIP/115-00014ea4!macro-dialout-trunk!s!19!Ring!Dial!SIP/5547740400/0059144681666,300,!47740400!!!3!10!(None)!1428426574.169850
SIP/119-00014c26!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/016255863252,300,!47740413!!!3!593!(None)!1428425991.169113
SIP/119-00014d1a!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/5552716011,300,!47740413!!!3!383!(None)!1428426201.169436
SIP/119-00014d4d!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740413/5556802622,300,!47740413!!!3!327!(None)!1428426257.169493
SIP/120-00014d5e!macro-dial-one!s!37!Up!Dial!SIP/230,,trT!120!!!3!314!SIP/230-00014d5f!1428426270.169510
SIP/121-00014c24!EjecutivoROLLRATE!9014!1!Up!AppQueue!(Outgoing 
Line)!121!!!3!596!(None)!1428425988.169111
SIP/122-00014b56!EjecutivoQUADS!93000!1!Up!AppQueue!(Outgoing 
Line)!122!!!3!677!(None)!1428425906.168693
SIP/123-00014d53!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740410/017222497260,300,!47740410!!!3!320!(None)!1428426264.169499
SIP/123-00014e35!macro-dialout-trunk!s!19!Up!Dial!SIP/5547740410/017222497260,300,!47740410!!!3!121!(None)!1428426463.169735
SIP/123-00014e9e!macro-dialout-trunk!s!19!Ring!Dial!SIP/5547740410/5556350254,300,!47740410!!!3!13!(None)!1428426570.169844
SIP/125-00014bc7!macro-dialout

[asterisk-users] Problems linking asterisk against self-compiled openssl on CentOS 5

2014-12-23 Thread Alex Villací­s Lasso
I am trying to enable full WebRTC support on asterisk-11.15 for installation on a CentOS 5 machine. Currently the distro cannot be upgraded to any later CentOS series. This CentOS series ships with openssl-0.9.8e, which lacks DTLS-SRTP support required for 
WebRTC. So I decided to build a parallel install of openssl. I chose the Fedora 21 package, openssl-1.0.1j, and built it on CentOS 5. The libraries now reside at /opt/openssl101/usr/lib with header files at /opt/openssl101/usr/include/openssl/ . There are 
symbolic links at /usr/lib64/libssl.so.10 and /usr/lib64/libcrypto.so.10 pointing into my upgraded openssl.


Now I am trying to compile asterisk and link it with my openssl. My configure 
invocation is as follows:

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-misdn --with-sounds-cache=no --with-srtp --with-ssl=/opt/openssl101/usr 
--with-crypto=/opt/openssl101/usr


Note the --with-ssl and --with-crypto options at the end, pointing to my 
openssl directory.

After this I compile, but I am getting these messages when compilation reaches 
res/res_rtp_asterisk.c:

a - output/pjlib-x86_64-redhat-linux-gnu/sock_qos_bsd.o
a - output/pjlib-x86_64-redhat-linux-gnu/ssl_sock_common.o
a - output/pjlib-x86_64-redhat-linux-gnu/ssl_sock_ossl.o
a - output/pjlib-x86_64-redhat-linux-gnu/ssl_sock_dump.o
a - output/pjlib-x86_64-redhat-linux-gnu/string.o
a - output/pjlib-x86_64-redhat-linux-gnu/timer.o
a - output/pjlib-x86_64-redhat-linux-gnu/types.o
   [CC] res_rtp_asterisk.c - res_rtp_asterisk.o
res_rtp_asterisk.c: In function 'ast_rtp_dtls_set_configuration':
res_rtp_asterisk.c:1278: warning: implicit declaration of function 
'SSL_CTX_set_tlsext_use_srtp'
res_rtp_asterisk.c: In function 'dtls_srtp_handle_timeout':
res_rtp_asterisk.c:1765: warning: implicit declaration of function 
'DTLSv1_handle_timeout'
res_rtp_asterisk.c: In function 'dtls_srtp_check_pending':
res_rtp_asterisk.c:1817: warning: implicit declaration of function 
'DTLSv1_get_timeout'
res_rtp_asterisk.c: In function 'dtls_srtp_setup':
res_rtp_asterisk.c:1904: warning: implicit declaration of function 
'SSL_export_keying_material'
   [LD] res_rtp_asterisk.o - res_rtp_asterisk.so
   [CC] res_rtp_multicast.c - res_rtp_multicast.o
   [LD] res_rtp_multicast.o - res_rtp_multicast.so

After this, res_rtp_asterisk.so cannot be loaded because it is linked to the 
system openssl but requests the symbols from the upgraded openssl:

[2014-12-22 20:19:41] WARNING[25901] loader.c: Error loading module 
'res_rtp_asterisk.so': /usr/lib64/asterisk/modules/res_rtp_asterisk.so: 
undefined symbol: DTLSv1_handle_timeout

[root@rpmbuild64-2 ~]# ldd /usr/lib64/asterisk/modules/res_rtp_asterisk.so
linux-vdso.so.1 =  (0x7fff431fd000)
libuuid.so.1 = /lib64/libuuid.so.1 (0x2b3f92461000)
libm.so.6 = /lib64/libm.so.6 (0x2b3f92665000)
libnsl.so.1 = /lib64/libnsl.so.1 (0x2b3f928e9000)
librt.so.1 = /lib64/librt.so.1 (0x2b3f92b01000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2b3f92d0a000)
libcrypto.so.6 = /lib64/libcrypto.so.6 (0x2b3f92f27000)
libssl.so.6 = /lib64/libssl.so.6 (0x2b3f93278000)
libc.so.6 = /lib64/libc.so.6 (0x2b3f934c6000)
/lib64/ld-linux-x86-64.so.2 (0x0037c240)
libdl.so.2 = /lib64/libdl.so.2 (0x2b3f9382)
libz.so.1 = /lib64/libz.so.1 (0x2b3f93a24000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 (0x2b3f93c38000)
libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2b3f93e67000)
libcom_err.so.2 = /lib64/libcom_err.so.2 (0x2b3f940fc000)
libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3 (0x2b3f942fe000)
libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0 (0x2b3f94524000)
libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x2b3f9472c000)
libresolv.so.2 = /lib64/libresolv.so.2 (0x2b3f9492e000)
libselinux.so.1 = /lib64/libselinux.so.1 (0x2b3f94b44000)
libsepol.so.1 = /lib64/libsepol.so.1 (0x2b3f94d5c000)
(using libcrypto.so.6 and libssl.so.6 from system openssl)

However, libasteriskssl.so is correctly linked against my upgraded openssl:

[root@rpmbuild64-2 ~]# ldd /usr/lib64/libasteriskssl.so.1
linux-vdso.so.1 =  (0x7fffac39)
libssl.so.10 = /usr/lib64/libssl.so.10 (0x2aef0cfb4000)
libcrypto.so.10 = /usr/lib64/libcrypto.so.10 (0x2aef0d21d000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2aef0d5f2000)
libc.so.6 = /lib64/libc.so.6 (0x2aef0d80e000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 (0x2aef0db67000)
libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2aef0dd96000)
libcom_err.so.2 = 

Re: [asterisk-users] Problems linking asterisk against self-compiled openssl on CentOS 5

2014-12-23 Thread Alex Villací­s Lasso

El 23/12/14 a las 12:19, Alex Villací­s Lasso escribió:
I am trying to enable full WebRTC support on asterisk-11.15 for installation on a CentOS 5 machine. Currently the distro cannot be upgraded to any later CentOS series. This CentOS series ships with openssl-0.9.8e, which lacks DTLS-SRTP support required 
for WebRTC. So I decided to build a parallel install of openssl. I chose the Fedora 21 package, openssl-1.0.1j, and built it on CentOS 5. The libraries now reside at /opt/openssl101/usr/lib with header files at /opt/openssl101/usr/include/openssl/ . 
There are symbolic links at /usr/lib64/libssl.so.10 and /usr/lib64/libcrypto.so.10 pointing into my upgraded openssl.


Now I am trying to compile asterisk and link it with my openssl. My configure 
invocation is as follows:

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-misdn --with-sounds-cache=no --with-srtp --with-ssl=/opt/openssl101/usr 
--with-crypto=/opt/openssl101/usr


Note the --with-ssl and --with-crypto options at the end, pointing to my 
openssl directory.

After this I compile, but I am getting these messages when compilation reaches 
res/res_rtp_asterisk.c:

a - output/pjlib-x86_64-redhat-linux-gnu/sock_qos_bsd.o
a - output/pjlib-x86_64-redhat-linux-gnu/ssl_sock_common.o
a - output/pjlib-x86_64-redhat-linux-gnu/ssl_sock_ossl.o
a - output/pjlib-x86_64-redhat-linux-gnu/ssl_sock_dump.o
a - output/pjlib-x86_64-redhat-linux-gnu/string.o
a - output/pjlib-x86_64-redhat-linux-gnu/timer.o
a - output/pjlib-x86_64-redhat-linux-gnu/types.o
   [CC] res_rtp_asterisk.c - res_rtp_asterisk.o
res_rtp_asterisk.c: In function 'ast_rtp_dtls_set_configuration':
res_rtp_asterisk.c:1278: warning: implicit declaration of function 
'SSL_CTX_set_tlsext_use_srtp'
res_rtp_asterisk.c: In function 'dtls_srtp_handle_timeout':
res_rtp_asterisk.c:1765: warning: implicit declaration of function 
'DTLSv1_handle_timeout'
res_rtp_asterisk.c: In function 'dtls_srtp_check_pending':
res_rtp_asterisk.c:1817: warning: implicit declaration of function 
'DTLSv1_get_timeout'
res_rtp_asterisk.c: In function 'dtls_srtp_setup':
res_rtp_asterisk.c:1904: warning: implicit declaration of function 
'SSL_export_keying_material'
   [LD] res_rtp_asterisk.o - res_rtp_asterisk.so
   [CC] res_rtp_multicast.c - res_rtp_multicast.o
   [LD] res_rtp_multicast.o - res_rtp_multicast.so

After this, res_rtp_asterisk.so cannot be loaded because it is linked to the 
system openssl but requests the symbols from the upgraded openssl:

[2014-12-22 20:19:41] WARNING[25901] loader.c: Error loading module 
'res_rtp_asterisk.so': /usr/lib64/asterisk/modules/res_rtp_asterisk.so: 
undefined symbol: DTLSv1_handle_timeout

[root@rpmbuild64-2 ~]# ldd /usr/lib64/asterisk/modules/res_rtp_asterisk.so
linux-vdso.so.1 =  (0x7fff431fd000)
libuuid.so.1 = /lib64/libuuid.so.1 (0x2b3f92461000)
libm.so.6 = /lib64/libm.so.6 (0x2b3f92665000)
libnsl.so.1 = /lib64/libnsl.so.1 (0x2b3f928e9000)
librt.so.1 = /lib64/librt.so.1 (0x2b3f92b01000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2b3f92d0a000)
libcrypto.so.6 = /lib64/libcrypto.so.6 (0x2b3f92f27000)
libssl.so.6 = /lib64/libssl.so.6 (0x2b3f93278000)
libc.so.6 = /lib64/libc.so.6 (0x2b3f934c6000)
/lib64/ld-linux-x86-64.so.2 (0x0037c240)
libdl.so.2 = /lib64/libdl.so.2 (0x2b3f9382)
libz.so.1 = /lib64/libz.so.1 (0x2b3f93a24000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 (0x2b3f93c38000)
libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2b3f93e67000)
libcom_err.so.2 = /lib64/libcom_err.so.2 (0x2b3f940fc000)
libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3 (0x2b3f942fe000)
libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0 (0x2b3f94524000)
libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x2b3f9472c000)
libresolv.so.2 = /lib64/libresolv.so.2 (0x2b3f9492e000)
libselinux.so.1 = /lib64/libselinux.so.1 (0x2b3f94b44000)
libsepol.so.1 = /lib64/libsepol.so.1 (0x2b3f94d5c000)
(using libcrypto.so.6 and libssl.so.6 from system openssl)

However, libasteriskssl.so is correctly linked against my upgraded openssl:

[root@rpmbuild64-2 ~]# ldd /usr/lib64/libasteriskssl.so.1
linux-vdso.so.1 =  (0x7fffac39)
libssl.so.10 = /usr/lib64/libssl.so.10 (0x2aef0cfb4000)
libcrypto.so.10 = /usr/lib64/libcrypto.so.10 (0x2aef0d21d000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2aef0d5f2000)
libc.so.6 = /lib64/libc.so.6 (0x2aef0d80e000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 (0x2aef0db67000)
libkrb5.so.3 = /usr/lib64

Re: [asterisk-users] asterisk and elastix

2014-11-24 Thread Alex Villací­s Lasso

El 24/11/14 a las 10:59, Salaheddine Elharit escribió:


Hello list,

i have installed elastix 2.4.0 with call center model and i have created an Outgoing 
Calls https://192.168.1.251/index.php?menu=outgoing_calls my question i want 
to know the name of the tbale where the csv file is uploaded in order to do some 
works.

NB: i found the cdr table in asteriskcdrdb database but the is no information 
related to my csv file



Not exactly the right list. Please repost in the Elastix mailing lists. 
Additionally, please specify yours is a question abount the Elastix Call Center 
module.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Making sense of SDP for debugging of missing audio in SIP trunk

2014-06-20 Thread Alex Villací­s Lasso

El 18/06/14 13:44, Alex Villací­s Lasso escribió:
I am debugging an intermittent issue of missing audio on calls that come from a SIP provider into our asterisk-11.10 installation. Sometimes, incoming calls from this provider work correctly, with audio streaming in both directions. Other times, with the 
same setup, the calling party is unable to hear the IVR recording from the asterisk installation, although in fact the streaming is supposed to have started. When debugging with tcpdump, I have seen that all the successful calls have SDP negotiation that 
look like this:


(inside INVITE request body from SIP carrier)
v=0
o=msw.chance4minutes.net 1234 0 IN IP4 38.126.208.46
s=sip call
c=IN IP4 38.126.208.46
t=0 0
m=audio 30552 RTP/AVP 18 0 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:20

(inside 200 OK response body from asterisk)
v=0
o=root 835643920 835643920 IN IP4 201.234.196.171
s=Asterisk PBX 11.10.0
c=IN IP4 201.234.196.171
t=0 0
m=audio 12112 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
a=nortpproxy:yes


In contrast, all failing calls have SDP negotiation that looks like this:

(inside INVITE request body from SIP carrier)
v=0
o=msw.chance4minutes.net 1234 0 IN IP4 38.126.208.46
s=sip call
c=IN IP4 38.126.208.46
t=0 0
m=audio 30534 RTP/AVP 0 18
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=sendrecv

(inside 200 OK response body from asterisk)
v=0
o=root 1719775538 1719775538 IN IP4 201.234.196.171
s=Asterisk PBX 11.10.0
c=IN IP4 201.234.196.171
t=0 0
m=audio 11678 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=sendrecv
a=nortpproxy:yes

Apart from this, I see RTP packets being exchanged in both directions in both 
scenarios.

From what I can see, the SIP provider sends packets that differ in that the 
following four properties are present in the successful case and missing in the 
failing case:
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=maxptime:20

What can I deduce from this? Is there some configuration on my asterisk that 
can be tweaked so the failing requests can be handled properly?



Is there additional information needed to make sense of this scenario?



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Making sense of SDP for debugging of missing audio in SIP trunk

2014-06-18 Thread Alex Villací­s Lasso
I am debugging an intermittent issue of missing audio on calls that come from a SIP provider into our asterisk-11.10 installation. Sometimes, incoming calls from this provider work correctly, with audio streaming in both directions. Other times, with the 
same setup, the calling party is unable to hear the IVR recording from the asterisk installation, although in fact the streaming is supposed to have started. When debugging with tcpdump, I have seen that all the successful calls have SDP negotiation that 
look like this:


(inside INVITE request body from SIP carrier)
v=0
o=msw.chance4minutes.net 1234 0 IN IP4 38.126.208.46
s=sip call
c=IN IP4 38.126.208.46
t=0 0
m=audio 30552 RTP/AVP 18 0 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=maxptime:20

(inside 200 OK response body from asterisk)
v=0
o=root 835643920 835643920 IN IP4 201.234.196.171
s=Asterisk PBX 11.10.0
c=IN IP4 201.234.196.171
t=0 0
m=audio 12112 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
a=nortpproxy:yes


In contrast, all failing calls have SDP negotiation that looks like this:

(inside INVITE request body from SIP carrier)
v=0
o=msw.chance4minutes.net 1234 0 IN IP4 38.126.208.46
s=sip call
c=IN IP4 38.126.208.46
t=0 0
m=audio 30534 RTP/AVP 0 18
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=sendrecv

(inside 200 OK response body from asterisk)
v=0
o=root 1719775538 1719775538 IN IP4 201.234.196.171
s=Asterisk PBX 11.10.0
c=IN IP4 201.234.196.171
t=0 0
m=audio 11678 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=sendrecv
a=nortpproxy:yes

Apart from this, I see RTP packets being exchanged in both directions in both 
scenarios.

From what I can see, the SIP provider sends packets that differ in that the 
following four properties are present in the successful case and missing in the 
failing case:
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=maxptime:20

What can I deduce from this? Is there some configuration on my asterisk that 
can be tweaked so the failing requests can be handled properly?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Login by AMI ok, by AJAM fails

2014-05-16 Thread Alex Villací­s Lasso

El 16/05/14 16:01, Michael L. Young escribió:

- Original Message -

From: Michael L. Young myo...@acsacc.com
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Friday, May 16, 2014 4:55:30 PM
Subject: Re: [asterisk-users] Login by AMI ok, by AJAM fails

- Original Message -

From: Michelle Dupuis mdup...@ocg.ca
To: Asterisk Users List asterisk-users@lists.digium.com
Sent: Friday, May 16, 2014 4:29:05 PM
Subject: Re: [asterisk-users] Login by AMI ok, by AJAM fails

From: asterisk-users-boun...@lists.digium.com
asterisk-users-boun...@lists.digium.com on behalf of Michael L.
Young myo...@acsacc.com
Sent: Friday, May 16, 2014 4:16 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Login by AMI ok, by AJAM fails

Have you taken a look at the Wiki yet?

https://wiki.asterisk.org/wiki/display/AST/Allow+Manager+Access+via+HTTP

In looking at that, I see some mistakes in what you are trying to
do.
  Please take a look at that and give it a try.

Well, you need to login first.  Since you are using cURL, you need to
turn the cookie engine on so that it will store and send cookies.

Also, you need to send the login request to
http://localhost:5039/asterisk/manager?action=loginuser=testsecret=test;
and not rawman.  Once you are logged in, then you can get raw
manager output.

I hope that helps.

Michael

Sorry that I messed up the thread while trying to un-top post your message.  
The above was in response to your prior message:


I've done all of that (and I set the AJAM to listen to 5039).  What mistakes do 
you see?

Michael


Sorry if this is already blatantly obvious, but the ampersand character is a 
special character for the shell. The entire URL should be enclosed in single 
quotes in order to send literal ampersands separating the query parameters:

root@apbx:/tmp# curl  
http://localhost:5039/asterisk/rawman?action=loginuser=testsecret=test
[1] 15548
[2] 15549
root@pbx:/tmp# Response: Error
Message: Authentication failed
[1]-  Donecurl 
http://localhost:5039/asterisk/rawman?action=login
[2]+  Doneuser=test

The [1]  and [2]  show that the shell is (incorrectly) spawning 
separate background processes for what it believes are separate commands. Not 
what you want.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Proper way to make Asterisk recognize SIP trunk of incoming INVITE when IP is not available

2014-05-02 Thread Alex Villací­s Lasso

El 27/04/14 07:47, Barry Flanagan escribió:

On 26 April 2014 00:29, Alex Villací­s Lasso a_villa...@palosanto.com 
mailto:a_villa...@palosanto.com wrote:

I am currently preparing a kamailio-asterisk combination. The asterisk 
installation uses realtime for SIP. The kamailio configuration was based on the 
reference at 
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb but 
has
been heavily modified. Currently asterisk runs on localhost and only 
listens on SIP/RTP at 127.0.0.1 . Therefore, all of the SIP traffic appears to 
come from localhost, from the point of view of asterisk.

Currently I have a model on which internal SIP phones get identified by the 
authentication username, and then the contact names at From: and To: get 
massaged to incorporate the SIP domain, in order to emulate multiple-domain 
support. The 'sip' table
in Asterisk defines all such contacts as SIP accounts of the form name_domain.com 
http://name_domain.com, and the SIP phones are configured to use 'name' as 
authentication username for domain 'domain.com http://domain.com'. However, SIP 
providers
that register on the server with authentication names are left with their 
original names, since in the model, SIP trunks are available to all domains.

Now I have to add support for SIP providers which are to be authorized on 
the basis of IP only. Apparently, the kamailio module permissions.so 
(WITH_IPAUTH) is made for just this purpose, so I enabled it. After 
authentication, I need to route the
INVITE to asterisk, and asterisk must somehow match the account for the SIP 
trunk from the available information on the INVITE request.



What I have done in a similar situation is to use  force_send_socket in Kamailio when sending INVITEs from your trusted host (your trunks) so that it is coming in to Asterisk from a different port (say 5070), and then in your Asterisk sip.conf settings 
create a new peer for this like so:


[peer-incoming]
context=peercontext
type=peer
host=127.0.0.1
port=5070

Now, when Asterisk receives an INVITE from 127.0.0.1:5070 http://127.0.0.1:5070 it 
will match this peer, whereas the rest, coming from 127.0.0.1:5060 
http://127.0.0.1:5060, will match your other subscribers.

Here is a bit of the Kamailio config:

if (is_method(INVITE))
{
# If call is coming from a trusted source (Trunk/PSTN) then we send it 
to Asterisk from port 5070
# so that Asterisk knows this is not coming from a subscriber. The peer 
in Asterisk needs to be set with port=5070
# as well as the host=ip address
if (allow_trusted())
{
xlog(L_INFO,Inbound to Asterisk from Trusted Source IP $si, Caller: 
$fU, Callee: $rU with Call-ID $hdr(Call-ID));
force_send_socket(127.0.0.1:5070 http://127.0.0.1:5070);
} else {
# This is a call from a registered subscriber.
xlog(L_INFO,Inbound to Asterisk from $fU to $rU with Call-ID 
$hdr(Call-ID));
}
}
route(RELAY);
exit;
}

NOTE: Kamailio must be set to listen on 127.0.0.1:5070 http://127.0.0.1:5070 as well as your usual ports for this to work! Also, your SIP Trunk trusted peers need to be in the Kamailio trusted table, or explicitly test for the src_ip rather than use 
allow_trusted().



I would rather have a solution that does not involve allocating a new UDP port 
every time a new IP-trusted SIP trunk is configured.

I tried appending a P-Asserted Identity header to the incoming INVITE before 
routing it to asterisk, like this:

#!ifdef WITH_IPAUTH
if((!is_method(REGISTER))  allow_source_address()  $au == )
{
# Attempt to create a P-Asserted-Identity if none exists, to preserve
# incoming Caller-ID
if (!is_present_hf(P-Asserted-Identity))
{
append_hf(P-Asserted-Identity: sip:$fU@$fd\r\n);
}

# Loading $fU from database using IP
sql_pvquery(elxpbx, SELECT name FROM sip WHERE host = '$si' AND sippasswd IS 
NULL, $fU);

# source IP allowed
return;
}
#!endif

With tcpdump, I can see that the header is indeed appended to the SIP headers of the INVITE, but there is no effect in Asterisk. From examination of the Asterisk 11.8.1 source code, I see that channels/chan_sip.c contains a get_pai() function that is 
supposed to process P-Asserted-Identity and extract a caller ID. I am still studying the code, but I would appreciate help on this issue, to see why my attempt is not working.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Proper way to make Asterisk recognize SIP trunk of incoming INVITE when IP is not available

2014-05-02 Thread Alex Villací­s Lasso

El 02/05/14 10:49, Alex Villací­s Lasso escribió:

El 27/04/14 07:47, Barry Flanagan escribió:

On 26 April 2014 00:29, Alex Villací­s Lasso a_villa...@palosanto.com 
mailto:a_villa...@palosanto.com wrote:

I am currently preparing a kamailio-asterisk combination. The asterisk 
installation uses realtime for SIP. The kamailio configuration was based on the 
reference at 
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb but 
has
been heavily modified. Currently asterisk runs on localhost and only 
listens on SIP/RTP at 127.0.0.1 . Therefore, all of the SIP traffic appears to 
come from localhost, from the point of view of asterisk.

Currently I have a model on which internal SIP phones get identified by the 
authentication username, and then the contact names at From: and To: get 
massaged to incorporate the SIP domain, in order to emulate multiple-domain 
support. The 'sip' table
in Asterisk defines all such contacts as SIP accounts of the form name_domain.com 
http://name_domain.com, and the SIP phones are configured to use 'name' as 
authentication username for domain 'domain.com http://domain.com'. However, SIP
providers that register on the server with authentication names are left 
with their original names, since in the model, SIP trunks are available to all 
domains.

Now I have to add support for SIP providers which are to be authorized on 
the basis of IP only. Apparently, the kamailio module permissions.so 
(WITH_IPAUTH) is made for just this purpose, so I enabled it. After 
authentication, I need to route the
INVITE to asterisk, and asterisk must somehow match the account for the SIP 
trunk from the available information on the INVITE request.



What I have done in a similar situation is to use  force_send_socket in Kamailio when sending INVITEs from your trusted host (your trunks) so that it is coming in to Asterisk from a different port (say 5070), and then in your Asterisk sip.conf settings 
create a new peer for this like so:


[peer-incoming]
context=peercontext
type=peer
host=127.0.0.1
port=5070

Now, when Asterisk receives an INVITE from 127.0.0.1:5070 http://127.0.0.1:5070 it 
will match this peer, whereas the rest, coming from 127.0.0.1:5060 
http://127.0.0.1:5060, will match your other subscribers.

Here is a bit of the Kamailio config:

if (is_method(INVITE))
{
# If call is coming from a trusted source (Trunk/PSTN) then we send it 
to Asterisk from port 5070
# so that Asterisk knows this is not coming from a subscriber. The peer 
in Asterisk needs to be set with port=5070
# as well as the host=ip address
if (allow_trusted())
{
xlog(L_INFO,Inbound to Asterisk from Trusted Source IP $si, Caller: 
$fU, Callee: $rU with Call-ID $hdr(Call-ID));
force_send_socket(127.0.0.1:5070 http://127.0.0.1:5070);
} else {
# This is a call from a registered subscriber.
xlog(L_INFO,Inbound to Asterisk from $fU to $rU with Call-ID 
$hdr(Call-ID));
}
}
route(RELAY);
exit;
}

NOTE: Kamailio must be set to listen on 127.0.0.1:5070 http://127.0.0.1:5070 as well as your usual ports for this to work! Also, your SIP Trunk trusted peers need to be in the Kamailio trusted table, or explicitly test for the src_ip rather than use 
allow_trusted().



I would rather have a solution that does not involve allocating a new UDP port 
every time a new IP-trusted SIP trunk is configured.

I tried appending a P-Asserted Identity header to the incoming INVITE before 
routing it to asterisk, like this:

#!ifdef WITH_IPAUTH
if((!is_method(REGISTER))  allow_source_address()  $au == )
{
# Attempt to create a P-Asserted-Identity if none exists, to preserve
# incoming Caller-ID
if (!is_present_hf(P-Asserted-Identity))
{
append_hf(P-Asserted-Identity: sip:$fU@$fd\r\n);
}

# Loading $fU from database using IP
sql_pvquery(elxpbx, SELECT name FROM sip WHERE host = '$si' AND sippasswd IS 
NULL, $fU);

# source IP allowed
return;
}
#!endif

With tcpdump, I can see that the header is indeed appended to the SIP headers of the INVITE, but there is no effect in Asterisk. From examination of the Asterisk 11.8.1 source code, I see that channels/chan_sip.c contains a get_pai() function that is 
supposed to process P-Asserted-Identity and extract a caller ID. I am still studying the code, but I would appreciate help on this issue, to see why my attempt is not working.



By placing debugging statements, I think get_pai() is not being called when receiving an incoming INVITE, corresponding to an incoming call from the IP-authenticated trunk being handled by an IVR, but not yet routed to an internal extension. Why is this 
so? Is this by design?
-- 
_
-- Bandwidth and Colocation Provided by http://www.api

[asterisk-users] SOLVED: Re: Proper way to make Asterisk recognize SIP trunk of incoming INVITE when IP is not available

2014-05-02 Thread Alex Villací­s Lasso

El 02/05/14 11:41, Alex Villací­s Lasso escribió:

El 02/05/14 10:49, Alex Villací­s Lasso escribió:

El 27/04/14 07:47, Barry Flanagan escribió:

On 26 April 2014 00:29, Alex Villací­s Lasso a_villa...@palosanto.com 
mailto:a_villa...@palosanto.com wrote:

I am currently preparing a kamailio-asterisk combination. The asterisk 
installation uses realtime for SIP. The kamailio configuration was based on the 
reference at 
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb but 
has
been heavily modified. Currently asterisk runs on localhost and only 
listens on SIP/RTP at 127.0.0.1 . Therefore, all of the SIP traffic appears to 
come from localhost, from the point of view of asterisk.

Currently I have a model on which internal SIP phones get identified by the 
authentication username, and then the contact names at From: and To: get 
massaged to incorporate the SIP domain, in order to emulate multiple-domain 
support. The 'sip'
table in Asterisk defines all such contacts as SIP accounts of the form name_domain.com 
http://name_domain.com, and the SIP phones are configured to use 'name' as 
authentication username for domain 'domain.com http://domain.com'. However, SIP
providers that register on the server with authentication names are left 
with their original names, since in the model, SIP trunks are available to all 
domains.

Now I have to add support for SIP providers which are to be authorized on 
the basis of IP only. Apparently, the kamailio module permissions.so 
(WITH_IPAUTH) is made for just this purpose, so I enabled it. After 
authentication, I need to route the
INVITE to asterisk, and asterisk must somehow match the account for the SIP 
trunk from the available information on the INVITE request.



What I have done in a similar situation is to use  force_send_socket in Kamailio when sending INVITEs from your trusted host (your trunks) so that it is coming in to Asterisk from a different port (say 5070), and then in your Asterisk sip.conf settings 
create a new peer for this like so:


[peer-incoming]
context=peercontext
type=peer
host=127.0.0.1
port=5070

Now, when Asterisk receives an INVITE from 127.0.0.1:5070 http://127.0.0.1:5070 it 
will match this peer, whereas the rest, coming from 127.0.0.1:5060 
http://127.0.0.1:5060, will match your other subscribers.

Here is a bit of the Kamailio config:

if (is_method(INVITE))
{
# If call is coming from a trusted source (Trunk/PSTN) then we send it 
to Asterisk from port 5070
# so that Asterisk knows this is not coming from a subscriber. The peer 
in Asterisk needs to be set with port=5070
# as well as the host=ip address
if (allow_trusted())
{
xlog(L_INFO,Inbound to Asterisk from Trusted Source IP $si, Caller: 
$fU, Callee: $rU with Call-ID $hdr(Call-ID));
force_send_socket(127.0.0.1:5070 http://127.0.0.1:5070);
} else {
# This is a call from a registered subscriber.
xlog(L_INFO,Inbound to Asterisk from $fU to $rU with Call-ID 
$hdr(Call-ID));
}
}
route(RELAY);
exit;
}

NOTE: Kamailio must be set to listen on 127.0.0.1:5070 http://127.0.0.1:5070 as well as your usual ports for this to work! Also, your SIP Trunk trusted peers need to be in the Kamailio trusted table, or explicitly test for the src_ip rather than use 
allow_trusted().



I would rather have a solution that does not involve allocating a new UDP port 
every time a new IP-trusted SIP trunk is configured.

I tried appending a P-Asserted Identity header to the incoming INVITE before 
routing it to asterisk, like this:

#!ifdef WITH_IPAUTH
if((!is_method(REGISTER))  allow_source_address()  $au == )
{
# Attempt to create a P-Asserted-Identity if none exists, to preserve
# incoming Caller-ID
if (!is_present_hf(P-Asserted-Identity))
{
append_hf(P-Asserted-Identity: sip:$fU@$fd\r\n);
}

# Loading $fU from database using IP
sql_pvquery(elxpbx, SELECT name FROM sip WHERE host = '$si' AND sippasswd IS 
NULL, $fU);

# source IP allowed
return;
}
#!endif

With tcpdump, I can see that the header is indeed appended to the SIP headers of the INVITE, but there is no effect in Asterisk. From examination of the Asterisk 11.8.1 source code, I see that channels/chan_sip.c contains a get_pai() function that is 
supposed to process P-Asserted-Identity and extract a caller ID. I am still studying the code, but I would appreciate help on this issue, to see why my attempt is not working.



By placing debugging statements, I think get_pai() is not being called when receiving an incoming INVITE, corresponding to an incoming call from the IP-authenticated trunk being handled by an IVR, but not yet routed to an internal extension. Why is this 
so? Is this by design?




SOLVED: asterisk needs to be configured with trustrpid=yes in the affected

[asterisk-users] Proper way to make Asterisk recognize SIP trunk of incoming INVITE when IP is not available

2014-04-25 Thread Alex Villací­s Lasso
I am currently preparing a kamailio-asterisk combination. The asterisk installation uses realtime for SIP. The kamailio configuration was based on the reference at http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb but has been 
heavily modified. Currently asterisk runs on localhost and only listens on SIP/RTP at 127.0.0.1 . Therefore, all of the SIP traffic appears to come from localhost, from the point of view of asterisk.


Currently I have a model on which internal SIP phones get identified by the authentication username, and then the contact names at From: and To: get massaged to incorporate the SIP domain, in order to emulate multiple-domain support. The 'sip' table in 
Asterisk defines all such contacts as SIP accounts of the form name_domain.com, and the SIP phones are configured to use 'name' as authentication username for domain 'domain.com'. However, SIP providers that register on the server with authentication names 
are left with their original names, since in the model, SIP trunks are available to all domains.


Now I have to add support for SIP providers which are to be authorized on the basis of IP only. Apparently, the kamailio module permissions.so (WITH_IPAUTH) is made for just this purpose, so I enabled it. After authentication, I need to route the INVITE to 
asterisk, and asterisk must somehow match the account for the SIP trunk from the available information on the INVITE request.


A typical INVITE for this scenario looks like this, before being processed by 
kamailio:

INVITE sip:6008010@172.28.161.218:5060;transport=udp;user=phone SIP/2.0
Via: SIP/2.0/UDP 
200.25.144.58:5060;branch=z9hG4bK+676ea13f680e853fd847230512a347561+32e3da76+1
Call-ID: FBE75B3A@32e3da76
From: 
sip:042294440@200.25.144.58:5060;user=phone;tag=32e3da76+1+544c000c+52be771c
To: sip:6008010@172.28.161.218:5060;user=phone
CSeq: 975469826 INVITE
Expires: 180
Organization: SetelGYE
Min-SE: 90
Session-Expires: 18000
Supported: replaces, 100rel, timer
Contact: sip:042294440@200.25.144.58:5060;transport=udp;user=phone
Content-Length: 149
Content-Type: application/sdp
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, NOTIFY, PRACK, UPDATE, INFO, REFER

v=0
o=- 0 0 IN IP4 201.217.79.3
s=-
c=IN IP4 201.217.79.3
t=0 0
m=audio 5388 RTP/AVP 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

Here, 6008010 is the phone number that was dialed at the provider in order to reach my system, and 042294440 is the provider-supplied Caller-ID, which I want to preserve all the way to Asterisk. In particular, 042294440 appears as the value that ends up as 
$fU (From: username) while being processed in kamailio. If I pass the SIP packet as-is to asterisk, asterisk first tries to match by the value of $fU, which obviously fails to match the trunk name. It then tries to match by incoming IP, which also fails 
because asterisk received this packet from 127.0.0.1 . Finally, asterisk sort of matches to the first record in the sip table, which is *not* the SIP account for this trunk, but some other random account.


I have a partial solution that uses sqlops to make a query to the sip table, using the $si (source IP) and reads the trunk name in order to replace $fU. This works, as now $fU will have the trunk name and asterisk will now recognize the intended SIP 
account for the trunk. However, this has the unfortunate side effect of throwing out the Caller-ID information.


What is the standard/proper way to deal with this situation? Is there a well-known way to make Asterisk match the trunk name, without overwriting the Caller-ID information? Before you ask, requesting the provider to modify its INVITEs is not an option. I 
believe there is a standard way to deal with this, since this scenario should also arise with a kamailio that faces the internet, and relays INVITEs (after authentication) to an asterisk in a local network. As far as I can tell, the fact that in my case 
the 'local network' is localhost should be irrelevant.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Proper way to make Asterisk recognize SIP trunk of incoming INVITE when IP is not available

2014-04-25 Thread Alex Villací­s Lasso

El 25/04/14 18:29, Alex Villací­s Lasso escribió:
I am currently preparing a kamailio-asterisk combination. The asterisk installation uses realtime for SIP. The kamailio configuration was based on the reference at http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb but has been 
heavily modified. Currently asterisk runs on localhost and only listens on SIP/RTP at 127.0.0.1 . Therefore, all of the SIP traffic appears to come from localhost, from the point of view of asterisk.


Currently I have a model on which internal SIP phones get identified by the authentication username, and then the contact names at From: and To: get massaged to incorporate the SIP domain, in order to emulate multiple-domain support. The 'sip' table in 
Asterisk defines all such contacts as SIP accounts of the form name_domain.com, and the SIP phones are configured to use 'name' as authentication username for domain 'domain.com'. However, SIP providers that register on the server with authentication 
names are left with their original names, since in the model, SIP trunks are available to all domains.


Now I have to add support for SIP providers which are to be authorized on the basis of IP only. Apparently, the kamailio module permissions.so (WITH_IPAUTH) is made for just this purpose, so I enabled it. After authentication, I need to route the INVITE 
to asterisk, and asterisk must somehow match the account for the SIP trunk from the available information on the INVITE request.


A typical INVITE for this scenario looks like this, before being processed by 
kamailio:

INVITE sip:6008010@172.28.161.218:5060;transport=udp;user=phone SIP/2.0
Via: SIP/2.0/UDP 
200.25.144.58:5060;branch=z9hG4bK+676ea13f680e853fd847230512a347561+32e3da76+1
Call-ID: FBE75B3A@32e3da76
From: 
sip:042294440@200.25.144.58:5060;user=phone;tag=32e3da76+1+544c000c+52be771c
To: sip:6008010@172.28.161.218:5060;user=phone
CSeq: 975469826 INVITE
Expires: 180
Organization: SetelGYE
Min-SE: 90
Session-Expires: 18000
Supported: replaces, 100rel, timer
Contact: sip:042294440@200.25.144.58:5060;transport=udp;user=phone
Content-Length: 149
Content-Type: application/sdp
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, NOTIFY, PRACK, UPDATE, INFO, REFER

v=0
o=- 0 0 IN IP4 201.217.79.3
s=-
c=IN IP4 201.217.79.3
t=0 0
m=audio 5388 RTP/AVP 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

Here, 6008010 is the phone number that was dialed at the provider in order to reach my system, and 042294440 is the provider-supplied Caller-ID, which I want to preserve all the way to Asterisk. In particular, 042294440 appears as the value that ends up 
as $fU (From: username) while being processed in kamailio. If I pass the SIP packet as-is to asterisk, asterisk first tries to match by the value of $fU, which obviously fails to match the trunk name. It then tries to match by incoming IP, which also 
fails because asterisk received this packet from 127.0.0.1 . Finally, asterisk sort of matches to the first record in the sip table, which is *not* the SIP account for this trunk, but some other random account.


I have a partial solution that uses sqlops to make a query to the sip table, using the $si (source IP) and reads the trunk name in order to replace $fU. This works, as now $fU will have the trunk name and asterisk will now recognize the intended SIP 
account for the trunk. However, this has the unfortunate side effect of throwing out the Caller-ID information.


What is the standard/proper way to deal with this situation? Is there a well-known way to make Asterisk match the trunk name, without overwriting the Caller-ID information? Before you ask, requesting the provider to modify its INVITEs is not an option. I 
believe there is a standard way to deal with this, since this scenario should also arise with a kamailio that faces the internet, and relays INVITEs (after authentication) to an asterisk in a local network. As far as I can tell, the fact that in my case 
the 'local network' is localhost should be irrelevant.




If I manage to coax Kamailio to add a (synthetized) P-Asserted-Identity header 
to the INVITE request before sending it to Asterisk, will Asterisk be able to 
use it? Will this information show up on a CDR?
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk SSL support broken with update from openssl-1.0.0 to 1.0.1e, recompiling does *not* help

2014-03-27 Thread Alex Villací­s Lasso

I am having an issue that prevents WebSockets over SSL/TLS (or any kind of 
encrypted HTTP traffic to Asterisk) from working after an openssl library 
update.

My setup is CentOS 6 x86_64, and initially, with openssl[-devel]-1.0.0-20.el6_2.5.x86_64 . With this openssl versions, https over TCP port 8089 initializes correctly with asterisk-11.7.0. After an upgrade to openssl[-devel]-1.0.1e-16.el6_5.4.x86_64 , I 
compiled asterisk-11.8.1 . When testing the exact same configuration, I noticed that TCP port 8089 was no longer listening, even though TCP port 8088 (standard unencrypted HTTP) was. After a patch coaxing some error message to be shown in the logs, I got 
the following:


[Mar 27 10:25:47] DEBUG[10516] config.c: Parsing /etc/asterisk/acl.conf
[Mar 27 10:25:47] VERBOSE[10516] config.c:   == Parsing 
'/etc/asterisk/acl.conf': Found
[Mar 27 10:25:47] DEBUG[10516] config.c: Parsing /etc/asterisk/http.conf
[Mar 27 10:25:47] VERBOSE[10516] config.c:   == Parsing 
'/etc/asterisk/http.conf': Found
[Mar 27 10:25:47] DEBUG[10516] netsock2.c: Splitting '0.0.0.0' into...
[Mar 27 10:25:47] DEBUG[10516] netsock2.c: ...host '0.0.0.0' and port ''.
[Mar 27 10:25:47] DEBUG[10516] config.c: extract uint from [8088] in [0, 65535] 
gives [8088](0)
[Mar 27 10:25:47] DEBUG[10516] netsock2.c: Splitting '0.0.0.0:8089' into...
[Mar 27 10:25:47] DEBUG[10516] netsock2.c: ...host '0.0.0.0' and port '8089'.
[Mar 27 10:25:47] DEBUG[10516] config.c: extract addr from 0.0.0.0:8089 gives 
0.0.0.0:8089(0)
[Mar 27 10:25:47] VERBOSE[10516] http.c:  Bound HTTP server to address 0.0.0.0:0
[Mar 27 10:25:47] DEBUG[10516] tcptls.c: Sorry, SSL_CTX_new call returned null... 
(sslerror=336236705 sslstring=error:140A90A1:lib(20):func(169):reason(161))
[Mar 27 10:25:47] VERBOSE[10516] manager.c:   == Manager registered action Ping

From googling around, I see that reason(161) means that somehow, there are no loaded cyphers for SSL (source: http://marc.info/?l=openssl-usersm=99129794725716w=2). This source also claims that the most common cause is that SSL_library_init() was not 
called. However, I do not see anything in the Asterisk changelog that could possibly cause the call to be skipped.


I see nothing out of the ordinary when configuring Asterisk using the updated 
openssl:

checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking for AES_encrypt in -lcrypto... yes
checking openssl/aes.h usability... yes
checking openssl/aes.h presence... yes
checking for openssl/aes.h... yes
checking for SSL_connect in -lssl... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking osp/osp.h usability... no
checking osp/osp.h presence... no
checking for osp/osp.h... no
checking for SSL_CTX_set_tlsext_use_srtp in -lssl... yes
checking for openssl/ssl.h... (cached) yes
checking for srtp_init in -lsrtp... yes
checking srtp/srtp.h usability... yes
checking srtp/srtp.h presence... yes
checking for srtp/srtp.h... yes
checking for the ability of -lsrtp to be linked in a shared object... yes
checking for srtp_shutdown in -lsrtp... yes
checking for srtp/srtp.h... (cached) yes
checking for malloc in -lhoard... no
checking for dbinit in -lsybdb... yes
checking sybdb.h usability... yes
checking sybdb.h presence... yes

What else could I check? I have checked issues.asterisk.org and there is no 
mention of a situation similar to mine, so I believe this is somehow related to 
the build environment.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] SOLVED: Re: Asterisk SSL support broken with update from openssl-1.0.0 to 1.0.1e, recompiling does *not* help

2014-03-27 Thread Alex Villací­s Lasso

El 27/03/14 11:59, Alex Villací­s Lasso escribió:

I am having an issue that prevents WebSockets over SSL/TLS (or any kind of 
encrypted HTTP traffic to Asterisk) from working after an openssl library 
update.

My setup is CentOS 6 x86_64, and initially, with openssl[-devel]-1.0.0-20.el6_2.5.x86_64 . With this openssl versions, https over TCP port 8089 initializes correctly with asterisk-11.7.0. After an upgrade to openssl[-devel]-1.0.1e-16.el6_5.4.x86_64 , I 
compiled asterisk-11.8.1 . When testing the exact same configuration, I noticed that TCP port 8089 was no longer listening, even though TCP port 8088 (standard unencrypted HTTP) was. After a patch coaxing some error message to be shown in the logs, I got 
the following:
Sorry about the noise. Turns out, a coworker was testing an experimental patch to asterisk and compiled on a machine without openssl-devel installed, then left a stray dummy /usr/lib/libasteriskssl.so.1 that was overriding the one at /usr/lib64 until just 
a minute ago.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to configure asterisk to only accept SIP from kamailio@localhost but exchange RTP on all interfaces?

2014-02-25 Thread Alex Villací­s Lasso

El 25/02/14 08:30, Karsten Wemheuer escribió:

Hi Alex,

Am Donnerstag, den 20.02.2014, 13:48 -0500 schrieb Alex Villací­s Lasso:

I have a setup with asterisk-11.7.0 and kamailio-4.1.1. I am following
the setup guide at
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb . I 
want to run asterisk and kamailio on the same server, with SIP realtime 
configuration
(MySQL database) so that kamailio authenticates and then forwards the
registration to asterisk on localhost. The setup calls for asterisk to
be configured to listen for SIP traffic on all interfaces, on a
nonstandard port (I chose 5080). It also calls for
blanking of the password for the SIP peer (in my case, a softphone),
so that it will not request for authentication again. I have managed
to make a call with working audio from the softphone to an extension
on asterisk through kamailio.

My concern is that asterisk is left listening for SIP through all
interfaces and with no SIP passwords. I want to secure the setup
against directed traffic to the asterisk UDP port (5080), that
bypasses the kamailio process. I tried setting
bindaddr=127.0.0.1 so asterisk will only listen for SIP traffic on
localhost, but this has the side effect of also removing audio - the
call appears to be successful on the softphone and on the asterisk
logs, but no audio is actually heard. My theory is
that the RTP traffic is being sent to kamailio instead of the
softphone.

How can I set up asterisk so that it can send RTP anywhere but reject
any SIP traffic that does not come from the kamailio process on
localhost?


If You bind asterisk to 127.0.0.1 I think the media connection is set
for this IP. Your Softphone can not reach the correct 127.0.0.1
(localhost is everywhere).

I would suggest, You setup asterisk on eth0 address or 0.0.0.0. In the
sip.conf You could secure Your setup with
 deny = 0.0.0.0/0.0.0.0
 permit = Your-LAN-Adress
This way asterisk accepts SIP from Your box only.


This might work, but would need to touch sip.conf every time the IP address 
changes. It would be nice to have a configuration that can be set up once and 
not modified again. That is why I wanted to set up localhost.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] How to configure asterisk to only accept SIP from kamailio@localhost but exchange RTP on all interfaces?

2014-02-20 Thread Alex Villací­s Lasso
I have a setup with asterisk-11.7.0 and kamailio-4.1.1. I am following the setup guide at http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb . I want to run asterisk and kamailio on the same server, with SIP realtime configuration 
(MySQL database) so that kamailio authenticates and then forwards the registration to asterisk on localhost. The setup calls for asterisk to be configured to listen for SIP traffic on all interfaces, on a nonstandard port (I chose 5080). It also calls for 
blanking of the password for the SIP peer (in my case, a softphone), so that it will not request for authentication again. I have managed to make a call with working audio from the softphone to an extension on asterisk through kamailio.


My concern is that asterisk is left listening for SIP through all interfaces and with no SIP passwords. I want to secure the setup against directed traffic to the asterisk UDP port (5080), that bypasses the kamailio process. I tried setting 
bindaddr=127.0.0.1 so asterisk will only listen for SIP traffic on localhost, but this has the side effect of also removing audio - the call appears to be successful on the softphone and on the asterisk logs, but no audio is actually heard. My theory is 
that the RTP traffic is being sent to kamailio instead of the softphone.


How can I set up asterisk so that it can send RTP anywhere but reject any SIP 
traffic that does not come from the kamailio process on localhost?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to configure asterisk to only accept SIP from kamailio@localhost but exchange RTP on all interfaces?

2014-02-20 Thread Alex Villací­s Lasso

El 20/02/14 15:07, Markus escribió:

Am 20.02.2014 19:48, schrieb Alex Villací­s Lasso:

My concern is that asterisk is left listening for SIP through all
interfaces and with no SIP passwords. I want to secure the setup against
directed traffic to the asterisk UDP port (5080), that bypasses the
kamailio process. I tried setting bindaddr=127.0.0.1 so asterisk will
only listen for SIP traffic on localhost, but this has the side effect
of also removing audio - the call appears to be successful on the
softphone and on the asterisk logs, but no audio is actually heard. My
theory is that the RTP traffic is being sent to kamailio instead of the
softphone.


Theories are nice, but you should check whether they are true using, e.g., 
tcpdump :)

I would check with, for example:

tcpdump -nnnqt -s 0 -A -i eth0 port 5060

or instead of port 5060 (or 5080) try udp to see what is going on with RTP. Change from eth0 to lo to see if there is really RTP going to nowhere. When looking at port 5060/5080, check the SDP header to see what kamilio/Asterisk/your softphone 
announce in terms of RTP.


I thought kamailio is a SIP server/proxy only and is not involved in RTP at all.



From a wireshark capture, what the softphone sees when contacting kamailio (in 
the bindaddr=127.0.0.1 configuration) is that the media negotiation in the OK 
package contains a random UDP port (as expected) but indicates that the IP for 
RTP is 127.0.0.1 .

I have also tried deny=0.0.0.0/0.0.0.0 permit=127.0.0.1/255.0.0.0 , but the 
softphone then gets denied through the kamailio too. It seems deny/permit 
restricts the IP of the original contact, not the IP the SIP traffic was 
received through.


In any case, if you want to only allow only certain connections from somewhere 
to somewhere (including from/to certain ports), iptables is your friend if you 
are using Linux.


I know iptables would solve my issue, and I will certainly use it, but I do not want to rely on iptables as the *only* thing that prevents the sip proxy bypass. I want an asterisk configuration that will only accept SIP signaling traffic coming from a 
specific IP (in my case, 127.0.0.1), but will then negotiate RTP across any interface that will contact the softphone. I want this to work with the IP of the original contact.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 11.7.0 not receiving registration from local address

2014-01-24 Thread Alex Villací­s Lasso

El 22/01/14 08:39, Administrator TOOTAI escribió:

Le 22/01/2014 14:01, Administrator TOOTAI a écrit :

Hi,

I face a problem which look like the same as David with his thread Asterisk not 
receiving call from VPN address.

I had an Asterisk (Elastix) working well in a VM (Debian Wheezy - KVM) having 
IP 192.168.111.14, my phone network is in the range 192.168.10.x

I updated lately to 11.7.0 version and now no one of my phones can register anymore 
to the asterisk. Ngrep as well as wireshark shows the traffic going in on eth0 from 
VM, but inside Asterisk, nothing, sip set debug ip ip from phones shows 
nothing.

This asterisk is also connected to other trunks we have outside our network, 
there is no problem here, registration is fine. Problem seems to be only with 
intranet addresses.

We have localnet=192.168.0.0/255.255.0.0, We add permit=0.0.0.0/0.0.0.0, 
nothing to do :-(

Thanks for any hint



Definitely something wrong with 11.7.0 I switched back to 11.6.0.1 and phone 
registration is OK.

David, you should probably try to downgrade if you have an 11.7.0 installed


In our local tests, we have seen no special issues regarding SIP registration 
when updating to 11.7.0.

Can you reproduce the issue on a separate virtual machine with just one 
extension and a separate install of Elastix updated to asterisk-11.7.0 ?
If at all possible, can you reproduce the issue on a physical machine with 
Elastix installed?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] How do I remotely force an *unconfigured* Digium DPMA phone to re-query the network for the DPMA server?

2013-09-06 Thread Alex Villací­s Lasso

Consider the following scenario:

1) One or more Digium DPMA phones are plugged into the network. I know their IP 
addresses and MACs.
2) The Asterisk I want to use as the telephony server starts without the DPMA 
module. Therefore there are no DPMA sessions between the phones and the server.
3) I install DPMA on the server, and write its configuration file for the 
phones. I will tie each phone to its configuration using the MAC, which I 
already know (config_auth=mac)
4) I reload the module as required to reload the configuration file.

Now that everything else is ready, I have to make the previously unconfigured 
Digium phones to query the net for the DPMA server.

How?

I would rather not physically locate and reset every single phone (all 100 of them, to cite a random number). I want a way to remotely force the phones to re-query the net and discover the configured DPMA server. The digium_phones reconfigure all would 
work for this, except that it needs an existing DPMA session, and there is none, since I configured the server for the first time. However, since I know the IP addresses of the phones, I could send some kind of notification to the phones. But I do not know 
which one. For some phones other than Digium, some variations of the SIP NOTIFY command will force the phone to request its configuration anew. Is there any equivalent for Digium phones?


A variation: the same Asterisk server has a bunch of configured DPMA phones. I now add a fresh batch of phones to the net. Since their MACs are unknown to the Asterisk server, the phones will remain unconfigured. I add the MACs to the file and reload the 
module. How do I make the fresh batch of phones to re-query the net and pull its configuration without having to physically go to each one and reset or otherwise interact with it?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] DPMA, check-sync

2013-09-06 Thread Alex Villací­s Lasso

El 06/09/13 14:44, Malcolm Davenport escribió:

Howdy,

Please forgive the off-list e-mail.  I'm not subscribed to the list, I only 
peruse the archives.

The follow up from George is correct.  For phones that have already been 
attached to DPMA, DPMA disables the enable_check_sync phone setting.

For phones that have not yet been attached to DPMA, that's not the case, as 
enable_check_sync is enabled out of the box.  So, a properly formatted SIP 
NOTIFY will do the trick.

You can do that outside of Asterisk using sipp or sipsak or something similar.

To cover the case for phones that are already attached to DPMA, we'll add a new phone option in DPMA 1.7.1.  We're on DPMA 1.6.0 right now, and DPMA 1.7.0 is already in the latter stages of internal QA.  I don't want to derail that train as we're very 
nearly there.


The new phone option will simply expose the ability to turn enable_check_sync 
on or off for phones.  We'll still default to the current behavior of disabling 
it though for phones attached to DPMA.

Apologies for the inconvenience.


The check-sync notify does not work in all required scenarios. I tracked the 
traffic with wireshark. To demonstrate:

Start from a D40 phone, factory resetted. The asterisk server starts with DPMA 
loaded but with a zero-bytes conf.
Write a valid configuration that includes the phone.
On Asterisk: module reload res_digium_phone.so ; digium_phones reconfigure all 
; sip notify CHECKSYNC $PHONE_IP
(this makes the phone re-query the network in this one time)
(phone gets reconfigured and registers the SIP accounts)
Now, remove the phone section, but keep all other sections intact.
On Asterisk: module reload res_digium_phone.so ; digium_phones reconfigure all 
; sip notify CHECKSYNC $PHONE_IP
(phone had a DPMA session, so it reloads configuration)
(phone tries to fetch configuration, but fails, as expected. The phone gets stuck in the 
Communication Error screen)
Now, restore the phone section so the configuration returns to the previously 
working state.
On Asterisk: module reload res_digium_phone.so ; digium_phones reconfigure all 
; sip notify CHECKSYNC $PHONE_IP
(sip notify gets sent, phone answers with 200 Ok)
(nothing happens. The phone is still stuck at the Communication Error screen)

What should happen is that the phone should re-scan at the last step and reload 
the configuration, as it did the first time.

The CHECKSYNC mentioned above is any entry in sip_notify.conf that references check-sync. 
As mentioned in the mailing list, I already know the phone IP for the sip 
notify command.

What I think is happening is that if the phone sees a DPMA server but the server has no valid configuration for the phone, the phone gets stuck in a state where check-resync will not make the phone rescan an updated configuration, and needs to be reset 
manually.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] LibopenR2 with debug symbols

2013-09-05 Thread Alex Villací­s Lasso

El 05/09/13 07:02, Rodrigo Montiel escribió:

Hi all,

Recently I have raised up a bug (related to segmentation fault of asterisk 
process) due to a core dump generated by Asterisk under the following 
environment:

CentOS release 5.7 (Final)
Kernel 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:23:01 EDT 2011 i686 i686 i386 
GNU/Linux
Asterisk 1.8.23.0
DAHDI Version: 2.6.1 Echo Canceller: HWEC, OSLEC
libpri-1.4.14-0
libpri-devel-1.4.14-0
libopenr2-1.3.2-1
libopenr2-devel-1.3.2-1
Cards Installed: 03:08.0 Communication controller: Digium, Inc. Wildcard TE420 
quad-span T1/E1/J1 card 3.3V (PCI-Express) (5th gen) (rev 02)

A piece of gdb output looks like this:

Core was generated by `/usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
#0  0x0014c4e5 in vfprintf () from /lib/libc.so.6
#0  0x0014c4e5 in vfprintf () from /lib/libc.so.6
No symbol table info available.
#1  0x00156742 in fprintf () from /lib/libc.so.6
No symbol table info available.
#2  0x00949d59 in ?? () from /usr/lib/libopenr2.so.3
No symbol table info available.
#3  0x in ?? ()
No symbol table info available.

The thing is that Asterisk development guys are poninting to a problem on 
libopenR2 library, and asked me to install library with debug symbols.
I am newby on this, can anyone there help me on how to mix debug symbols on 
installation of openR2? Did anyone experience this issue?

I tried googling but no success, sorry if my question is very basic :(


Is this an Elastix system? If so, then run:

yum update libopenr2*
yum install libopenr2-debuginfo

This should update libopenr2 to 1.3.3 *and* install the debuginfo package. Then 
you should try to reproduce the crash.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Use DPMA to enumerate unconfigured Digium phones in LAN

2013-08-08 Thread Alex Villací­s Lasso
Is there a way to use DPMA to enumerate the Digium phones that are plugged in and visible in the local network, but not (yet) configured through the DPMA configuration files in Asterisk. I would like to write a frontend that lists the DPMA capable phones, 
presents a GUI to specify the various options, then write the configuration files as required and make the phones read these settings. Ideally such a report would indicate the MAC address for the phone and preferably the current IP.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Need to figure out DAHDI logical group from CDR record

2013-08-01 Thread Alex Villací­s Lasso
I have a bunch of CDR records in the mysql database asteriskcdrdb on a FreePBX system. There is a DAHDI trunk defined in FreePBX which uses the gN identifier to make calls. So in this setup the trunk is roughly equivalent to a DAHDI logical group. I 
want to know, given a CDR, which logical group (and therefore, trunk) was used to place the call, or was used to receive the call.


In Asterisk 1.6 and lower, the DAHDI channel encoded the B channel, as in DAHDI/aaa-bbb where aaa was the ISDN B channel. Since, as far as I can see, the logical group groups channels together, the strategy was to ask Asterisk for the dahdi groups, list 
the B channels, and fetch the records that referenced those B channels.


In Asterisk 1.8, this no longer works. Since the DAHDI channel name no longer references a B channel ( https://issues.asterisk.org/jira/browse/ASTERISK-17229) I can no longer extract the B channel to associate a particular CDR with a particular logical 
group, Though, I am not particularly interested in the B channel, except as a means to build the association.


Is there a way to guess the logical group given the standard CDR fields? All of 
the strategies I can think of require adding new fields to asteriskcdrdb, which 
does nothing to help me with the CDR records already written.

The strategies for future association involve using the dialplan to capture CHANNEL(dahdi_span/dahdi_channel/dahdi_type) and writing this information in additional fields in asteriskcdrdb. However, some field to inform the logical group would be more 
useful for me.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] how to launch a URl when dialing a number

2013-05-31 Thread Alex Villací­s Lasso

El 31/05/13 09:21, Salaheddine Elharit escribió:

thanks justin i try to do this but the issue still the same.this link is stored 
in my server 192.168.5.109 .but what i want to receive this link when i call 
this number in my pc

ip adresse of my pc 192.168.5.131
ip adresse of server when the page php is stored

thanks and regards



2013/5/30 Justin Killen jkil...@allamericanasphalt.com 
mailto:jkil...@allamericanasphalt.com

If you just want the url to be opened (perhaps to update a counter via a 
web service or cgi script), you can do this:

system(wget http://;)

or

system(fetch http://...;)

-Justin




*From:*asterisk-users-boun...@lists.digium.com 
mailto:asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com 
mailto:asterisk-users-boun...@lists.digium.com] *On Behalf Of *Salaheddine Elharit
*Sent:* Thursday, May 30, 2013 8:07 AM
*To:* Asterisk Users Mailing List - Non-Commercial Discussion
*Subject:* [asterisk-users] how to launch a URl when dialing a number

Hello

i want to luanch an URL in my PC when i call a number  like below

exten = 066104,1,Set(CALLERID(number)=52xxx)

exten = 066104,n,MixMonitor(zap_g1_${EXTEN}_${UNIQUEID}.wav|av(0}V(0))

exten = 
066104,n,Dial(Zap/g1/${EXTEN},30,A(this-call-may-be-monitored-or-recorded))

exten = 066104,n,http://192.168.5.109/interface2/interface2.php ( here 
i want to launch this url in my pc )

exten = 066104,n,Hangup()




From this discussion, I am guessing the following scenario. Please correct me 
if I am wrong.
- There are (at least) three roles in your scenario: the Asterisk server, the 
PHP webserver (which may or may not be the same machine as the Asterisk 
server), and the client PC.
- Apparently your client PC runs a softphone (but the exact nature of the 
telephony client is not important).
- A call is connected from the phone to your Asterisk, is directed to your 
context, and dials some trunk (Zap/g1 in your snippet).
- You then want, somehow, to make the Asterisk server reach out to your client 
PC (which runs a GUI and has a web browser) and force it to open an arbitrary 
web page on the PHP webserver, presumably a callcenter data collecting form.

The problematic issue is the last part. Especially the implication of remotely 
opening a web page on some random PC.

If the above scenario is in fact what you were planning to do, maybe you need to rethink your design. In the default case, there is no way to make a remote PC open an arbitrary URL on its GUI. Think about the security implications. You should instead have 
the web interface already open, and program a Click2Call capability that contacts the Asterisk server and uses AMI to execute an Originate action with your context as your target. Then the web page would load your target URL in order to handle the call. 
Or, if the calls come from an external source, you should program some kind of monitor that alerts the web interface that the call was handled by the context.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Not able to build the chan_sip.c module

2013-05-28 Thread Alex Villací­s Lasso

El 27/05/13 01:56, upendra escribió:

Hi,

i am trying to install asterisk newer version on the Elastix machine, but while installing the chan_sip,c module is not building while make. when i see  in make menuselect options it showing XXX -- extended , please let me know how to enable it and 
make build chan_sip module.



Why are you trying to build asterisk manually on the Elastix machine? Have you 
discussed your needs in the Elastix forums? If so required, you can try to 
tweak the asterisk source RPM from the Elastix project.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to allow AMI access to Originate yet deny Application: System

2013-05-20 Thread Alex Villací­s Lasso

El 15/05/13 10:10, Alex Villací­s Lasso escribió:
While doing a security audit on a system I maintain, I stumbled upon an unvalidated use of a variable to compose an Originate request to the local Asterisk instance via AMI. Taking as an example an earlier exploit for FreePBX, I realized that this, 
combined with Application: System as an injected value, could allow arbitrary code execution. I am in the process of fixing all instances of this bug in our system. However, there are third parties that plug into our system, and that reconfigure the 
manager.conf file to allow remote access to AMI logins that allow Originate (by default, the manager.conf remains configured to deny login to any system except localhost). I want to have a guideline on how to proceed in order to make these applications 
work, without allowing malicious users to compromise the system. I know that one way to proceed is to deny remote access to AMI, and build an application-specific proxy that will perform the Originate on behalf of the remote requester, after filtering 
the values. However, I want to know if there is a simpler way to remove the danger of code execution while allowing applications to use AMI to place calls.


The intended scenario is that a remote desktop application (for Windows) is configured with the AMI credentials, and connects over the LAN to Asterisk in order to place calls and otherwise monitor the system. The attack I want to protect against is that 
of a malicious user that collects the credentials from the desktop application and proceeds to use the Application: System trick. I know of the SSL support for AMI, but it will not protect against a malicious end user.

Is this question too basic, or just cannot be done other than with the proxy 
approach?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] How to allow AMI access to Originate yet deny Application: System

2013-05-15 Thread Alex Villací­s Lasso
While doing a security audit on a system I maintain, I stumbled upon an unvalidated use of a variable to compose an Originate request to the local Asterisk instance via AMI. Taking as an example an earlier exploit for FreePBX, I realized that this, 
combined with Application: System as an injected value, could allow arbitrary code execution. I am in the process of fixing all instances of this bug in our system. However, there are third parties that plug into our system, and that reconfigure the 
manager.conf file to allow remote access to AMI logins that allow Originate (by default, the manager.conf remains configured to deny login to any system except localhost). I want to have a guideline on how to proceed in order to make these applications 
work, without allowing malicious users to compromise the system. I know that one way to proceed is to deny remote access to AMI, and build an application-specific proxy that will perform the Originate on behalf of the remote requester, after filtering the 
values. However, I want to know if there is a simpler way to remove the danger of code execution while allowing applications to use AMI to place calls.


The intended scenario is that a remote desktop application (for Windows) is configured with the AMI credentials, and connects over the LAN to Asterisk in order to place calls and otherwise monitor the system. The attack I want to protect against is that of 
a malicious user that collects the credentials from the desktop application and proceeds to use the Application: System trick. I know of the SSL support for AMI, but it will not protect against a malicious end user.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Error to install Asterisk

2013-03-06 Thread Alex Villací­s Lasso

El 06/03/13 11:52, Carlos Alvarez escribió:
I'm going to make an observation here that may upset you, and I don't mean it to, but it's fact.  If you are so unfamiliar with Linux, you will have a bad time managing Asterisk servers.  You really need to know how to use the OS before you can learn to 
manage services running on it.  I strongly suggest one of the all-in-one Asterisk variants like AsteriskNOW.  There is simply no way to run a production server without having to do systems management regularly.



On Wed, Mar 6, 2013 at 3:01 AM, termo termosel fermit...@hotmail.com 
mailto:fermit...@hotmail.com wrote:

Hi,

this is the outpu to df -h command:

root@ubuntu:/home/ubuntu/Downloads/asterisk-11.2.1# df -h
S.ficherosTam.  Usado Disp. % Uso Montado en
/cow   14G  4,5G  8,7G  34% /
udev  999M  4,0K  999M   1% /dev
tmpfs 403M  860K  402M   1% /run
/dev/sdb1 799M  693M  106M  87% /cdrom
/dev/loop0668M  668M 0 100% /rofs
tmpfs1006M   44K 1006M   1% /tmp
none  5,0M 0  5,0M   0% /run/lock
none 1006M  100K 1006M   1% /run/shm

Jordi


Look carefully at the df -h output. It seems that the OP is trying to install 
and run asterisk from inside an Ubuntu livecd session. Whatever the result of 
the installation, it will be wiped out on the next restart.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Point a Digium phone to a configuration URL using mDNS without DPMA or DHCP option 66

2013-02-28 Thread Alex Villací­s Lasso

El 28/02/13 08:40, A J Stiles escribió:

On Wednesday 27 February 2013, Alex Villací­s Lasso wrote:

I have the following scenario. A small network has DHCP but does not
publish option 66. An Asterisk server is on the network, but the Asterisk
version does not support DPMA and it is hard to switch the version.
However, there is a possibility to have a web server and an mDNS (Avahi)
server. I have been reading about provisioning Digium phones without DPMA,
and it mentions that option 66 can specify the URL prefix to use for the
XML configuration. Is there a way to specify the same through Avahi mDNS?
Something along the lines of this (of course this does not work, but gives
an idea of what I am looking for):

DPMA is proprietary and toxic, so you are quite right not to use it.

If you add a line like
options tftp-server-name 10.0.0.145
to your DHCP server's /etc/dhcp/dhcpd.conf , then this will give you the
option 66 you need. And note that even although it's advertised as a TFTP
server, the Digium phones actually put out a HTTP request aot a TFTP request
(that took some head-scratching to figure out).  So you will need to have
Apache running on 10.0.0.145; and a bunch of configuration files named like
000fd300.cfg
where the digits of the filename are the MAC address of the phone, in the web
server's default document root  (/var/www/ on Debian systems).

I forgot to point out that in my scenario, I may not have any administrative control over the DHCP server. Otherwise, the way you indicate would be obvious. Anyway, I received an email saying that mDNS cannot support pointing a Digium phone to anything 
other than a DPMA-enabled Asterisk.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Point a Digium phone to a configuration URL using mDNS without DPMA or DHCP option 66

2013-02-27 Thread Alex Villací­s Lasso
I have the following scenario. A small network has DHCP but does not publish option 66. An Asterisk server is on the network, but the Asterisk version does not support DPMA and it is hard to switch the version. However, there is a possibility to have a web 
server and an mDNS (Avahi) server. I have been reading about provisioning Digium phones without DPMA, and it mentions that option 66 can specify the URL prefix to use for the XML configuration. Is there a way to specify the same through Avahi mDNS? 
Something along the lines of this (of course this does not work, but gives an idea of what I am looking for):


?xml version=1.0 standalone='no'?
!DOCTYPE service-group SYSTEM avahi-service.dtd
service-group
nameDigium Phone Configuration Server/name
service
type_digiumproxy._udp/type
port443/port
txt-recordconfig_server_url=https://10.0.0.145/provisioning_scripts/http_provisioning.php?authhash=Xamp;filename=/txt-record
txt-recordserviceType=configuration/txt-record
/service
/service-group

I want the phone to request 
https://10.0.0.145/provisioning_scripts/http_provisioning.php?authhash=Xamp;filename=/001915abcdef.cfg;.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk AMI - Create a daemon (background process)

2013-02-25 Thread Alex Villací­s Lasso

El 24/02/13 07:30, Shahid H escribió:

I wanted to create a daemon (background process) in PHP. A daemon will use 
socket to connect with Asterisk AMI to send events and listen the actions.

A daemon will also listen the commands from agents via HTTP, for example:  A 
agent pressed a hang up button on a browser - it will send http command to a 
daemon.  A daemon received a command and will then send Hang Up Action to AMI.

How should a daemon process be designed to listen multiple actions and events? 
For example: 50 agents currently on the calls and how should a daemon to 
monitor the Actions/Events from 50 agents?


You may want to take a look to the Elastix CallCenter code. This project has a 
daemon component to implement the autodialer, written in PHP. This code already 
solves the AMI connection issue and the multiple agent issue.

http://elastix.svn.sourceforge.net/viewvc/elastix/trunk/apps/extras/callcenter/

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Query list of defined channel variables via AMI

2012-12-03 Thread Alex Villací­s Lasso

Is there a way to list the names of the channel variables that are currently 
defined on a given channel via AMI? I know of GetVar and SetVar, but GetVar 
needs the name of the variable to get.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] DAHDI and Tiger320 Chip

2012-10-26 Thread Alex Villací­s Lasso

El 25/10/12 07:46, Antonio Modesto escribió:

Hi,

I've got a ISDN Interface: /Tiger Jet/ Network Inc. Tiger3XX Modem/ISDN interface, I'm trying to use it with DAHDI 2.6 but it doesn't work, I'm thinking that dahdi doesn't support this device, I've loaded all of available dahdi drivers and none of them 
worked. Does anybody know what I can do to use it with DAHDI/Asterisk? I load dahdi and the modules, but it doesn't recognize any channel under /dev/dahdi/*




What does lspci -vnnn say about the device?
What about running dahdi_hardware ?
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Tell apart between network disruption and asterisk restart via AMI

2012-10-19 Thread Alex Villací­s Lasso
I have a program that connects to the Asterisk Manager Interface through port 5038 on a remote machine. Suppose I get a TCP disconnection on my program. The program will then attempt to reconnect to the AMI and will eventually succeed. Is there a way to 
check whether the disconnection was caused by a network disruption, or an Astersk restart/crash? In other words, is the Asterisk process I contacted now the same as the one I was connected before, or is it a different one? The reason I want to know is that 
I have a cache of information that is costly to parse (scales linearly with the number of extensions) and I want to know how to realize that the information is now stale.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Elastix 2.3.0.1

2012-07-05 Thread Alex Villací­s Lasso

El 05/07/12 02:19, Satria Anamarta escribió:

Greetings,

I know this is not a Elastix mailing list, but could anybody please tell where 
I can download Elastix 2.3.0.1 (the latest version) ?

There is only version 2.3.0 (April 2012) on Elastix website, not the 2.3.0.1 
(May 2012), but the changelog information are there.


You can always try installing 2.3.0 then updating everything with yum update.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 2GB Elastix memory limit

2012-06-28 Thread Alex Villací­s Lasso

El 28/06/12 03:58, resea...@businesstz.com escribió:

I have sevaral elastix installed but all of them show the physical memory
is 2GB while the server has 4GB and some has 8GB. I've upgraded to PAE
kernel but yet i cant see mem beyond 2GB. How can i configure the centos
kernel to use more memory as the server is multipurpose


I think you should use the Elastix mailing lists for this question. But you 
should try using the 64-bit Elastix instead.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] DAHDISendCallreroutingFacility

2012-03-10 Thread Alex Villací­s Lasso

El 10/03/12 12:05, Karsten Wemheuer escribió:

Hi,

Am Samstag, den 10.03.2012, 08:42 -0800 schrieb Mehdi Shirazi:

Hi
I installed Asterisk 1.8.7 with CD ISO(Elastix 2.2)
I want to use DAHDISendCallreroutingFacility Application on a PRI link(LIBPRI 
Already installed).
according to
https://wiki.asterisk.org/wiki/display/AST/New+in+1.8
Asterisk 1.8 include this application but I cannot see it with core show 
applications
Do I need to install mISDN or other modules for using that ?

Regards
M.Shirazi

No You don't need mISDN or other modules. DAHDISendCallreroutingFacility
is part of chan_dahdi. But as far as I know Asterisk 1.8.7 had problems
with this application. Try using at least 1.8.8 (1.8.10.0 is currently
the stable version of 1.8 release).

HTH,
Karsten



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

Elastix has 1.8.10.0 in the elastix-beta repository (yum 
--enablerepo=elastix-beta).

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Calling SIP extension through Local/XXXX negotiates slin codec instead of gsm

2012-02-17 Thread Alex Villací­s Lasso
I am configuring a test Asterisk server (1.8.9.2) to practice setting a single codec globally, to avoid transcoding as much as possible. Since all of my recordings are in gsm format, I am trying to make the SIP clients use gsm everywhere. I am using Ekiga 
on Fedora 16 x86_64 for my tests.


[root@elx2 asterisk]# cat /etc/asterisk/sip_general_additional.conf
;;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications 
to ;
; this file must be done via the web gui. There are alternative files to make   
 ;
; custom modifications, details at: http://freepbx.org/configuration_files  
 ;
;;
;

vmexten=*97
faxdetect=yes
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
useragent=FPBX-2.8.1(1.8.9.2)
disallow=all
allow=gsm
allow=alaw
allow=ulaw
allow=g729
allow=g723
allow=g722
allow=speex

I am using the originate command through the Asterisk console to test this. 
With plain SIP/1064, codec negotiation works as expected:

elx2*CLI channel originate SIP/1064 application playback demo-congrats
elx2*CLI core show channels
Channel  Location State   Application(Data)
SIP/1064-0044(None)   Up  Playback(demo-congrats)
1 active channel
0 active calls
86 calls processed
elx2*CLI core show channel SIP/1064-0044
 -- General --
   Name: SIP/1064-0044
   Type: SIP
   UniqueID: 1329515589.179
   LinkedID: 1329515589.179
  Caller ID: 1064
 Caller ID Name: device
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
DNID Digits: (N/A)
   Language: en
  State: Up (6)
  Rings: 0
  NativeFormats: 0x3c0002 (gsm|h261|h263|h263p|h264)
WriteFormat: 0x2 (gsm)
 ReadFormat: 0x2 (gsm)
 WriteTranscode: No
  ReadTranscode: No
1st File Descriptor: 17
  Frames in: 153
 Frames out: 385
 Time to Hangup: 0
   Elapsed Time: 0h0m10s
  Direct Bridge: none
Indirect Bridge: none
 --   PBX   --
Context: from-internal
  Extension:
   Priority: 1
 Call Group: 0
   Pickup Group: 0
Application: Playback
   Data: demo-congrats
Blocking in: ast_waitfor_nandfds
  Variables:
SIPCALLID=14a13ecb635daaed76e6ab905ba0cff1@192.168.5.193:5060

  CDR Variables:
level 1: dnid=
level 1: clid=device 1064
level 1: src=1064
level 1: dst=s
level 1: dcontext=from-internal
level 1: channel=SIP/1064-0044
level 1: lastapp=Playback
level 1: lastdata=demo-congrats
level 1: start=2012-02-17 16:53:09
level 1: answer=2012-02-17 16:53:11
level 1: duration=9
level 1: billsec=7
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1329515589.179
level 1: linkedid=1329515589.179
level 1: sequence=217

However, when I use Local/@from-internal to call the same extension, I get 
a different codec:

elx2*CLI channel originate Local/1064@from-internal application playback 
demo-congrats
elx2*CLI core show channels
Channel  Location State   Application(Data)
SIP/1064-00431064@from-internal:1 Up  Playback(demo-congrats)
1 active channel
0 active calls
86 calls processed
elx2*CLI core show channel SIP/1064-0043
 -- General --
   Name: SIP/1064-0043
   Type: SIP
   UniqueID: 1329515478.176
   LinkedID: 1329515478.176
  Caller ID: 1064
 Caller ID Name: device
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
DNID Digits: (N/A)
   Language: en
  State: Up (6)
  Rings: 0
  NativeFormats: 0x3c0002 (gsm|h261|h263|h263p|h264)
WriteFormat: 0x2 (gsm)
 ReadFormat: 0x40 (slin)
 WriteTranscode: No
  ReadTranscode: Yes gsm-slin
1st File Descriptor: 33
  Frames in: 168
 Frames out: 560
 Time to Hangup: 0
   Elapsed Time: 0h0m11s
  Direct Bridge: none
Indirect Bridge: none
 --   PBX   --
Context: from-internal
  Extension: 1064
   Priority: 1
 Call Group: 0
   Pickup Group: 0
Application: Playback
   Data: demo-congrats
Blocking in: ast_waitfor_nandfds
  Variables:
MACRO_DEPTH=0
BRIDGEPEER=Local/1064@from-internal-49cb;2
DIALEDPEERNUMBER=1064
SIPCALLID=1166452b23d0a3e611e72eb05d812537@192.168.5.193:5060
KEEPCID=TRUE
CWIGNORE=
EXTTOCALL=1064
TTL=64

  CDR Variables:
level 1: dnid=
level 1: clid=device 1064
level 1: src=1064
level 1: dst=s
level 1: dcontext=from-internal
level 1: channel=SIP/1064-0043
level 1: start=2012-02-17 16:51:20
level 1: duration=10
level 1: billsec=0
level 1: disposition=NO ANSWER
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1329515478.178
level 1: linkedid=1329515478.177
level 1: sequence=215

Why the difference? Is the client really using slin for one half of the stream? 
If so, how can I make it use gsm in the Local case?


--

[asterisk-users] Deadlock detected in asterisk-1.8.9.0 x86_64

2012-01-31 Thread Alex Villací­s Lasso

I am having problems with a deadlock in Asterisk 1.8.9.0.

The system is a x86_64 machine that is being used as a callcenter. The agents log in via the AgentLogin application, and each Agent/ channel is assigned to one or more queues. A custom separate process generates calls into the queues for the agents to 
answer. The calls all go out through a SIP trunk, and all of the agent extensions are SIP. After an hour or so, asterisk deadlocks. Any attempt to run agent show or agent show online through the console hangs. Also, AMI events seem to stop. However, 
the users seem to be still connected, only they do not receive calls anymore (the custom process waits forever for the Originate response). The deadlock is apparently spontaneous - there is no explicit action taken by the administrator that seems to induce 
the issue. I will try to make sense of the attached traces, but I hope someone on the list could provide a clue on what to look for.


Backtraces attached to https://issues.asterisk.org/jira/browse/ASTERISK-19285
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Attempt to Originate between IAX2/xxxx and an application hangs until timeout in 1.8.8.1

2012-01-12 Thread Alex Villací­s Lasso

El 11/01/12 18:01, Alex Villací­s Lasso escribió:

El 11/01/12 15:37, Alex Villací­s Lasso escribió:
I am investigating an issue with IAX2 extensions in Asterisk 1.8.x. My application connects to Asterisk via AMI and attempts to run an Originate command between an extension (such as SIP/ or IAX2/) and an application (in my case it is 
AgentLogin). This works correctly for SIP extensions, in all Asterisk versions. With IAX2 extensions, this worked correctly in Asterisk 1.6.2.20, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk 1.8.8.1. I found 
out that any application (not just AgentLogin) will trigger the issue. Instead of successfully ringing the IAX2 extension, as expected, the Originate attempt just sits there. The IAX2 extension does not receive any ringing indication. I can reproduce 
the issue by running the following command from the Asterisk console:


originate IAX2/1099 application playback demo-congrats

This is supposed to ring the extension, and upon picking up, should play the audio file. Instead, the IAX2 extension sits idle. Also, the Asterisk console becomes unresponsive. If I try to execute any other command (such as iax2 show threads, or even 
help), I get a prompt back but no command output. Then, after some time (the ring timeout, maybe), I get the output of all commands I issued during the hang.


When my application connects to AMI and runs the Originate command, it 
eventually gets a Hangup event, as if the extension never picked up the 
ringing. But actually the ringing never made it to the IAX2 extension.

We have noticed that the IAX2 extension itself can place calls to a SIP extension normally during the Originate hang, but it cannot receive a call from another SIP extension (Busy Here). When not attempting the Originate call, the IAX2 extension appears 
to behave normally.


This has been triggered in three machines to date: a big server with some 40 
IAX2 extensions, and two test machines (one physical and one virtual machine).

Before I get into a bug hunt, I would like to know: Is this a known issue? Are 
there any pointers on where to look first, or what to look for, based on my 
symptoms?

Testing with Asterisk 1.8.8.1 x86_64 and Zoiper as an IAX2 client.
Some additional information - it is the Originate with IAX2 channel that has problems, not just applications. Given that 1099 is an IAX2 extension and 1065 is a SIP extension, with FreePBX contexts, i found that originate IAX2/1099 extension 
1065@from-internal hangs, but originate SIP/1065 extension 1099@from-internal succeeds.

Some more information about this:

I have discovered the root cause of the issue. Due to a peculiarity of Zoiper 2.18, this program will *not* send a ACCEPT or RINGING packet back to Asterisk unless the NEW packet that announces the incoming call contains an IAX_IE_CALLING_NUMBER 
information element. It does not matter if the calling number is empty, but the corresponding IE must exist. This behavior is a change between Asterisk 1.6 and Asterisk 1.8.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Attempt to Originate between IAX2/xxxx and an application hangs until timeout in 1.8.8.1

2012-01-11 Thread Alex Villací­s Lasso
I am investigating an issue with IAX2 extensions in Asterisk 1.8.x. My application connects to Asterisk via AMI and attempts to run an Originate command between an extension (such as SIP/ or IAX2/) and an application (in my case it is AgentLogin). 
This works correctly for SIP extensions, in all Asterisk versions. With IAX2 extensions, this worked correctly in Asterisk 1.6.2.20, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk 1.8.8.1. I found out that any 
application (not just AgentLogin) will trigger the issue. Instead of successfully ringing the IAX2 extension, as expected, the Originate attempt just sits there. The IAX2 extension does not receive any ringing indication. I can reproduce the issue by 
running the following command from the Asterisk console:


originate IAX2/1099 application playback demo-congrats

This is supposed to ring the extension, and upon picking up, should play the audio file. Instead, the IAX2 extension sits idle. Also, the Asterisk console becomes unresponsive. If I try to execute any other command (such as iax2 show threads, or even 
help), I get a prompt back but no command output. Then, after some time (the ring timeout, maybe), I get the output of all commands I issued during the hang.


When my application connects to AMI and runs the Originate command, it 
eventually gets a Hangup event, as if the extension never picked up the 
ringing. But actually the ringing never made it to the IAX2 extension.

We have noticed that the IAX2 extension itself can place calls to a SIP extension normally during the Originate hang, but it cannot receive a call from another SIP extension (Busy Here). When not attempting the Originate call, the IAX2 extension appears to 
behave normally.


This has been triggered in three machines to date: a big server with some 40 
IAX2 extensions, and two test machines (one physical and one virtual machine).

Before I get into a bug hunt, I would like to know: Is this a known issue? Are 
there any pointers on where to look first, or what to look for, based on my 
symptoms?

Testing with Asterisk 1.8.8.1 x86_64 and Zoiper as an IAX2 client.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Attempt to Originate between IAX2/xxxx and an application hangs until timeout in 1.8.8.1

2012-01-11 Thread Alex Villací­s Lasso

El 11/01/12 15:37, Alex Villací­s Lasso escribió:
I am investigating an issue with IAX2 extensions in Asterisk 1.8.x. My application connects to Asterisk via AMI and attempts to run an Originate command between an extension (such as SIP/ or IAX2/) and an application (in my case it is 
AgentLogin). This works correctly for SIP extensions, in all Asterisk versions. With IAX2 extensions, this worked correctly in Asterisk 1.6.2.20, but started failing sometimes in Asterisk 1.8.7, and now happens every time in Asterisk 1.8.8.1. I found out 
that any application (not just AgentLogin) will trigger the issue. Instead of successfully ringing the IAX2 extension, as expected, the Originate attempt just sits there. The IAX2 extension does not receive any ringing indication. I can reproduce the 
issue by running the following command from the Asterisk console:


originate IAX2/1099 application playback demo-congrats

This is supposed to ring the extension, and upon picking up, should play the audio file. Instead, the IAX2 extension sits idle. Also, the Asterisk console becomes unresponsive. If I try to execute any other command (such as iax2 show threads, or even 
help), I get a prompt back but no command output. Then, after some time (the ring timeout, maybe), I get the output of all commands I issued during the hang.


When my application connects to AMI and runs the Originate command, it 
eventually gets a Hangup event, as if the extension never picked up the 
ringing. But actually the ringing never made it to the IAX2 extension.

We have noticed that the IAX2 extension itself can place calls to a SIP extension normally during the Originate hang, but it cannot receive a call from another SIP extension (Busy Here). When not attempting the Originate call, the IAX2 extension appears 
to behave normally.


This has been triggered in three machines to date: a big server with some 40 
IAX2 extensions, and two test machines (one physical and one virtual machine).

Before I get into a bug hunt, I would like to know: Is this a known issue? Are 
there any pointers on where to look first, or what to look for, based on my 
symptoms?

Testing with Asterisk 1.8.8.1 x86_64 and Zoiper as an IAX2 client.
Some additional information - it is the Originate with IAX2 channel that has problems, not just applications. Given that 1099 is an IAX2 extension and 1065 is a SIP extension, with FreePBX contexts, i found that originate IAX2/1099 extension 
1065@from-internal hangs, but originate SIP/1065 extension 1099@from-internal succeeds.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Is it valid to Dial(DAHDI/g0/12345wwwww88888888) on an ISDN trunk?

2012-01-09 Thread Alex Villací­s Lasso
I am trying to collect information regarding a bug report for Elastix (http://bugs.elastix.org/view.php?id=1146). In this bug, an user has asterisk-1.8.7 and dahdi-2.4.1.2. He is trying to make an outbound call through an ISDN trunk, by placing 
Dial(DAHDI/g0/12345w) in order to send 12345, then wait a period, then send . I am still waiting for a response on what particular telephony card he uses, and the kind of ISDN setup (T1/E1/BRI) being used, but I want to know: Is this 
dialstring expected to work with an ISDN trunk? If so, are there any configurations that might cause it to stop working? The user claims that this same dialstring worked with Elastix 1.6 which had dahdi-2.2.0.2 and asterisk-1.4.26.1.


Some additional information: the user reports that the dial attempt fails with hangup cause 28. From http://helpdesk.netcentral.co.uk/index.php?_m=knowledgebase_a=viewarticlekbarticleid=293 
http://helpdesk.netcentral.co.uk/index.php?_m=knowledgebase_a=viewarticlekbarticleid=293 [^ http://helpdesk.netcentral.co.uk/index.php?_m=knowledgebase_a=viewarticlekbarticleid=293] :


Code No. 28 - invalid number format (address incomplete).
This cause indicates that the called party cannot be reached because the called 
party number is not in a valid format or is not complete.

Is it actually possible that the code is trying to send a string of 'w's 
through the ISDN link? Or am I misunderstanding?
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Is it valid to Dial(DAHDI/g0/12345wwwww88888888) on an ISDN trunk?

2012-01-09 Thread Alex Villací­s Lasso

El 09/01/12 14:40, Richard Mudgett escribió:

I am trying to collect information regarding a bug report for
Elastix (http://bugs.elastix.org/view.php?id=1146). In this bug,
an user has asterisk-1.8.7 and dahdi-2.4.1.2. He is trying to make
an
outbound call through an ISDN trunk, by placing
Dial(DAHDI/g0/12345w) in order to send 12345, then
wait a period, then send . I am still waiting for a
response on what particular
telephony card he uses, and the kind of ISDN setup (T1/E1/BRI)
being used, but I want to know: Is this dialstring expected to
work with an ISDN trunk? If so, are there any configurations that
might
cause it to stop working? The user claims that this same dialstring
worked with Elastix 1.6 which had dahdi-2.2.0.2 and
asterisk-1.4.26.1.

Some additional information: the user reports that the dial attempt
fails with hangup cause 28. From
http://helpdesk.netcentral.co.uk/index.php?_m=knowledgebase_a=viewarticlekbarticleid=293
http://helpdesk.netcentral.co.uk/index.php?_m=knowledgebase_a=viewarticlekbarticleid=293
[^
http://helpdesk.netcentral.co.uk/index.php?_m=knowledgebase_a=viewarticlekbarticleid=293]
:

Code No. 28 - invalid number format (address incomplete).
This cause indicates that the called party cannot be reached
because the called party number is not in a valid format or is not
complete.

Is it actually possible that the code is trying to send a string of
'w's through the ISDN link? Or am I misunderstanding?

I'm using 'w' to force sending the 'sending complete' IE in an ISDN
setup message.
But I don't know the usage of multiple 'w' in the  dialstring.

See https://issues.asterisk.org/jira/browse/ASTERISK-19176

Richard



If I understand correctly, the support for 'w' in the dial string was removed 
when refactoring the PRI signaling code. Was this deliberate, or unintentional? 
I believe it should be added back for consistency with other signaling types.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Reporting for Asterisk Call Center

2011-10-11 Thread Alex Villací­s Lasso

El 11/10/11 11:58, bilal ghayyad escribió:

Dear Tariq;

About elastix.org, this can be use with Asterisk or it is coming as a complete 
IP Telephony, Call Center, IVR and Reporting?

Because, I do not need to install another IP Telephony on the server which 
already has asterisk which is an IP Telephony, this will cause a problem in the 
service (for example, when listening for SIP port of 5060).

 From the other side, elastix supports dashboard?

Actually I contacted them at the forum, but no reply. I do not know if they are 
active or not.

Regards
Bilal

Elastix aims to be a complete IP Telephony solution, and it already installs 
asterisk. Usually Elastix is installed on its own as a complete OS with 
asterisk and freepbx bundled.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Unexpected behavior change from Asterisk 1.6.2.14 to Asterisk 1.8.5.0

2011-09-12 Thread Alex Villací­s Lasso

El 01/09/11 14:11, Richard Mudgett escribió:

In our office, we were running an Asterisk 1.6.2.14 machine with DAHDI
2.3.0.1, FreePBX 2.8.1 and an analog DAHDI card with 8 FXO ports. This
machine had several DAHDI trunks defined in the FreePBX interface,
each one containing a single DAHDI channel. It
also had a few outgoing routes defined in FreePBX, each of those
grouping several of these DAHDI trunks. This setup worked correctly
until the hard drive started failing. After backing up most of the
data, we changed the hard drive and installed Asterisk
1.8.5.0 and DAHDI 2.4.1.2 with the same FreePBX 2.8.1. We then noticed
that outgoing calls using the analog card were failing if the first
tried channel was busy, instead of trying the next channel in the
outgoing route. We traced this problem to a
situation described in a FreePBX ticket:
http://www.freepbx.org/v2/ticket/5008 . The logs in the old hard drive
showed the following whenever a channel was busy:

[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[s@macro-dialout-trunk:19] Dial(SIP/514-07bb,
DAHDI/4/3904170,300,tTwW) in new stack
[2011-08-30 08:55:39] WARNING[2597] app_dial.c: Unable to create
channel of type 'DAHDI' (cause 0 - Unknown)
[2011-08-30 08:55:39] VERBOSE[2597] app_dial.c: == Everyone is
busy/congested at this time (1:0/0/1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[s@macro-dialout-trunk:20] NoOp(SIP/514-07bb, Dial failed for
some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0) in new
stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[s@macro-dialout-trunk:21] Goto(SIP/514-07bb, s-CHANUNAVAIL,1)
in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto
(macro-dialout-trunk,s-CHANUNAVAIL,1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[s-CHANUNAVAIL@macro-dialout-trunk:1] Set(SIP/514-07bb, RC=0)
in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(SIP/514-07bb, 0,1)
in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto
(macro-dialout-trunk,0,1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[0@macro-dialout-trunk:1] Goto(SIP/514-07bb, continue,1) in
new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto
(macro-dialout-trunk,continue,1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[continue@macro-dialout-trunk:1] GotoIf(SIP/514-07bb,
1?noreport) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto
(macro-dialout-trunk,continue,3)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing
[continue@macro-dialout-trunk:3] NoOp(SIP/514-07bb, TRUNK Dial
failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other
trunks) in new stack

In the old setup (with Asterisk 1.6.2.14), the error type reported by
app_dial was 0-Unknown and the dialing status was CHANUNAVAIL.

[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing
[s@macro-dialout-trunk:19] Dial(SIP/213-00e7,
DAHDI/5/2201177,300,tTwW) in new stack
[Aug 31 12:10:13] WARNING[17513] app_dial.c: Unable to create channel
of type 'DAHDI' (cause 17 - User busy)
[Aug 31 12:10:13] VERBOSE[17513] app_dial.c: == Everyone is
busy/congested at this time (1:1/0/0)
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing
[s@macro-dialout-trunk:20] NoOp(SIP/213-00e7, Dial failed for
some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 17) in new stack
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing
[s@macro-dialout-trunk:21] Goto(SIP/213-00e7, s-BUSY,1) in new
stack
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Goto
(macro-dialout-trunk,s-BUSY,1)
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing
[s-BUSY@macro-dialout-trunk:1] NoOp(SIP/213-00e7, Dial failed
due to trunk reporting BUSY - giving up) in new stack
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing
[s-BUSY@macro-dialout-trunk:2] PlayTones(SIP/213-00e7, busy)
in new stack

In the new setup (with Asterisk 1.8.5.0), the error type reported by
app_dial is 17-User busy and the dialing status is BUSY.

The FreePBX context is programmed so that it considers BUSY, along
with NOANSWER, INVALIDNMBR and CHANGED, as nonrecoverable errors that
abort the dialout attempt, which seems reasonable. The problem is that
the new setup is returing BUSY instead of
CHANUNAVAIL when the particular channel that was tried is in use by a
different call. We worked around the issue by applying the
recommendation suggested in the ticket (create DAHDI groups in
chan_dahdi.conf and use these as trunks). However, I believe the
previous behavior was correct and the new behavior to be in error. The
workaround suggested by the ticket will not work in a scenario where a
DAHDI group has all of its channels busy with calls, and the
administrator intends additional calls to be routed
through non-DAHDI trunks (such as SIP/IAX trunks or custom trunks).

My questions:

Is the new behavior the intended one?
If the new behavior is intentional, then how should I set up 

[asterisk-users] Unexpected behavior change from Asterisk 1.6.2.14 to Asterisk 1.8.5.0

2011-09-01 Thread Alex Villací­s Lasso
In our office, we were running an Asterisk 1.6.2.14 machine with DAHDI 2.3.0.1, FreePBX 2.8.1 and an analog DAHDI card with 8 FXO ports. This machine had several DAHDI trunks defined in the FreePBX interface, each one containing a single DAHDI channel. It 
also had a few outgoing routes defined in FreePBX, each of those grouping several of these DAHDI trunks. This setup worked correctly until the hard drive started failing. After backing up most of the data, we changed the hard drive and installed Asterisk 
1.8.5.0 and DAHDI 2.4.1.2 with the same FreePBX 2.8.1. We then noticed that outgoing calls using the analog card were failing if the first tried channel was busy, instead of trying the next channel in the outgoing route. We traced this problem to a 
situation described in a FreePBX ticket: http://www.freepbx.org/v2/ticket/5008 . The logs in the old hard drive showed the following whenever a channel was busy:


[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [s@macro-dialout-trunk:19] 
Dial(SIP/514-07bb, DAHDI/4/3904170,300,tTwW) in new stack
[2011-08-30 08:55:39] WARNING[2597] app_dial.c: Unable to create channel of 
type 'DAHDI' (cause 0 - Unknown)
[2011-08-30 08:55:39] VERBOSE[2597] app_dial.c:   == Everyone is busy/congested 
at this time (1:0/0/1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [s@macro-dialout-trunk:20] 
NoOp(SIP/514-07bb, Dial failed for some reason with DIALSTATUS = CHANUNAVAIL 
and HANGUPCAUSE = 0) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [s@macro-dialout-trunk:21] 
Goto(SIP/514-07bb, s-CHANUNAVAIL,1) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto 
(macro-dialout-trunk,s-CHANUNAVAIL,1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] 
Set(SIP/514-07bb, RC=0) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] 
Goto(SIP/514-07bb, 0,1) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto (macro-dialout-trunk,0,1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [0@macro-dialout-trunk:1] 
Goto(SIP/514-07bb, continue,1) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto 
(macro-dialout-trunk,continue,1)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [continue@macro-dialout-trunk:1] 
GotoIf(SIP/514-07bb, 1?noreport) in new stack
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Goto 
(macro-dialout-trunk,continue,3)
[2011-08-30 08:55:39] VERBOSE[2597] pbx.c: -- Executing [continue@macro-dialout-trunk:3] 
NoOp(SIP/514-07bb, TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - 
failing through to other trunks) in new stack

In the old setup (with Asterisk 1.6.2.14), the error type reported by app_dial 
was 0-Unknown and the dialing status was CHANUNAVAIL.

[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing [s@macro-dialout-trunk:19] 
Dial(SIP/213-00e7, DAHDI/5/2201177,300,tTwW) in new stack
[Aug 31 12:10:13] WARNING[17513] app_dial.c: Unable to create channel of type 
'DAHDI' (cause 17 - User busy)
[Aug 31 12:10:13] VERBOSE[17513] app_dial.c:   == Everyone is busy/congested at 
this time (1:1/0/0)
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing [s@macro-dialout-trunk:20] 
NoOp(SIP/213-00e7, Dial failed for some reason with DIALSTATUS = BUSY and 
HANGUPCAUSE = 17) in new stack
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing [s@macro-dialout-trunk:21] 
Goto(SIP/213-00e7, s-BUSY,1) in new stack
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Goto 
(macro-dialout-trunk,s-BUSY,1)
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing [s-BUSY@macro-dialout-trunk:1] 
NoOp(SIP/213-00e7, Dial failed due to trunk reporting BUSY - giving up) 
in new stack
[Aug 31 12:10:13] VERBOSE[17513] pbx.c: -- Executing [s-BUSY@macro-dialout-trunk:2] 
PlayTones(SIP/213-00e7, busy) in new stack

In the new setup (with Asterisk 1.8.5.0), the error type reported by app_dial 
is 17-User busy and the dialing status is BUSY.

The FreePBX context is programmed so that it considers BUSY, along with NOANSWER, INVALIDNMBR and CHANGED, as nonrecoverable errors that abort the dialout attempt, which seems reasonable. The problem is that the new setup is returing BUSY instead of 
CHANUNAVAIL when the particular channel that was tried is in use by a different call. We worked around the issue by applying the recommendation suggested in the ticket (create DAHDI groups in chan_dahdi.conf and use these as trunks). However, I believe the 
previous behavior was correct and the new behavior to be in error. The workaround suggested by the ticket will not work in a scenario where a DAHDI group has all of its channels busy with calls, and the administrator intends additional calls to be routed 
through non-DAHDI trunks (such as SIP/IAX trunks or custom trunks).


My questions:

Is the new behavior the intended 

[asterisk-users] Warning spamming for any unsynchronized ISDN port with dahdi-2.3.0.1

2010-06-30 Thread Alex Villací­s Lasso
We are doing hardware tests with recent dahdi-2.3.0.1 and both 
asterisk-1.4.33.1 and asterisk-1.6.2.8. Recently, we have noticed that 
whenever an ISDN port is in RED alarm (unsynchronized), we get a stream 
of warnings in /var/log/asterisk/full that look like this:

[Jun 30 17:38:41] WARNING[9637] chan_dahdi.c: No D-channels available!  
Using Primary channel 78 as D-channel anyway!
[Jun 30 17:38:41] WARNING[9638] chan_dahdi.c: No D-channels available!  
Using Primary channel 109 as D-channel anyway!
[Jun 30 17:38:45] WARNING[9637] chan_dahdi.c: No D-channels available!  
Using Primary channel 78 as D-channel anyway!
[Jun 30 17:38:45] WARNING[9638] chan_dahdi.c: No D-channels available!  
Using Primary channel 109 as D-channel anyway!
[Jun 30 17:38:49] WARNING[9637] chan_dahdi.c: No D-channels available!  
Using Primary channel 78 as D-channel anyway!
[Jun 30 17:38:49] WARNING[9638] chan_dahdi.c: No D-channels available!  
Using Primary channel 109 as D-channel anyway!
[Jun 30 17:38:50] VERBOSE[9626] asterisk.c: -- Remote UNIX connection
[Jun 30 17:38:53] WARNING[9637] chan_dahdi.c: No D-channels available!  
Using Primary channel 78 as D-channel anyway!
[Jun 30 17:38:53] WARNING[9638] chan_dahdi.c: No D-channels available!  
Using Primary channel 109 as D-channel anyway!
[Jun 30 17:38:57] WARNING[9637] chan_dahdi.c: No D-channels available!  
Using Primary channel 78 as D-channel anyway!
[Jun 30 17:38:57] WARNING[9638] chan_dahdi.c: No D-channels available!  
Using Primary channel 109 as D-channel anyway!

This particular machine runs asterisk-1.6.2.8 with dahdi-2.3.0.1. The 
telephony hardware is an OpenVox PRI card with four E1 ports (driver is 
wct4xxp). On this system, I have configured port 1 as pri_net, and port 
2 as pri_cpe, and connected the two with a crossover cable, leaving 
ports 3 and 4 disconnected. Therefore I have two synchronized ports 
(with each other) and two unsynchronized ports (RED). From what I see in 
/proc/dahdi/* , channels 78 and 109 are the two D channels of the two 
disconnected ports. I can route calls between the two connected ports, 
so that part appears to work OK.

I have reproduced this stream of warnings on another machine with 
asterisk-1.4.33.1 and dahdi-2.3.0.1, and also with other card types 
(OpenVox with 1 E1 port, Sangoma with 2 T1 ports, Rhino with 2 T1 
ports), so I do not think the particular driver is an issue. The 
question I have is this: is this warning message something to be 
expected from ports with RED alarms? Or is this message a symptom of a 
deeper misconfiguration? Since I am the package manager for the Elastix 
project (http://www.elastix.org), I am the one who can solve 
misconfigurations, if any.


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] To Asterisk AMI Gurus - Tacking issue with originate

2009-12-18 Thread Alex Villací­s Lasso
El 18/12/09 11:31, Bruce Nik escribió:
 I am amazed that there is absolutely no proper documentation on how to
 connect to Asterisk AMI with PHP. All tutuorial just mention:   pass Action:
 originate Channel: SIP/1234, blah blah blah and never give a simple example
 of php.

http://phpagi.sourceforge.net/

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problem with sounds DTMF's phone keys

2009-11-18 Thread Alex Villací­s Lasso
Danny Nicholas escribió:
 Could it be your using option X when you have no extensions for the user to
 exit to (therefore when they press dtmf instead of one and done, they just
 keep going?)

  

   _  

 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Moises Silva
 Sent: Monday, November 16, 2009 2:40 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] Problem with sounds DTMF's phone keys

  

 On Mon, Nov 16, 2009 at 3:27 PM, Diana Lopez dlo...@palosanto.com wrote:

 Hello everybody,

 I need help, I have a problem with conferences in asterisk, when many
 people are in a conference sometimes there're users pressing phone keys
 and this action emits a sound (DTMF of the phone keys), so, I need to
 find the way of not listening this sound.. I'm using
 MeetMe(variable,pFX).. I tried whithout F but it doesn't work because
 users continue listening de DTMF's sounds...

 But the way, I'm using Asterisk 1.4.26.1

 Thanks a lot.

  

 This is just a guess, but, I think that if any of the users is using inband
 DTMF and its sip.conf is not enabled to detect inband dtmf, you may have
 this result. 

  

 The 'F' options MUST work if all the peers are properly configured,
 otherwise is a bug. I order to asterisk to mute or ignore that DTMF it must
 first properly detect it. Use the /etc/asterisk/logger.conf configuration to
 display detected dtmf and make sure all users dtmf is being detected. 

  

 If the dtmf is detected by asterisk and you use the F option in meetme and
 still you hear the dtmf, then is a bug, try to reproduce it with latest 1.4
 version, if you can reproduce it the bug must be filled in
 issues.asterisk.org.

  
   
On reading the responses to this thread, I think there is a big omission 
that needs to be mentioned. I am a co-worker of the original poster, and 
I need to point out that the issue of the DTMFs is happening on a 
DAHDI-only setup. To elaborate: the Asterisk server (with 
asterisk-1.4.26.1) has a set of ISDN cards dedicated to incoming calls 
that are directed to one of several conference rooms created with 
app_meetme. As far as we know, there are no SIP phones connected to this 
server. All calls come from the public PSTN system.

The problem with the DTMFs is that some (but not all) keys are used by 
our dialplan to implement some custom actions. When the conference 
members press keys that are unused in the dialplan, all of the other 
conference members hear the DTMF sounds. This is undesirable in this 
server, so we are looking for a way (if it exists) to prevent other 
conference members from hearing the DTMF sounds caused by any one 
conference member pressing the numeric keys, while still preserving the 
keypress functionality (switching to other conference rooms, other 
custom actions).

For this particular server, we cannot rely on cooperation from the 
conference members, as this is a public PBX (anyone is and must be 
allowed to dial in). Therefore, asking the conference members to stop 
pressing keys at random is not an (enforceable) option for us. The 
scenario we are trying to prevent is one where malicious users start 
pressing random keys for the sake of disturbing the conference and 
annoying other conference users.

I have the suspicion that in this particular setup, what we are asking 
is difficult (if not impossible) to implement, as these DTMFs are 
probably in-band and therefore require signal processing to remove. I 
would be more than happy to be proven wrong on this issue.

-- 
perl -e '$x=2.3;printf(%.0f + %.0f = %.0f\n,$x,$x,$x+$x);'


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.4.26 Now Available

2009-07-21 Thread Alex Villací­s Lasso
Asterisk Development Team escribio':
 The Asterisk Development Team is pleased to announce the release of Asterisk
 1.4.26. Asterisk 1.4.26 is available for immediate download at
 http://downloads.asterisk.org/pub/telephony/asterisk/

   
I don't see 1.4.26 anywhere in the directory, just 1.4.26-rc6.

-- 
perl -e '$x=2.3;printf(%.0f + %.0f = %.0f\n,$x,$x,$x+$x);'


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Using a mobile phone via USB as an extension

2009-07-09 Thread Alex Villací­s Lasso
Nick Hill escribio':
 Hello Sasa

 The page you point to doesn't talk about USB connectivity for chan_mobile. It 
 does talk about bluetooth connectivity, which can be achieved by way of a USB 
 bluetooth dongle, but that is not the same thing.

 I am talking about using standard interfaces exposed by mobile devices 
 (mobile 
 phones or USB dongles), exposed via USB, to establish voice calls as an 
 extension to asterisk. And examining whether the standard CDC modem interface 
 or 
 any other standard interface generally carries the required commands.

 There are several potential benefits to using the USB approach:
 1) Devices will be immune to interference from other 2.4Ghz devices. 
 Bluetooth 
 is prone.
 2) Potentially better call quality. Using bluetooth, the call will need to be 
 converted from the VOIP codec, to PCM then to the bluetooth codec then to the 
 over-the-air mobile codec (GSM), with associated latency. There may be a 
 possibility of cutting one of these conversions.
 3) This could be used with a USB data dongle interface, which are cheap, 
 relatively simple, and are powered from the USB port. They also generally 
 offer 
 great sensitivity over the air.
 4) The bluetooth approach is dependent on a working (bug-free) bluetooth 
 stack, 
 with specific hardware, which may or may not be available.
 5) less software and hardware needed in the chain, so potentially more 
 maintainable and reliable.


 The bluetooth approach has some advantages:
 1) The bluetooth interface is standardised and any device should 
 theoretically 
 work with any other of the given generation. The required codecs, for 
 example, 
 are well defined. (in practice, this isn't the case - for example, the Nokia 
 E65 
 is bluetooth capable and doesn't work, and the chan_mobile is fussy about 
 which 
 bluetooth dongles you use).
 2) Even if the USB interface does provide necessary interfaces for voice 
 telephony, they may not be well tested. (buggy). We don't know - but then, 
 the 
 bluetooth approach is, in practice, hardware dependent also.
 3) Bluetooth dongles are swallowed by a mobile phone. One dongle needed for 
 each phone/channel. (they are cheap, but may have other ramifications).

 Someone may have investigated the USB approach already and discounted it. Or 
 if 
 not, it may be worth further examination.

 Carlos indicates that USB support may be available in chan_mobile but I can't 
 find any references to it, and I think Oliver is looking for more info as 
 well.





 Sasa Bobek wrote:
   
 Just google/bing it. http://voip-info.org/wiki/view/chan_mobile

 On Thu, Jul 9, 2009 at 12:56 PM, Olivier oza-4...@myamail.com 
 mailto:oza-4...@myamail.com wrote:


 2009/7/2 Carlos Ruiz Diaz carlos.ruizd...@gmail.com
 mailto:carlos.ruizd...@gmail.com

 Check chan_mobile. Now is mature enough to be used in a server
 with low CPS.
 The USB connectivity will be introduced in the close future (I
 think) but by now it can be connected via bluetooth device.

 Where did you get this info (USB connectivity for chan_mobile) ?
 Is there a way to learn a bit more ?

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



 

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

   
There are some links about a module called chan_sebi that can use some 
Huawei USB dongles as a voice interface (in Spanish):

http://odicha.wordpress.com/2009/06/30/chan_sebi-1-que-como-y-por-que/

http://odicha.wordpress.com/2009/06/30/chan_sebi-2-trasteando-con-el-codigo/



-- 
perl -e '$x=2.3;printf(%.0f + %.0f = %.0f\n,$x,$x,$x+$x);'


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Segfault on unload of chan_h323 in asterisk-1.4.25

2009-06-02 Thread Alex Villací­s Lasso
When the support for h323plus was announced for Asterisk 1.4.25, I tried 
to build this support in Asterisk. For this, I checked out the h323plus 
CVS from SourceForge, which reported version 1.20.beta5, and also the 
ptlib-2.4.2 source RPM from Fedora 10. I finally managed to build a 
chan_h323 for Asterisk 1.4.25, which apparently loads correctly, but now 
I see that I get a segfault whenever I issue the command module unload 
chan_h323, or stop gracefully. I have yet to file a bug on either 
Asterisk or h323plus because I believe this to be my own error in 
configuration, rather than an intrinsic bug in chan_h323. Does anyone 
else have chan_h323 running with h323plus? If so, how did you compile 
your support? Have you experienced the segfault on shutdown?

[r...@rpmbuild64 channels]# ldd /usr/sbin/asterisk
libdl.so.2 = /lib64/libdl.so.2 (0x00399180)
libcap.so.1 = /lib64/libcap.so.1 (0x00399ca0)
libpthread.so.0 = /lib64/libpthread.so.0 (0x003991c0)
libtermcap.so.2 = /lib64/libtermcap.so.2 (0x00399ce0)
libresolv.so.2 = /lib64/libresolv.so.2 (0x00399a60)
libh323_linux_x86_64_n.so.1.20-beta5 = 
/usr/lib64/libh323_linux_x86_64_n.so.1.20-beta5 (0x003c9240)
libpt.so.2.4.2 = /usr/lib64/libpt.so.2.4.2 (0x003c92e0)
libssl.so.6 = /lib64/libssl.so.6 (0x00399c60)
libcrypto.so.6 = /lib64/libcrypto.so.6 (0x00399a20)
libz.so.1 = /usr/lib64/libz.so.1 (0x00399200)
libodbc.so.1 = /usr/lib64/libodbc.so.1 (0x00399080)
libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x003999e0)
libm.so.6 = /lib64/libm.so.6 (0x00399140)
libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x00399680)
libc.so.6 = /lib64/libc.so.6 (0x00399100)
/lib64/ld-linux-x86-64.so.2 (0x00399000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 
(0x00399c20)
libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x00399b60)
libcom_err.so.2 = /lib64/libcom_err.so.2 (0x00399ae0)
libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3 (0x00399b20)
libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0 
(0x00399ba0)
libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x00399aa0)
libselinux.so.1 = /lib64/libselinux.so.1 (0x003995c0)
libsepol.so.1 = /lib64/libsepol.so.1 (0x00399600)
[r...@rpmbuild64 channels]# ldd /usr/lib64/asterisk/modules/chan_h323.so
libh323_linux_x86_64_n.so.1.20-beta5 = 
/usr/lib64/libh323_linux_x86_64_n.so.1.20-beta5 (0x2af569a25000)
libresolv.so.2 = /lib64/libresolv.so.2 (0x2af56a3f1000)
libpt.so.2.4.2 = /usr/lib64/libpt.so.2.4.2 (0x2af56a606000)
libpthread.so.0 = /lib64/libpthread.so.0 (0x2af56aa84000)
libssl.so.6 = /lib64/libssl.so.6 (0x2af56ac9f000)
libcrypto.so.6 = /lib64/libcrypto.so.6 (0x2af56aee9000)
libdl.so.2 = /lib64/libdl.so.2 (0x2af56b23b000)
libz.so.1 = /usr/lib64/libz.so.1 (0x2af56b43f000)
libodbc.so.1 = /usr/lib64/libodbc.so.1 (0x2af56b653000)
libstdc++.so.6 = /usr/lib64/libstdc++.so.6 (0x2af56b8b8000)
libm.so.6 = /lib64/libm.so.6 (0x2af56bbb8000)
libgcc_s.so.1 = /lib64/libgcc_s.so.1 (0x2af56be3b000)
libc.so.6 = /lib64/libc.so.6 (0x2af56c04a000)
/lib64/ld-linux-x86-64.so.2 (0x00399000)
libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 
(0x2af56c3a)
libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2af56c5cf000)
libcom_err.so.2 = /lib64/libcom_err.so.2 (0x2af56c864000)
libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3 (0x2af56ca66000)
libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0 
(0x2af56cc8c000)
libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x2af56ce94000)
libselinux.so.1 = /lib64/libselinux.so.1 (0x2af56d097000)
libsepol.so.1 = /lib64/libsepol.so.1 (0x2af56d2af000)


-- 
perl -e '$x=2.3;printf(%.0f + %.0f = %.0f\n,$x,$x,$x+$x);'


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users