/usr/share/freeswitch/scripts content overwriten constantly

Status
Not open for further replies.

czbg

Member
Sep 27, 2018
33
1
8
Hi,

here I have one CentOS 7 FPBX install. Customer's system requires Diversion header on transfered calls. There is no such functionality in FPBX, so I had to fix some scripts in /usr/share/freeswitch/scripts/, to include Diversion header.

Problem I have now is that every now and then, the content of this directory gets overwriten with default scripts. I cannot find what is causing this. Does anyone have an idea where to look?

I cannot remember how I populated /usr/share/freeswitch/scripts/ directory, since default centos script does not have this step at all, while debian and devuan both have a script in /usr/src/fusionpbx-install.sh/debian/resources/switch/source-to-package.sh, which does this. I may have done that step manually.

Please help I'm lost :D
 

KonradSC

Active Member
Mar 10, 2017
166
98
28
Upgrade App Defaults copies the scripts from "/var/www/fusionpbx/resources/install/scripts" to your active scripts directory.
 
  • Like
Reactions: JamesBorne

czbg

Member
Sep 27, 2018
33
1
8
KonradSC, thanks a million :D I really hope that's it. Is there anything else that could do that?
 

czbg

Member
Sep 27, 2018
33
1
8
looks like, this was triggered by adding a new domain. for now, I commented out the line $obj->copy_files(); from /var/www/fusionpbx/app/scripts/app_defaults.php
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
@czbg Can you not just submit a pull request and get the Diversion header added properly.
 

czbg

Member
Sep 27, 2018
33
1
8
because it's more of a workaround than a solution. I've just added:
Code:
session:setVariable("sip_h_Diversion", "<sip:" .. caller_destination .. "@" .. domain_name .. ">;privacy=off;counter=1;screen=no");

in /usr/share/freeswitch/scripts/app/ring_groups/index.lua

I am not sure thats the way to go...
 
Status
Not open for further replies.