[Freeswitch-users] mod_xml_curl - serving configuration
Tihomir Culjaga
tculjaga at gmail.com
Mon Apr 16 11:54:16 UTC 2018
Hi all!
I'd like to use mod_xml_curl for serving configurations to freeswitch. Im
wondering how to approach X-PRE-PROCESS includes properly.
as an example, this is request for sofia.conf:
hostname=FS01§ion=configuration&tag_name=configuration&key_name=name&
key_value=sofia.conf&Event-Name=REQUEST_PARAMS&Core-UUID=
118a9f3f-9ee4-4688-9ba0-a510211cd6d3&FreeSWITCH-Hostname=incfswitchtest01.
local&FreeSWITCH-Swi
tchname=FS01&FreeSWITCH-IPv4=192.168.50.66&FreeSWITCH-IPv6=
%3A%3A1&Event-Date-Local=2018-04-11%2015%3A29%3A39&Event-
Date-GMT=Wed,%2011%20Apr%202018%2013%3A29%3A39%20GMT&Event-Date-Timestamp=
1523453379037164&Event-Calling-File=sofia.c
&Event-Calling-Function=config_sofia&Event-Calling-Line-Number=4246&Event-
Sequence=19
this is sofia.conf.xml we have on the file system:
<document type="freeswitch/xml">
<section name="configuration">
<configuration name="sofia.conf" description="sofia Endpoint">
<global_settings>
<param name="log-level" value="0"/>
<!--<param name="auto-restart" value="false"/>-->
<param name="debug-presence" value="0"/>
<!--<param name="capture-server" value="udp:homer.domain.com:5060
"/>-->
</global_settings>
<profiles>
<X-PRE-PROCESS cmd="include" data="../sip_profiles/*.xml"/>
</profiles>
</configuration>
</section>
</document>
here we have a X-PRE-PROCESS include command
Can i just set the "pointers" to profile names e.g.:
<profiles>
<profile name="internal"/>
<profile name="external"/>
<!-- any new profile adds here :=) -->
</profiles>
and wait for a new more specific request from FS with profile=<profile
name> to serve the entire profile configuration ?
hostname=FS01§ion=configuration&tag_name=configuration&key_name=name&
key_value=sofia.conf&Event-Name=REQUEST_PARAMS&Core-UUID=
118a9f3f-9ee4-4688-9ba0-a510211cd6d3&FreeSWITCH-Hostname=incfswitchtest01.
local&FreeSWITCH-Swi
tchname=FS01&FreeSWITCH-IPv4=192.168.50.66&FreeSWITCH-IPv6=
%3A%3A1&Event-Date-Local=2018-04-11%2015%3A29%3A42&Event-
Date-GMT=Wed,%2011%20Apr%202018%2013%3A29%3A42%20GMT&Event-Date-Timestamp=
1523453382092765&Event-Calling-File=sofia.c
&Event-Calling-Function=launch_sofia_worker_thread&
Event-Calling-Line-Number=2949&Event-Sequence=24&profile=internal
what do i return here ?
Is that correct ?
<document>
<section name="configuration">
<profile name="myProfileName">
<!-- myProfile data goes here -->
</profile>
</section>
</document>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180416/c3205e1b/attachment.html>
More information about the FreeSWITCH-users
mailing list