Alternate sip port

Hi Guys,

I’m running a FreePBX exchange and loving it.

We want to map FreePBX to an alternate SIP port like 5061 for example i.e. have it on the default and another or alternatly have it just on the alternate port.

Can someone please explain the best way to do this with FreePBX in terms of the configuration files.

Thank you!

It would seem from your question that you would benefit from some background.

FreePBX ‘runs’ as a website (usually apache web server). What FreePBX does is to configure Asterisk []. Asterisk can use several different protocols to communicate with end points and other exchanges. One of those protocols is SIP which, on an asterisk machine, typically binds with port 5060; the setting for which is in /etc/asterisk/sip.conf

If you require two ports then you will need to make use of a magleing firewall e.g. IPtables (aka Linux Firewall). for further details post back.

yes we are aware of this but FreePBX does not allow us to edit the core asterisk config files hence our posting.

So what is the official way to do it ?

On a normal asterisk box we would change the bind port in sip.conf but how to do with FreePBX’s custom setup ?

That is correct there is not a GUI way to edit this as it’s a uncommon request.

The proper place to put it would be in the sip_general_custom.conf. If you look a the sip.conf you’ll see it’s the second file that is included under the [general] context. Also placing it in this file makes sure that that it will not get replaced by FreePBX in the future as it does not touch _custom.conf files.

Thanks so much.

So what is the exact command to make it bind SIP to port 5060 and 5061.

Also how to bind asterisk to listen to multiple IP addresses ?

Thank you!

It is the same as regular asterisk as all FreePBX is, is a fancy GUI for all the asterisk config files and a dialplan/dialplan generator. FreePBX does not change/enhance/remove any asterisk commands. It just breaks up many of the standard config files like sip.conf file into multiple sections some of which it changes all the time (when you apply changes) and some it will never touch (thus the *_custom.conf files).

google is your friend and everything everybody has said above is true. You can only do ONE port.

google asterisk sip port binding