SIP pones registers on random port and not on 5060

Hello all ,

i am new to Asterisk. I have set up a asterisk server and created extensions. my phones registers well .
But the problem is that that all the phones registers on random port (not on 5060), though i have set the port to 5060.

as a result i am unable to make call as other ports are blocked by my firewall.

is there any way i can force every SIP phone to register on port 5060.

Thanks all.

I would say “from random port”, i.e. using arbitrary source ports and that’s absolutely normal and not related to Asterisk.

Then it will be client’s sole responsibility to receive the incoming requests on either

  • address and port that was in the Contact: header during the registration
  • address and port used de-facto to send registration to a Server

Thanks a lot for your response
can you please elaborate it how to fix it to register on 5060 only.

There is nothing to fix here yet, at least on Asterisk side.

You need to specify the local port to use on the SIP client side, Nothing to do on the Asterisk side,as @AndrewZ has told before

I have tried specifying in both hard phone and soft phone. But still these phones are registering on random ports.

You typically cannot specify this.

You need to think in terms of reducing the paranoia in your firewall.