Need help to understand FPBX+FS installation

Status
Not open for further replies.

smashlar

New Member
Jul 7, 2017
7
0
1
53
I'm trying to complete the FPBX+FS installation on my Debian jessie server. In my previous message, I had a problem with the install.sh script, and I managed to solve it by changing some paths (see my thread "I'm stuck..." posted a few days ago.

After changing those paths, the install process completed and I was able to get onto FPBX pages, create extensions and have those device regularly registered. It looked like it was all good, but... there's a problem: whenever I change some value in the Advanced Menu, I cannot get it copied into FS. Just as an example:
- in Advanced -> Variables I put new values (1.2.3.4) in external_rtp_ip and external_sip_ip
- in Advanced -> Sip Profiles -> Internal --> Settins I have ext-rtp-ip = $${external_rtp_ip} and same for sip_ip

I would expect the value 1.2.3.4 to show up in Status -> SIP Status, but the values there are not changed, they stay at the initial value, i.e. $${local_ip_v4}

The only way to get the external IP into the SIP profile was to manually insert the value in:
/usr/local/freeswitch/conf/vars.xml

and restart FS. So my question is:

How does FusionPBX exchange values with Freeswitch? Is there some specific mod, maybe one I forgot to enable?

Thanks in advance for your help.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
What you probably never did was flush memcache, once ou have changed many things in vars, default settings etc, you need to flush memcache before restarting freeswitch. Memcache does not get cleared for a freeswitch restart.

You are probably not in a good place anyway as the standard install script should work absolutely flawlessly.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
The /usr/local/freeswitch path implies that you are doing a source based install, do you have a reason for this??
 

smashlar

New Member
Jul 7, 2017
7
0
1
53
Thanks for your answer! I'll try the memcache flush and see how it goes.

This installation turned out to be a nightmare, I'm quite sure the standard install is smooth like silk, but I had to change a few parameters, and I'm not able to get it the right way.

I changed these:
- Install from source because I need to recompile with --enable-zrtp. I used FS and FPBX stable version, not master.
- Change website destination directory from /var/www to /home/www due to server filesystem limits
- Had to stick with Apache, so I commented out the Nginx install script and adjusted the apache sites-available/.conf accordingly
- FPBX document root is at https://domain.tld/fusionpbx

After changing the parameters in /usr/local/freeswitch/conf/vars.xml the PBX is now running, devices can register and conversation between extensions is ok.

But I'm still missing the CDRs and I noticed that Advanced -> XML Editor is not getting the correct Project Path. I can tell that because the "icon_gear.png" icon is not showing up, path looks wrong, here's what I see:
- icon's path opened in a new browser page shows as https://domain.tld/fusionpbxresources/images/icon_gear.png

Looks like there's a missing "/" after "https://domain.tld/fusionpbx" and before "resources/...".

I searched the icon filename "icon_gear.png" and found it on github FusionPBX repository in this directory:
/fusionpbx/app/edit/resources/images/icon_gear.png

If I open this page:
https://domain.tld/fusionpbx/app/edit/resources/images/icon_gear.png

the icon is shown correctly. Referring file is "cliplist.php" on line 157:
fusionpbx/app/edit/cliplist.php LINE 157

Hereafter I got lost...
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
I do not think the apache side of things is maintained really, also I'm pretty sure zrtp is included already.
 

smashlar

New Member
Jul 7, 2017
7
0
1
53
I followed this tutorial:
https://freeswitch.org/confluence/display/FREESWITCH/ZRTP

and I thought recompiling was requested to get ZRTP. I'll check if it's available in the packaged version.

Anyway, now the PBX is running, configuring Apache was a simple step.

What I'm really missing here is that I do not understand how FusionPBX communicate with FreeSWITCH, I mean, if I change a value in Advanced --> Variables, how this new value is transferred to FS? Let me show an example (and thanks again for your patience in following this!):

I will change global_codec_prefs. Before starting, I have two identical values:

1) In FPBX
global_codec_prefs = PCMU,PCMA,G722,G7221@32000h,G7221@16000h,GSM (this is a value I put in this field after install)

2) Same value is in /usr/local/freeswitch/conf/vars.xml:
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA,G722,G7221@32000h,G7221@16000h,GSM" />

Please note that these two values are the same because I put the string manually into vars.xml.

I will now change the value in Advanced --> Variables, I'll put this new string:
global_codec_prefs = PCMU,PCMA,G722

Then I'll go thru:
- Save variables
- Update Apps Defaults
- Flush memcache
- Logout + Login

After that, I'd expect /usr/local/freeswitch/conf/vars.xml to be changed to reflect the new value of global_codec_prefs, so that this new value will be used at next FS restart.

What actually happens is that /usr/local/freeswitch/conf/vars.xml is UNCHANGED, and the new value, as defined in FPBX, never shows up in FS.

And I do not understand why! :-(
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
The changing in advanced variables should do it with a memcache flush followed by a freeswitch restart. The app defaults will be putting it back to the default values, thats also why updating the file directly is no good. Most of the config is served dynamically from memcache and the db. Though you say all is cool with the apache, there are a few rewrite rules that may not be in the apache that are in the nginx you may want to check the nginx config and make sure they are reflected in the apache config.
 
Status
Not open for further replies.