[asterisk-users] Differences between Chan_SIP and PJSIP with NAT and STUN

Chirag Desai djchillerz at gmail.com
Sat Mar 5 14:35:07 CST 2016


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>


More information about the asterisk-users mailing list