[Freeswitch-users] best way to change configuration files programmatically

Steven Ayre steveayre at gmail.com
Thu Oct 3 01:01:53 MSD 2013


+1 - I've used SFTP for this in the past to push the config onto the
server, verified it's valid XML and uploaded correctly with xmllint &
md5sum, and then done reloadxml over ESL. You could either push from the
central server or pull from the freeswitch ones (perhaps in a cronjob).

I've also heard of people storing their configs in git and doing a git
clone into the appropriate directory on the servers. Then it's just 'git
pull' + reloadxml (well, depending on the module - but that's all you need
for dialplan changes).

You can also get FreeSWITCH to use wget to download the dialplan over HTTP.
See
https://wiki.freeswitch.org/wiki/Mod_xml_curl#Alternative_ways_of_storing_static_configurations-
I can't remember if exec actions work during a reloadxml though.

Truth is there's a million and one ways to get the file onto the server. :)

If the wget one works on reloadxml that would be the simplest I guess
though. Might cause problems if there's any HTTP error though (500 Internal
Server Error -> blank result -> no dialplan, whereas copying the file you
can verify it before you reloadxml).






On 2 October 2013 21:31, Guillermo Ruiz Camauer <grcamauer at gmail.com> wrote:

> How about a shared directory? Or rcp the files?  You can have a program
> that writes the XML to the shared directory and then connect via ESL and
> execute a reloadxml as suggested by Callum above.  This avoids any delays
> from http requests or maintaining a HTTP server.  I guess it would depend
> on how many Freeswitch servers you are configuring this way, and how often
> you are changing the XML files.
>
> Guillermo
>
>
> On Wed, Oct 2, 2013 at 5:05 PM, Vik Killa <vipkilla at gmail.com> wrote:
>
>> yeah something like that... i use nginx + php5-fpm to generate the XML
>> though :)
>>
>>
>> On Wed, Oct 2, 2013 at 3:53 PM, crazygabry <crazygabry at gmail.com> wrote:
>>
>>> So you suggest to have a server witch Apache that contains all dialplans,
>>> directories and so on and let freeswitch ask to him while parsing xml
>>> right?
>>>
>>> Thank you very much
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://freeswitch-users.2379917.n2.nabble.com/best-way-to-change-configuration-files-programmatically-tp7595412p7595424.html
>>> Sent from the freeswitch-users mailing list archive at Nabble.com.
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> 
>>> 
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Guillermo Ruiz Camauer
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131002/511731d4/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list