Reload freezes on Asterisk SIP Settings page

Hi,

I’m new here, so sorry if I put something in the wrong place, etc…

FreePBX: 2.8.0.2
Asterisk: 1.6.2.7
Ubuntu: 10.04 LTS 32bit

This system was manually built and has been working perfectly for many weeks and still works as far as telephony goes. Recently upgraded FreePBX from 2.7 to 2.8.0.2.

Problem: If anything is changed on the “Tools - System Administration - Asterisk SIP Settings” page, after clicking Submit and clicking the orange bar and then clicking ‘Continue with Reload’ in the orange box, the reload does not complete. After a time, the orange box displays “Error: Did not receive valid response from server”. If I close the orange box and move to another category on the left menu, the orange confirmation bar disappears and the settings ARE entered into FreePBX.

So it all works, except it just hangs instead of completing the reload. In an effort to resolve this myself, I found advice to run /var/lib/asterisk/bin/retrieve.conf but apart from seeing errors, I don’t know where to look next. I’ve pasted the output from ‘retrieve.conf’ below in the hope that someone here can help.

Thanks in advance,
Joseph
[email protected]

====================

root@slb:/var/lib/asterisk/bin# ./retrieve_conf
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK

Sun, 25 Jul 2010 01:34:41 +1000 - Got event… registry
Sun, 25 Jul 2010 01:34:41 +1000 - No event handler for event 'registry’
Sun, 25 Jul 2010 01:34:42 +1000 - Got event… peerstatus
Sun, 25 Jul 2010 01:34:42 +1000 - No event handler for event 'peerstatus’
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = xxxxxxxx
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = asteriskuser
Added to globals: AMPDBPASS = xxxxxxxx
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/freepbx/admin/extensions.class.php on line 315
PHP Warning: Invalid argument supplied for foreach() in /var/www/freepbx/admin/extensions.class.php on line 315
Notice: no Queues defined
Notice: no Conferences defined
Notice: no Parking Lots defined
Notice: no iax trunks defined
Notice: no AMP Users defined
Please update your modules and reload Asterisk by visiting http://xxx.xxx.xxx.xxx/admin

Thanks again.

Same issue here. When I change the sip settings and press “Apply Configuration Changes” I get this exact error.

Recreated the error by creating a new extension, navigating to the fop (I use FOP2), navigating back to the System Status page and pressing the “Continue with Reload”.

Also confirmed that the error does not occur when I create a new extension and press “Apply Configuration Changes”.

you’re right on the 2.8, that helps,

now we just need to be able to get enough details to reproduce the issue (cause otherwise, it’s kind of not possible to debug it :slight_smile:

Philippe. Valid points. I will try to open a ticket once things calm down around here. I would like to note that the original poster mentions having updated to 2.8, and I can confirm that swapping to another page and then reloading does work, if I modify another module’s settings (see my second post in this thread).

IIRC, the reload bar isn’t even displayed in the other modules until you modify them; that or it still fails no matter where you press reload, until you modify the settings in another module, at which point it works as it should.

Tom

The original module owner is Bandwidth.com but it is very much supported by FreePBX.

As far as the issue, unfortunately it has not been able to be reproduced to determine what may be happening on your system.

It’s also likely to be more of a coincidence then an issue with that page as the reload process actually has nothing to do with the current page displayed, it is actually an ajax call into a new frame that runs retrieve_conf and then after that returns, tries to connect to the manager to do the reload.

If at all related to the page, it may be more related to some settings that changed that resulted in something happening once the new configuration file was written and some problem happened with the Asterisk connection after that.

Once thing that would be worth trying is after making the change, go to another page before pressing the Apply Configuration Bar and see if it still happens.

Also, if you are still having issues then you should upgrade to version 2.8 of FreePBX and see if the problem persists since it’s unlikely that any of the developers are going to have a 2.7 system to see if they can have the same issue happen. You’ll also probably need to provide all of the settings that you have set as well as the Asterisk version you are running and will want to file a ticket with all that information so that someone can look at it closer.

FreePBX core = 2.7.0.10
Framework = 2.7.0.6
Asterisk SIP Setting = 2.7.0.1

The changes appear to actually be written to the conf files correctly just the web UI shows the error. If you click to a different module the orange load bar disappears which also suggests there aren’t any outstanding changes.

This module is provided by Bandwidth.com and not actually FreePBX but would be nice to have a fix. I am sure its not a difficult one.

I am having the exact same issue. I opened “Asterisk SIP Settings” and entered NAT information. When I click “Submit”, I get the Orange Reload bar at the top of the screen, but I get the “Error: Did not receive valid response from server” message when I click “Continue with reload”. If I open any other page in FreePBX, the reload bar is not there.

Any ideas? Running Elastix 2.0 with Asterisk 1.6.2.10 and FreePBX 2.7.0.3. I haven’t updated each and every module yet, as I am still uncertain what will or will not break on the Elastix side, and whether that will matter (I only use FreePBX directly, not the embedded version).

Tom

It seems that, if I modify the “Asterisk SIP Settings” page, then modify another module, then reload from the other module, the settings get properly updated. NAT settings are written to sip_general_additional.conf, it appears, and all is as it ought to be. Reload only fails when called from “Asterisk SIP Settings”.

I have also since updated all modules for 2.7, and this problem is still present.