Chirag Desai
2016-Mar-05 20:35 UTC
[asterisk-users] Differences between Chan_SIP and PJSIP with NAT and STUN
I have two accounts on Asterisk 13. One uses chan_sip and the other pjsip. In my snom 760 the setup for these two accounts is identical. When I call echo test from the account using chan_sip audio comes through fine. When I call echo test from the account using pjsip there is no audio. With rtp set debug on, I can see that audio is being sent to the snom's internal IP 192.168.0.x I can add a stun server in the config for this account and RTP flows to the Public IP and I get audio. I was wondering why there is a difference between pjsip and chan_sip so that one works without stun and the other requires it. Does anybody know why? Maybe my settings are off in pjsip. Here's how I have my endpoint configured: [test] type=endpoint context=dial_out disallow=all allow=alaw allow=speex allow=speex16 allow=speex32 allow=gsm allow=ulaw allow=g722 auth=test aors=test direct_media=no media_encryption=sdes media_encryption_optimistic=yes rtp_symmetric=yes force_rport=no rewrite_contact=yes ; necessary if endpoint does not know/register public ip:port ice_support=yes ;This is specific to clients that support NAT traversal ;for media via ICE,STUN,TURN. See the wiki at: ;https://wiki.asterisk.org/wiki/x/D4FHAQ ;for a deeper explanation of this topic. [test] type=auth auth_type=userpass password=redacted username=test [test] type=aor remove_existing=yes max_contacts=2 qualify_frequency=60 Looking forward to your thoughts. Kind Regards, C -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160305/1fae1d5b/attachment.html>
Joshua Colp
2016-Mar-07 11:32 UTC
[asterisk-users] Differences between Chan_SIP and PJSIP with NAT and STUN
Chirag Desai wrote:> I have two accounts on Asterisk 13. One uses chan_sip and the other pjsip. > > In my snom 760 the setup for these two accounts is identical. > > When I call echo test from the account using chan_sip audio comes > through fine. > > When I call echo test from the account using pjsip there is no audio. > > With rtp set debug on, I can see that audio is being sent to the snom's > internal IP 192.168.0.x > > I can add a stun server in the config for this account and RTP flows to > the Public IP and I get audio. > > I was wondering why there is a difference between pjsip and chan_sip so > that one works without stun and the other requires it. Does anybody > know why? Maybe my settings are off in pjsip.There should be nothing different, except for how you configure things. What is the full PJSIP configuration? What is the environment where Asterisk is running? Is ICE actually in use on the other side? What is the full SIP trace? -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org