Broken SipSettings module

describe “more serious”… because fwconsole chown didnt fix the issue

[root@voip ~]# fwconsole chown
Setting Permissions…
24743/24743 [============================] 100%
Finished setting permissions

Are the following files present on your system in the folder /etc/asterisk:

sip_nat.conf
sip_general_custom.conf
sip_custom.conf

Did you file a bug?

edit: provide the output from:

ls -l /etc/asterisk/sip_*

[root@voip ~]# ls -l /etc/asterisk/sip_*
-rw-r–r–. 1 asterisk asterisk 23915 Oct 1 06:23 /etc/asterisk/sip_additional.
-rw-r–r–. 1 asterisk asterisk 1533 Dec 20 2014 /etc/asterisk/sip_custom.conf
-rw-r–r–. 1 asterisk asterisk 1533 Nov 17 2014 /etc/asterisk/sip_custom_post
-rw-r–r–. 1 asterisk asterisk 1503 Oct 1 06:23 /etc/asterisk/sip_general_add
-rw-r–r–. 1 asterisk asterisk 0 Nov 4 2014 /etc/asterisk/sip_general_cus
-rw-r–r–. 1 asterisk asterisk 0 Nov 4 2014 /etc/asterisk/sip_nat.conf
-rw-r–r–. 1 asterisk asterisk 1798 Oct 1 06:23 /etc/asterisk/sip_notify_addi
lrwxrwxrwx. 1 asterisk asterisk 52 Nov 4 2014 /etc/asterisk/sip_notify.conf
-rw-r–r–. 1 asterisk asterisk 0 Nov 4 2014 /etc/asterisk/sip_notify_cust
-rw-r–r–. 1 asterisk asterisk 871 Oct 1 06:23 /etc/asterisk/sip_registratio
-rw-r–r–. 1 asterisk asterisk 0 Nov 4 2014 /etc/asterisk/sip_registratio
[root@voip ~]#

The bug report is located here http://issues.freepbx.org/browse/FREEPBX-10439

fwconsole chown should fix this

[root@voip ~]# date
Sat Oct 3 20:51:48 EDT 2015
[root@voip ~]# fwconsole chown
Setting Permissions…
24773/24773 [============================] 100%
Finished setting permissions
[root@voip ~]#

Nope still an issue

Hi!

Looks to me like you have something which displeases FreePBX in /etc/asterisk/sip_custom.conf since the other two files appears empty in your “ls”…

Could you post the content of that file but maybe alter it very slightly if there’s anything you don’t want to post in there…

Don’t alter it too much though, maybe the key to that problem is in what you will want to obfuscate…

Have a nice day!

Nick

You could also copy that file elsewhere and empty it too see if you still have the problem…

My guess is you won’t…

Good luck and have a nice day!

Nick

[root@voip ~]# vi /etc/asterisk/sip_custom.conf

host=alpha4.callcentric.com

[callcentric5](home-callcentric);
host=alpha5.callcentric.com

[callcentric6](home-callcentric);
host=alpha6.callcentric.com

[callcentric7](home-callcentric);
host=alpha7.callcentric.com

[callcentric8](home-callcentric);
host=alpha8.callcentric.com

[callcentric9](home-callcentric);
host=alpha9.callcentric.com

[callcentric10](home-callcentric);
host=alpha10.callcentric.com

[callcentric10](home-callcentric);
host=alpha11.callcentric.com

[callcentric11](home-callcentric);
host=alpha11.callcentric.com

[callcentric12](home-callcentric);
host=alpha12.callcentric.com

[callcentric13](home-callcentric);
host=alpha13.callcentric.com

[callcentric14](home-callcentric);
host=alpha14.callcentric.com

[callcentric15](home-callcentric);
host=alpha15.callcentric.com

[callcentric16](home-callcentric);
host=alpha16.callcentric.com

[callcentric17](home-callcentric);
host=alpha17.callcentric.com

[callcentric18](home-callcentric);
host=alpha18.callcentric.com

[callcentric19](home-callcentric);
host=alpha19.callcentric.com

[callcentric20](home-callcentric);
host=alpha20.callcentric.com

[callcentricA](home-callcentric);
host=doll3.callcentric.com

[callcentricB](home-callcentric);
host=doll4.callcentric.com

[callcentricC](home-callcentric);
host=doll5.callcentric.com

Hi!

Could you upload it to pastebin.com and post the URL here?

The forum software seems to have eaten up some characters (I assume brackets…)…

edit: You did remove some stuff from this right?

Thank you!

Nick

PS: And if you move that file out of the way, does it work?

Euh, you have two callCentric10 entries???

Seems to me like this is a bad cut and paste and this could be what is causing trouble…

Nick

I am shocked as well, but they requested it be setup that way, and it has been setup that way for 2 years now without any weirdness.

Euh, what does that do exactly?

I assume you do IP authentication right?

Using your file makes my box crash…

I could be wrong but from past exchange with Andrew I had the impression that “parse_ini_file()” is relatively new code and your file contains something it never expected to see in this file… Your previous install probably had a different way to parse that file…

It’s not the double callcentric10 entry that makes it crash though, it’s what I assume to be comments (those “(home-callcentric)” entries)… Comments should start with “;” not end with it…

I wouldn’t trust that weird callcentric10 entry though unless a FreePBX dev says it has a use…

Have a nice day!

Nick

If there’s actually a use for those “(home-callcentric)” and if they are not meant to be comment then maybe you are not putting them in the right file…

In quite a few places people were putting these callcentric entries in /etc/asterisk/sip_custom_post.conf

(including on this forum, Unable to use inbound trunk - Sending fake auth rejection? )

edit: I see that in this file parenthesis have a special meaning but it seems to be limited to “(+)” and “(-)” though…

This file is not parsed by FreePBX (at least not where this currently crashes)…

Seems to me that what callcentric recommends seems overly complex and difficult to maintain, I hope there’s a gain somewhere to going that way… I have trunks with 4 different providers and none of them required me to do something as “peculiar” as that…

Good luck and have a nice day!

Nick

The forum mangled the file contents (now fixed). Temporarily remove the contents of that file, and retest the GUI. When you confirm what the problem is, fix the file content, noting specifically that lines preceeding alpha4 appear to be missing.

Lorne, when I put that file on my FreePBX box, it makes it crash in the same way…

It looks like it’s the weird syntax used in the file which is displeasing parse_ini_file…

From what I could gather it looks like it’s supposed to be telling to use the definition of the “home-callcentric” trunk as some sort of template for all those other entries and you are right, other people have entries preceding the “callcentric5” one but this is not the cause of the crash.

I did create a dummy “home-callcentric” trunk on my box to make sure this is not what was making it crash here and I did create those missing entries as well…

If I put the content of his file in /etc/asterisk/sip_custom_post.conf as others are doing in a thread here or on elsewhere on the web FreePBX is happy since it’s not one of the file FreePBX parses… As to whether it works as designed, I do not know.

Have a nice day!

Nick

chmod 0644 /etc/asterisk/*.conf

@jfinstrom it’s the content of the file which is causing problems, not its visibility to the application…

parse_ini_file is unable the handle the “(home-callcentric);” entries present in that file.

Parenthesis have a special meaning to parse_ini_file, see PHP: parse_ini_file - Manual, more specifically this:

Characters ?{}|&~!()^" must not be used anywhere in the key and have a special meaning in the value.

The file has been accessed and parsed when the application crashes, it’s what parse_ini_file returns the code that follows can’t handle…

Other people are putting that callcentric configuration in /etc/asterisk/sip_custom_post.conf which is not parsed by FreePBX so that’s what the OP should try next…

(actually from what I understood this is the file to use for stuff like this…)

Have a nice day!

Nick

Fixed in sipsettings v13.0.14.5

What Andrew did is essentially replace parse_ini_file (which was unable to handle the peculiar syntax required for callcentric) with custom code…

see https://github.com/FreePBX/sipsettings/commit/18edb4e1f2e1c8173908add8defda0b1035c3958

Have a nice day!

Nick