Installation hosed after trying to create an extension

Hi!

As a test I tried to create a PJSIP extension (I normally use Chan_SIP…) on my PBX and when I submitted the web interface stopped working…

I tried to restart the machine and now nothing works…

The web interface tells me “Can Not Connect to Asterisk” and many entries are greyed out including, unfortunately, Extensions and more importantly “Backup & Restore” (very useful, how am I supposed to restore now?").

It was also complaining about retrieve_conf not returning data or something. I believe someone else had a similar problem in a thread I posted to recently and there was a module update so I updated my packages…

Now I get an exception at line 11 which apparently means that asman is not connected…

Is there a way to manually start it to see where it complains and, failing that, a way to restore from a backup even if the web interace greyed out the entry?

By the way, I am running FreePBX 13.0.190.12.

Thank you and have a nice day!

Nick

PS: That test entry I created was actually to help someone here… :unamused:

I found the syntax to restore from the command line but it throws an exception telling my that “Asterisk is not connected”…

I reallllly didn’t need that…

Bonjour Nick:

Is Asterisk running? If not can you restart or does it fail to start? You can start Asterisk with verbose flags with:

sudo -u asterisk asterisk -cvvv

Perhaps you will get a clue if it throws some errors as the startup fails. My guess is that there is something in one of the pjsip conf files that Asterisk doesn’t like, but I don’t know how that would be possible. For what it’s worth, I use pjsip on most of my systems without ever having seen this happen.

1 Like

:wink:

Bonjour Lorne!

I tried to restart it multiple times and it seemed to start but I did not actually check if that was true… It complained a lot each time I tried to shutdown about things such as zulu, ucpnode, etc…

I ran “asterisk -cvvv” as you suggested and there were a few “errors” (like a missing calendar.conf) but the most interesting entries were these ones:

 Loading pbx_lua.so.
[2017-01-26 21:35:25] ERROR[5542]: pbx_lua.c:1635 load_or_reload_lua_stuff: Error loading extensions.lua: cannot open '/etc/asterisk/extensions.lua' for reading: No such file or directory
 Loading res_pjsip_endpoint_identifier_dpma.so.
  == Parsing '/etc/asterisk/res_digium_phone.conf': Found
  == Parsing '/etc/asterisk/res_digium_phone_general.conf': Found
  == Parsing '/etc/asterisk/res_digium_phone_devices.conf': Found
  == Parsing '/etc/asterisk/res_digium_phone_applications.conf': Found
  == Parsing '/etc/asterisk/res_digium_phone_additional.conf': Found
  == Parsing '/etc/asterisk/res_digium_phone_firmware.conf': Found
asterisk: symbol lookup error: /usr/lib64/asterisk/modules/res_pjsip_endpoint_identifier_dpma.so: undefined symbol: dpma_register_config_handler

The LUA stuff i will have to check what it is about but, as you suggested, there is clearly some wrong with PJSIP…

asterisk: symbol lookup error: /usr/lib64/asterisk/modules/res_pjsip_endpoint_identifier_dpma.so: undefined symbol: dpma_register_config_handler

To me this sounded like that specific module didn’t match the Asterisk currently installed… I checked the date and it was indeed not compiled on the same date…

The others were compiled on the 16th on December, this one on the 3rd of November…

DPMA, isn’t that the Digium phone stuff (which as far as I remember I did remove ages ago…)?

I moved the module out of the way and now FreePBX does see Asterisk running…

For some reason something got messed up in my modules when I tried to deinstall or update them but I am fixing this right now…

I did issue a “yum update” and I am up to date…

It seems this was a module which was distributed in the past but no longer seems to be… As soon as I created a PJSIP extension its presence made all hell break lose…

Thank you very much for your help Lorne! Things are really looking up now…

Take care and have a nice day!

Nick

1 Like

Hi!

Looks like I am not out of the woods yet and this time it seems to be because of the restore I did.

(i did /var/lib/asterisk/bin/restore.php --restore=/var/spool/asterisk/backup/Full_backup/20170126-000001-1485406801-13.0.190.12-397423084.tgz --items=all , I hope that was the right syntax…)

Now when I try to edit my trunks (I did not try anything else, maybe the same thing would happen) I get:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘tr-peer-2-account’ for key 'PRIMARY’

INSERT INTO sip (id, keyword, data, flags) values (‘tr-peer-2’,?,?,‘0’)::
/var/www/html/admin/libraries/utility.functions.php

	if(is_object($extended_text) && method_exists($extended_text,"getMessage")) {
		$e = $extended_text;
		$extended_text = htmlentities($e->getMessage());
		$code = $e->getCode();
		throw new \Exception($text . "::" . $extended_text,$code,$e);
	} else {
		$extended_text = htmlentities($extended_text);
		throw new \Exception($text . "::" . $extended_text);

tr-peer-2 is indeed there but it looks like it forgot it belongs to that trunk…

Things are not perfect but it looks like they are at least functioning well enough for now so I will restore the database one more time and try to fix this on the weekend…

Have a nice day!

Nick

This is not related to your Asterisk issues or your restore. This is a bug in the edge version of the core module:
http://issues.freepbx.org/browse/FREEPBX-14015

We should see a fix published shortly to edge, but if necessary, you can roll back Core to 13.0.117.3.

1 Like

Hi Lorne!

Thank you very much! I will test it as soon as I can (looks like it will have to be tomorrow)…

Do you think I should create a ticket about that mismatched and possibly deprecated module which had not been erased? Was it just something that went wrong only for me or is there a possibility others might be affected?

Thank you very much and have a nice day!

Nick

Things seems to have went back to normal after I applied the latest module updates…

Thank you very much for your help Lorne!

Nick

1 Like

The same problem happened again today…

I had recently updated the asterisk packages using yum and the server was rebooted today and had the exact same problem…

I don’t quite understand why that mismatched module was installed again…

Have a nice day!

Nick

Hi!

I found the source of my problems…

It looks like I might, a long time ago, excluded res_digium_phone.so from loading. I assume I did that to stop having those annoying No Valid DPMA License found error messages…

It worked well for quite a while until recently when res_pjsip_endpoint_identifier_dpma.so started complaining about an undefined symbol, dpma_register_config_handler and crashing Asterisk.

This was most likely provided by res_digium_phone.so and since it was no longer loading that dependency was no longer met…

Removing res_digium_phone.so from the exclusions fixed the problem without having to move/delete/exclude res_pjsip_endpoint_identifier_dpma.so.

I will definitely think twice about excluding a module from now on…

Have a nice day!

Nick

1 Like