Hello All,
I have an issue with PJSIP client accepting incoming calls on some of our devices. According to logs and pcap files, the 100 Trying is sent 10 seconds after the INVITE was sent by caller. This is causing a timeout, and hence the call fails. I am not sure why it would take 10 seconds for the PJSIP client to sent 100 trying. The call back function under PJSIP account, which is onIncomingCall gets called only after 10 seconds in this case.
It however works for few other devices normally, with the 100 trying response within the same second as the INVITE.
Any pointers into what might be happening ? or how I can investigate this issue better ?
Thanks
Maneesh
Based on our experience, "exactly 10 second delays" are invariably STUN
of sorts.
Kind Regards,
Jaco
On 2022/09/19 08:26, Maneesh Janyavula via pjsip wrote:
Hello All,
I have an issue with PJSIP client accepting incoming calls on some of
our devices. According to logs and pcap files, the 100 Trying is sent
10 seconds after the INVITE was sent by caller. This is causing a
timeout, and hence the call fails. I am not sure why it would take 10
seconds for the PJSIP client to sent 100 trying. The call back
function under PJSIP account, which is onIncomingCall gets called only
after 10 seconds in this case.
It however works for few other devices normally, with the 100 trying
response within the same second as the INVITE.
Any pointers into what might be happening ? or how I can investigate
this issue better ?
Thanks
Maneesh
Visit our blog: http://blog.pjsip.org
pjsip mailing list -- pjsip@lists.pjsip.org
To unsubscribe send an email to pjsip-leave@lists.pjsip.org
Hello Jaco,
Thank you for your response! Could you please give more context ? What were the issues with respect to STUN you have seen ? and how did you resolve it ?
And yes, every-time this happens the delay seems to be exactly 10 seconds.
Thanks
Maneesh
Hi,
On 2022/09/19 19:54, Maneesh Janyavula via pjsip wrote:
Hello Jaco,
Thank you for your response! Could you please give more context ? What
were the issues with respect to STUN you have seen ? and how did you
resolve it ?
Issue: 10s delay in the use cases STUN is supposed to help resolve.
Resolution: Rely on rport and disable STUN.
Disclaimer: We did not invest a boatload of time investigating, and it
may be due to misconfiguration, from what we could tell the timeout
mostly relates to trying to resolve the type of STUN you're sitting
behind due to the response in some of these cases timing out. I would
suggest getting in there with tcpdump and seeing what you transmit, and
check what responses, if any, you're getting back, and correlating the
timing with the SIP conversation.
I'm also not thinking this is an asterisk bug.
Kind Regards,
Jaco
Hi,
On 2022/09/19 21:06, Jaco Kroon wrote:
Hi,
On 2022/09/19 19:54, Maneesh Janyavula via pjsip wrote:
Hello Jaco,
Thank you for your response! Could you please give more context ? What
were the issues with respect to STUN you have seen ? and how did you
resolve it ?
Issue: 10s delay in the use cases STUN is supposed to help resolve.
Resolution: Rely on rport and disable STUN.
Disclaimer: We did not invest a boatload of time investigating, and it
may be due to misconfiguration, from what we could tell the timeout
mostly relates to trying to resolve the type of STUN you're sitting
behind due to the response in some of these cases timing out. I would
suggest getting in there with tcpdump and seeing what you transmit, and
check what responses, if any, you're getting back, and correlating the
timing with the SIP conversation.
I'm also not thinking this is an asterisk bug.
Or a PJSIP one for that matter. But these 10s delays ALWAYS in our
experience involves STUN. Found this on asterisk, as well as Yealink
and PJSIP based devices, invariably the client response, just delays at
different stages, but always 10s implies STUN somewhere along the line.
Kind Regards,
Jaco
Hello Jaco,
Thanks a lot for adding some context. We do not use asterisk. We wrote our own custom PJSIP based SIP client and talk to Twilio which acts as a SIP proxy. It seems likely a bug/issue on the SIP client/end point side.
Do you know how I could use rport in PJSIP, could not find any documentation. I have seen a setting for disabling STUN however, https://www.pjsip.org/docs/book-latest/html/reference.html?highlight=accountnatconfig#_CPPv4N2pj16AccountNatConfig10sipStunUseE
Could you please provide some details on how you achieved that ? Thanks!
Hi,
You will need to illustrate the full flow and ordering involving both
sides of your B2BUA agent in order to confirm.
No, I'm afraid I cannot provide you more details on the PJSIP side, I
only use it with asterisk and the code I've written with it directly is
such small bits and pieces it's hardly worth counting.
Kind Regards,
Jaco
On 2022/09/19 23:58, Maneesh Janyavula via pjsip wrote:
Hello Jaco,
Thanks a lot for adding some context. We do not use asterisk. We wrote
our own custom PJSIP based SIP client and talk to Twilio which acts as
a SIP proxy. It seems likely a bug/issue on the SIP client/end point side.
Do you know how I could use rport in PJSIP, could not find any
documentation. I have seen a setting for disabling STUN however,
https://www.pjsip.org/docs/book-latest/html/reference.html?highlight=accountnatconfig#_CPPv4N2pj16AccountNatConfig10sipStunUseE
Could you please provide some details on how you achieved that ? Thanks!
Visit our blog: http://blog.pjsip.org
pjsip mailing list -- pjsip@lists.pjsip.org
To unsubscribe send an email to pjsip-leave@lists.pjsip.org