Different ports for incoming/outgoing SIP signaling

Hello
I am running Asterisk 15.5.0 on Debian 9 (if this matters)
My SIP trunk provider requires UDP/5060 for incoming traffic ( to Asterisk ) and UDP/6060 for outgoing traffic ( from Asterisk )

I have configured sip.conf using default bindport , i.e. using 5060 by not overriding default values.
I can receive calls from outside but I am unable to make outbound calls

Seems to me that Asterisk doesn’t support this scenario within sip.conf ( correct me if I’m wrong ) and I am left to solve this using iptables DNAT. However, I have tried this in numerous ways with no success.

Has anyone this setup running ?

Best,
Jens

Sounds a strangte restiriction given that simple SIP clients will originate from a random port number. Are you sure that the non-standard port is not the one at their end, only.

Thanks, David

Sorry if this was unclear
My SIP trunk provider requires SIP signaling for my outgoing calls to be sent to their ip address port 6060 - i.e. target should be port 6060. to my knowledge there is no requirement for the source port

br
Jens

You can set that in the host parameter for chan_sip and I’m sure you can do the same for pjsip.

The incoming port is bindport.

In PJSIP everything is URIs, so it would be part of the URI ala:

sip:provider.com:6060

1 Like

if using chan_sip on peer configuration parameters use port=6060

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