Where in the 2.4.0 GUI do you set IAX and SIP bindaddr

These used to be in the iax.conf and sip.conf but now they are in these included _general_additional files generated by the GUI. I do NOT want the default 0.0.0.0 but everytime i make a change in the GUI and click the orange bar… the default is set in place again. Did I miss something on the GUI to set these bind addresses?

This is urgent since I have to not use the GUI until I find how to fix this.

Thanks

When using FreePBX the only files you should edit and change are those that end in *_custom.conf. These files are at the top of the include list to override settings from any other includes that might happen after that.

sip.conf, iax.conf are re-generated every time there is a change in the system so will get over written each and every time. That is why the _custom.conf files are there so that does not happen.

au contraire. The iax.conf has the following contents:
[general]

; These will all be included in the [general] context
#include iax_general_additional.conf
#include iax_general_custom.conf
#include iax_registrations_custom.conf
#include iax_registrations.conf

; These should all be expected to come after the [general] context
;
#include iax_custom.conf
#include iax_additional.conf
#include iax_custom_post.conf

note that the first include is the iax_general_additional.conf [same goes for the sip_gneral_additional.conf file]

the iax_general_additional.conf file generated by freePBX has the following contents:

; do not edit this file, this is an auto-generated file by freepbx
; all modifications must be done from the web gui

bindport=4569
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes

as you correctly point out, this goes first and sets the bind address to everything. at that point i am screwed.

I need this to be different. If I put something in the _custom.conf files, the _additional.conf file with the BAD DEFAULT is still present and OPERATIVE. So, it seems there should be a page in freePBX that would allow me to set everything in the X_general_additional.conf files otherwise those files are worse than useless, they are actively counterproductive.

As the short term workaround, I have no choice but to hand edit this.

I am now in search of the code that generates these freePBX pages and I plan to hand edit the generating code until there is a better solution someone can show me.

The code that generates the iax_general_additional.conf and sip_general_additional.conf has all the information that is put into these files HARD CODED. The only work around right now is to hand edit this generator code to fit your needs. Ugly but it works for me.

go to /var/www/html/admin/modules/core/functions.inc.php

Just search for 0.0.0.0 and you will find the sections of the code that generate the above two files. I would hope this is on the freePBX urgent fix list.

mudslide67,

To get it addressed and not lost post it as a bug/feature request in the development site, report a bug section or it will get lost. Items posted here are read and responded to where things put into trac are tracked until they are addressed in some way shape or form.

will do

An alternative workaround is to change the permissions so that it can’t be overwritten to FreePBX, I have used this method previously and it has the added benefit that you don’t need to change the code when you upgrade.

robmac - i like your idea even better

I too am having this problem as I use a Virtual IP to allow me to have clustered asterisk extension servers, and with IAX and SIP you need to make sure you are using the HA address as your bindaddress otherwise you can get all sorts of problems, especially on-way audio on IAX trunks.

The problem with changing permissions is that the amportal/freepbx_engine script explicitly resets the permissions to asterisk.asterisk in /etc/asterisk.

BTW, Did anyone open a freepbx ticket for this?

Ok, I have found the Ticket for this, its #2747

rolly - that’s EXACTLY the reason i am in desperate need for this to be fixed…I have all these HA clusters that are now on my workaround [modified template] so the binding is fixed. It works fine but dangerous if I ever move the servers and forget about my lurking workaround.

Unfortunatly no one has reviewed or commented on #2747 yet. This seems like a very small and inconsequential change to, at the very least, stop specifying the IAX and SIP bindaddress at all and either let asterisk default to 0.0.0.0 or allow a user to specify something else in the XXX_general_custom.conf files.