How to change souce port

Dear all :

I have used asterisk 11.7.0 , but I found some eerie in asterisk that asterisk initiate a call to peer.

Asterisk use source port and destination port 5060 (UDP ) , How can I change the source port or random use source port ?

Best Regard


bindport in the general section. You will need to configure this in all the peers which register with Asterisk or with which Asterisk does not register. The source port, for outgoing calls and requests, is also the destination port for incoming calls and register requests.

It sound strange , The general is listen port for incoming session .

and when outgoing , it set source port is random . the other protocol is work fine . why asterisk use same port . It seem strange

It’s normal practice for SIP and makes firewalling easier.