Change default port PJSIP

I can’t find the documentation on how to change the default Asterisk port. I’ve found old and outdated posts on adding bindport to sip.conf, but can’t find anything on what do with pjsip.conf (assuming that’s where I change the default port?).

How do I change the default Asterisk port?

PJSIP doesn’t have an automatic transport. It’s explicitly configured. If no port is specified then it uses the SIP protocol default defined port for the chosen protocol (UDP/TCP/TLS) but can always be overridden by specifying it on the bind option on the transport as part of the IP address, for example:

bind=172.16.1.100:5070
1 Like

So if I’m understanding you correctly, if I have in pjsip.conf:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

And if I want to change the default port (which is 5060 for udp) to 5080, I would do:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5080

Is that correct?

If you have it there, it is in the wrong file!

D’oh! In real life, I have it in pjsip.conf. But on the forum here, my brain stopped functioning for a minute and I wrote extensions.conf. LOL

Yes, that would be correct.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.