Re: [asterisk-users] Calls are dropped after 15 minutes

2016-08-09 Thread Keith Heppner
The solution that fixed our problem was to Edit the
sip_general_additional.conf file by adding the line "session-timers=refuse"
Thank you to each one who gave suggestions.

Keith

Keith Heppner
Rio Grande Bible Institute
4300 S Business Highway 281
Edinburg, TX  78539-9650
Office 956-380-8171
Cell 956-335-6576
fax 956-380-8258
www.riogrande.edu
-- 
_
-- 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 11.23.0 on CentOS6 : how to get ICE support ?

2016-08-09 Thread Jonas Kellens

Hello

I'm trying for several days now to get ICE support for my Asterisk 11.23 
on CentOS 6.


My call setup : sipml5_webRTC (nat) --> public Asterisk on 178.18.90.230 
--> softphone Zoiper

(problem : no audio)

Reverse does not work either.
(problem : failed get local SDP)

I followed this guide :

https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support

I researched on the web and found this useful thread : 
http://forums.digium.com/viewtopic.php?f=1=90167


This is no question "what is wrong ?". I know what is wrong : I need ICE 
support !

So the question here is : how to get ICE support in my Asterisk ?


I've compiled asterisk as follow :

[root@myserver admin]# yum install uuid-devel libuuid-devel
[root@myserver admin]# ./configure --libdir=/usr/lib64
[root@myserver admin]# make menuselect
[root@myserver admin]# make && make install

In my sip.conf I have :

icesupport = yes

In my rtp.conf I have :

icesupport=yes
stunaddr=stun.l.google.com:19302

My SIP peer definition for webRTC client (sipml5) :

[77wrtc]
type=peer
host=dynamic
username=77wrtc
defaultuser=77wrtc
fromuser=77wrtc
secret=987654
disallow=all
allow=alaw
;allow=gsm
qualify=yes
canreinvite=no
dtmfmode=rfc2833
amaflags=billing
context=testwebrtc
nat=force_rport,comedia
transport=udp,ws,wss
encryption=yes
avpf=yes
force_avp=yes
icesupport=yes
directmedia=no
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass

SIP registration works fine :

[Aug  9 22:12:00]   == WebSocket connection from '178.119.146.190:36940' 
for protocol 'sip' accepted using version '13'
[Aug  9 22:12:00] -- Registered SIP '77wrtc' at 
178.119.146.190:36940
[Aug  9 22:12:00]> Saved useragent "IM-client/OMA1.0 
sipML5-v1.2016.03.04" for peer 77wrtc


But when I call from my webRTc client (sipml5 website demo) I have no 
audio. I think this is because there is no ICE support.


You can see in de SIP trace below and the RTP trace below that there is 
no ICE support in Asterisk.



[Aug  9 22:15:50] <--- SIP read from WS:178.119.146.190:36940 --->
[Aug  9 22:15:50] INVITE sip:419@178.18.90.230 SIP/2.0
[Aug  9 22:15:50] Via: SIP/2.0/WSS 
df7jal23ls0d.invalid;branch=z9hG4bKk2KDePVLlTquEfJzIk7LCMdnOHHk4wn1;rport
[Aug  9 22:15:50] From: 
"77";tag=sRCvFQq3gUMqkl6TKTcl

[Aug  9 22:15:50] To: 
[Aug  9 22:15:50] Contact: 
"77";+g.oma.sip-im;language="en,fr"

[Aug  9 22:15:50] Call-ID: 6aa0db27-a37b-69ee-8641-87c5bc444d32
[Aug  9 22:15:50] CSeq: 21553 INVITE
[Aug  9 22:15:50] Content-Type: application/sdp
[Aug  9 22:15:50] Content-Length: 1815
[Aug  9 22:15:50] Max-Forwards: 70
[Aug  9 22:15:50] Authorization: Digest 
username="77wrtc",realm="178.18.90.230",nonce="1d8fa83d",uri="sip:419@178.18.90.230",response="cd2da8d1cbf0a2795b38b2048a3a3c49",algorithm=MD5

[Aug  9 22:15:50] User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04
[Aug  9 22:15:50] Organization: Doubango Telecom
[Aug  9 22:15:50]
[Aug  9 22:15:50] v=0
[Aug  9 22:15:50] o=- 9108976588890881000 2 IN IP4 127.0.0.1
[Aug  9 22:15:50] s=Doubango Telecom - chrome
[Aug  9 22:15:50] t=0 0
[Aug  9 22:15:50] a=group:BUNDLE audio
[Aug  9 22:15:50] a=msid-semantic: WMS BJSlrOtzPj6wzI3QugifY58Oi18zpEbkNsps
[Aug  9 22:15:50] m=audio 41178 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 
105 13 126

[Aug  9 22:15:50] c=IN IP4 178.119.146.190
[Aug  9 22:15:50] a=rtcp:42197 IN IP4 178.119.146.190
[Aug  9 22:15:50] a=candidate:1668076467 1 udp 2122260223 192.168.1.122 
41178 typ host generation 0
[Aug  9 22:15:50] a=candidate:1668076467 2 udp 2122260222 192.168.1.122 
42197 typ host generation 0
[Aug  9 22:15:50] a=candidate:3794064647 1 udp 1686052607 
178.119.146.190 41178 typ srflx raddr 192.168.1.122 rport 41178 generation 0
[Aug  9 22:15:50] a=candidate:3794064647 2 udp 1686052606 
178.119.146.190 42197 typ srflx raddr 192.168.1.122 rport 42197 generation 0
[Aug  9 22:15:50] a=candidate:770649923 1 tcp 1518280447 192.168.1.122 0 
typ host tcptype active generation 0
[Aug  9 22:15:50] a=candidate:770649923 2 tcp 1518280446 192.168.1.122 0 
typ host tcptype active generation 0

[Aug  9 22:15:50] a=ice-ufrag:cd8nLIL1irEPdLZt
[Aug  9 22:15:50] a=ice-pwd:97awKXGiAt1TO5jlmb3GMXRy
[Aug  9 22:15:50] a=fingerprint:sha-256 
A2:EF:18:69:AE:9D:D9:90:45:0E:0D:84:5C:A4:AE:59:1C:53:09:11:F2:10:DF:F9:BB:20:E0:9D:6D:ED:BC:13

[Aug  9 22:15:50] a=setup:actpass
[Aug  9 22:15:50] a=mid:audio
[Aug  9 22:15:50] a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
[Aug  9 22:15:50] a=extmap:3 
http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

[Aug  9 22:15:50] a=sendrecv
[Aug  9 22:15:50] a=rtcp-mux
[Aug  9 22:15:50] a=rtpmap:111 opus/48000/2
[Aug  9 22:15:50] a=fmtp:111 minptime=10; useinbandfec=1
[Aug  9 

Re: [asterisk-users] EAGI script with missing audio on /dev/fd/3

2016-08-09 Thread Matt Fredrickson
On Tue, Aug 2, 2016 at 11:42 AM, nik600  wrote:
> Dear all
>
> i'm trying to access to the input audio raw stream with a very basic EAGI
> script:
>
>
> #!/bin/sh
> echo "EXEC Queue 2001"
> cat  /dev/fd/3 > /tmp/pippo
>
> This is my dialplan:
>
> exten => 001,NoOp(test)
> exten => 001,n,Answer
> exten => 001,n,EAGI(/tmp/my-eagi.agi)
>
>
> When i call, the script is executed and the call goes in queue, i can hear
> the MOH, the file /tmp/pippo is created but it is empty.
>
> Any idea or suggestion?

If you take out the "echo "EXEC Queue 2001" part of it, do you get
audio in the file?

-- 
Matthew Fredrickson
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

-- 
_
-- 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 & Vitelity Invite issues

2016-08-09 Thread Matt Fredrickson
On Mon, Aug 8, 2016 at 9:25 AM, Tammy Firefly  wrote:
> Hi All,
>
> We have asterisk 11.23 running sip to vitelity and from there IAX trunks
> split off to where they need to go.  We are having a problem getting
> chan_sip to quit ignoring re-invites from Vitelity.  Our side ends up
> sending a reinvite which their side & they do not support us sending a
> reinvite.  Ive tried:
>
> canreinvite=no which was supposedly replaced by:
>
> directmedia=no
>
> Can anyone shed any light on this matter?  I'd love to get this fixed.
>

Those options *should* influence chan_sip's reinvite behavior - at
least they have from my experiences working with chan_sip.  Do you
know what is triggering the reinvite in the first place, or does it
look like a normal media reinvite?

-- 
Matthew Fredrickson
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

-- 
_
-- 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" )

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


Re: [asterisk-users] Asterisk 13 High CPU usage

2016-08-09 Thread Matthew Jordan
On Sat, Aug 6, 2016 at 11:13 AM, Chirag Desai  wrote:
> All,
>
> I upgraded to asterisk 13.10. I have minimal load on the box. 20-30 calls a
> day.
>
> Right now, there are no calls on the box at all.
>
> top shows me this:
>
> PR 20
>
> NI 0
>
> VIRT 1570540
>
> RES 84620
>
> SHR 26296
>
> S S
>
> %CPU 99.7
>
> %MEM 8.4
>
> TIME+ 3468:39
>
> COMMAND asterisk
>
> When I run this command
> while true; do top -Hbc -p `pgrep asterisk` -n 1 && asterisk -rx "core show
> threads"; sleep 1; done
>
> I get this
>
> PID USER  PR  NIVIRTRESSHR S %CPU %MEM TIME+ COMMAND
> 29079 root  20   0 1570540  84620  26296 R 37.5  8.4   1178:31 asterisk
> 29010 root  20   0 1570540  84620  26296 R 31.2  8.4   1197:07 asterisk
> 29047 root  20   0 1570540  84620  26296 R 31.2  8.4   1186:48 asterisk
>
> Any ideas??
>
>
> 
>
> Previous message
> 
>
>
> Hi all,
>
> I was using 13.5 but upgraded today to 13.9 (13.10 came out a few hours
> after I upgraded).
>
> On both 13.5 and 13.9 asterisk seems to use 100% of the CPU. This usually
> happens a few hours after starting asterisk. A restart of asterisk gets the
> CPU back down, but only for a little while.
>
> There asterisk box has no call traffic flowing through it, just 15 or so
> registrations.
>
> I'm sure this is not best practise but for now I am using chan_sip and
> pjsip at the same time. My pjsip endpoints are using TLS.
>
> I am not sure where to start looking in order to debug the CPU usage by
> asterisk and would very much appreciate some guidance.
>
> Kind regards,
>
> Chirag

Hi Chirag -

That does seem a bit odd. If you have 'core show threads', then you do
have DEBUG_THREADS enabled, which can cause a pretty hefty performance
hit - but I still wouldn't expect your CPUs to just be sitting there
spinning.

Can you get a backtrace of the threads? [1] Make sure you have
DONT_OPTIMIZE and BETTER_BACKTRACES enabled. That should show us what
the threads are doing, which would give us a better idea of what is
spending all the time processing things.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

-- 
Matthew Jordan
Digium, Inc. | CTO
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-- 
_
-- 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] chan_pjsip ignoring endpoint device state (qualify) on dial

2016-08-09 Thread Faheem Muhammad
Jacek,
This might be a bug or configuration issue, but you need to understand the
SIP Session Timers. With Session Timers you can control the round trip time
and Call Setup time of SIP Requests.
In case of GSM Network with high delay you need to set the T1 timer a
higher value like 1000ms (500 ms default). Similarly you can reduce the
Call setup time by configuring 'T2' upto you choice as per you telephony
network. Configure t1min, timert1 and timerb according to your network.
Also set session-type=uas.


Regards,
Muhammad Faheem

On Tue, Aug 9, 2016 at 12:03 PM, Jacek Konieczny  wrote:

> Hi,
>
> We have been migrating our PBX system from Asterisk 1.8 and chan_sip to
> Asterisk 13 and chan_pjsip. Things are mostly, ok, but now I have
> stumbled on a behaviour difference I don't like.
>
> With chan_pjsip when a phone went unexpectedly offline (Ethernet cable
> disconnected) Asterisk would detect this quickly (through the 'qualify'
> pings), mark the phone as 'Unavailable' and fail immediately with
> 'CHANUNAVAIL' when dialling this phone.
>
> With Asterisk 13 and chan_pjsip qualify still works for determining
> current phone availability (endpoint shown as 'Unavailable' shortly
> after disconnecting the cable), but the phone is being dialled like
> nothing is wrong – Asterisk sends the INVITE and waits for the response,
> until SIP timeout (a bit more than 30s total). That is much longer time
> until 'CHANUNAVAIL' than I expect. It is also longer than the dial
> timeout in some cases, so I would get 'NOANSWER' instead of
> 'CHANUNAVAIL' which breaks my dialplan logic.
>
> Is that that the expected behaviour, a bug or a configuration problem?
> Am I supposed to check for device availability in my dialplan?
>
> Greets,
> Jacek
>
> --
> _
> -- 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
-- 
_
-- 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] chan_pjsip ignoring endpoint device state (qualify) on dial

2016-08-09 Thread Jacek Konieczny

Hi,

We have been migrating our PBX system from Asterisk 1.8 and chan_sip to
Asterisk 13 and chan_pjsip. Things are mostly, ok, but now I have
stumbled on a behaviour difference I don't like.

With chan_pjsip when a phone went unexpectedly offline (Ethernet cable
disconnected) Asterisk would detect this quickly (through the 'qualify'
pings), mark the phone as 'Unavailable' and fail immediately with
'CHANUNAVAIL' when dialling this phone.

With Asterisk 13 and chan_pjsip qualify still works for determining
current phone availability (endpoint shown as 'Unavailable' shortly
after disconnecting the cable), but the phone is being dialled like
nothing is wrong – Asterisk sends the INVITE and waits for the response,
until SIP timeout (a bit more than 30s total). That is much longer time
until 'CHANUNAVAIL' than I expect. It is also longer than the dial
timeout in some cases, so I would get 'NOANSWER' instead of
'CHANUNAVAIL' which breaks my dialplan logic.

Is that that the expected behaviour, a bug or a configuration problem?
Am I supposed to check for device availability in my dialplan?

Greets,
Jacek

--
_
-- 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