Problem changing SIP ports on the Trunk!

Hello Freepbx users,

I have setup freepbx at a business and configured two trunks. When changing the SIP port on one trunk to something different than the other, the calls fail. If the SIP ports are identical on both trunks eg: 5062, 5064 ect then both trunks work.
Does anyone know why this happens?

username=xxxxxxxx
type=friend
secret=xxxxxxxx
reinvite=yes
qualify=no
port=5062
nat=yes
musiconhold=framed
insecure=very
host=byo.engin.com.au
fromuser=xxxxxxxx
fromdomain=byo.engin.com.au
dtmfmode=rfc2833
disallow=all
canreinvite=yes
auth=md5
allow=ulaw&alaw

Maybe because them ports are set by your provider and not you, if you move away from your trunk providers settings, how would they work?

Your trunk settings have to match your providers, it is a port for port setting. It is telling your connections to use port 5062.

Now if it was your internal phones, that is a different subject, but this is not, you can’t change them numbers unless you ask your provider. I have an idea of what they will tell you.

Like the above poster said, ask your provider.

Keep in mind that
"Port="

Is the port that you are sending TO
The provider will tell you what this should be

"Bindport="
Is the port you are listening/recieving on and you can customize.
If you change the bind port, you still have to tell your provider so they can update to send SIP to you on that port

Thanks for the reply, I did think this port issue was more of a provider problem.
The strange thing is we have 2 and 4 port ATA’s configured elsewhere that are all using different ports with the same provider. eg 5061, 5062, 5063 5064.

Just so it’s clear - the port number is used universally for INBOUND calls. If you place a call to your provider, they will be waiting for it on whatever port they specify, which is typically 5060. When they want to send you an incoming call, the will send it whatever port YOU specify. So, in the case of your four port ATA, 5061 through 5064 were communicated to your provider so that the individual phones could have separate numbers off the same box.

So, if they tell you to send them calls on 5060 and you don’t. the connection will fail. If your incoming configuration wants to use port 5062, they need to know that.

Another kind of important point is that, with Asterisk, everything (all of your incoming calls, anyway) can come in on the same port. Asterisk will differentiate the inbound calls based on the incoming DID (your phone numbers) and doesn’t NEED to use a different port. If you set up the system to accept different calls on different ports (regardless of the number of providers you are using) your system may end up a little more complicated than it needs to be.

So, when using a 4 port ATA, you have to specify which port the incoming call is using so that the call can be routed to the right phone.

When switching to Asterisk, you don’t need to worry about the inbound port number - you can easily set it to whatever port you want (with 5060 being the default) and let your VOIP provider(s) know that port. All of your calls with be routed to that server and the server will answer the call and do what you need it to do.