[Home]

Summary:ASTERISK-24481: Asterisk PJSIP 16-18 second delay in reply to INVITE
Reporter:Anthony Messina (amessina)Labels:
Date Opened:2014-11-02 09:48:03.000-0600Date Closed:2014-11-02 10:10:28.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:SVN Frequency of
Occurrence
Constant
Related
Issues:
Environment:Fedora 20 x86_64, Asterisk 13: branches/13@426996Attachments:( 0) asterisk-full.log
Description:After upgrading to Asterisk 13 release (had been previously using branches/13@425991), Inbound and outbound PJSIP calls take 18 seconds to initiate.  I will attach a redacted "full" debug log.  On a wall clock, for a call from a SIP phone endpoint connected directly to Asterisk, it's something like the following:
{code}
[00:00] INVITE (from phone, repeated several times due to Asterisk's non-timely reply)
...
...
[00:18] Trying (from Asterisk)
... Call proceeds normally...
{code}
Comments:By: Anthony Messina (amessina) 2014-11-02 09:49:23.631-0600

"Full" debug log detailing the 18 second delay in Asterisk to respond "Trying" to an INVITE from a directly connected endpoint.

By: Joshua C. Colp (jcolp) 2014-11-02 09:57:57.823-0600

What is the pjsip.conf and rtp.conf configuration? It looks as though it is actually hanging during ICE session setup, specifically when gathering candidates. This can occur if the remote STUN/TURN server is unreachable.

By: Anthony Messina (amessina) 2014-11-02 10:07:57.353-0600

I'll be darned, Josh.  I tried working with this most of the night with the following in /etc/asterisk/rtp.conf.  I haven't used STUN on my Asterisk server in years and must have left this in there.  After commenting out "icesupport" and "stunaddr", the delay is indeed gone.  I apologize for wasting your time on this Sunday morning.  
{code}
[general]
rtpstart=10000
rtpend=20000
icesupport=true
stunaddr=stun.counterpath.net
{code}