X-PRE-PROCESS and Dialplan XML Module
Hi FreeSwitch Group, i'm a little bit confused about the X-PRE-PROCESS and XML Dialplan Module. I'm using a dynamic dialplan to include in FreeSwitch with <X-PRE-PROCESS cmd="exec" data="wget -qO - http://www.domain.com/dialplan.php" /> This don't work if i place X-PRE-PROCESS in at the top from public.xml outsite the <include> tag <include> <context name="public"> <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> </context> </include> but this works if X-PRE-PROCESS is in the <include> tag, but it's not clean XML, because the root is missing <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> My Question is what is the right anatomy of a XML to include my dialplan in the public.xml with X-PRE-PROCESS and exec wget ? Thanks for your answers. Daniel
hi daniel, the X-PRE-PROCESS only purpose is to read the *.xml files in the said directory at that point before proceeding further down. cool way of organizing configuration files. nothing else. if you want dynamic dialplan, use XML/Curl. On Tue, Jul 19, 2011 at 5:17 PM, Daniel Knoll <daniel@danielknoll.de> wrote:
Hi FreeSwitch Group, i'm a little bit confused about the X-PRE-PROCESS and XML Dialplan Module.
I'm using a dynamic dialplan to include in FreeSwitch with <X-PRE-PROCESS cmd="exec" data="wget -qO - http://www.domain.com/dialplan.php" />
This don't work if i place X-PRE-PROCESS in at the top from public.xml outsite the <include> tag
<include> <context name="public"> <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> </context> </include>
but
this works if X-PRE-PROCESS is in the <include> tag, but it's not clean XML, because the root is missing
<extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension>
My Question is what is the right anatomy of a XML to include my dialplan in the public.xml with X-PRE-PROCESS and exec wget ?
Thanks for your answers. Daniel
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Yes, afaik, the x-pre-process is done BEFORE the XML is parsed (which is why you can't comment it out) and just does a wget and replaces itself with the file it grabbed. -Avi On Tue, Jul 19, 2011 at 1:19 PM, Nandy Dagondon <gcd@i.ph> wrote:
hi daniel,
the X-PRE-PROCESS only purpose is to read the *.xml files in the said directory at that point before proceeding further down. cool way of organizing configuration files. nothing else.
if you want dynamic dialplan, use XML/Curl.
On Tue, Jul 19, 2011 at 5:17 PM, Daniel Knoll <daniel@danielknoll.de>wrote:
Hi FreeSwitch Group, i'm a little bit confused about the X-PRE-PROCESS and XML Dialplan Module.
I'm using a dynamic dialplan to include in FreeSwitch with <X-PRE-PROCESS cmd="exec" data="wget -qO - http://www.domain.com/dialplan.php" />
This don't work if i place X-PRE-PROCESS in at the top from public.xml outsite the <include> tag
<include> <context name="public"> <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> </context> </include>
but
this works if X-PRE-PROCESS is in the <include> tag, but it's not clean XML, because the root is missing
<extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension>
My Question is what is the right anatomy of a XML to include my dialplan in the public.xml with X-PRE-PROCESS and exec wget ?
Thanks for your answers. Daniel
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Correct On 19 July 2011 12:02, Avi Marcus <avi@avimarcus.net> wrote:
Yes, afaik, the x-pre-process is done BEFORE the XML is parsed (which is why you can't comment it out) and just does a wget and replaces itself with the file it grabbed. -Avi
On Tue, Jul 19, 2011 at 1:19 PM, Nandy Dagondon <gcd@i.ph> wrote:
hi daniel, the X-PRE-PROCESS only purpose is to read the *.xml files in the said directory at that point before proceeding further down. cool way of organizing configuration files. nothing else. if you want dynamic dialplan, use XML/Curl. On Tue, Jul 19, 2011 at 5:17 PM, Daniel Knoll <daniel@danielknoll.de> wrote:
Hi FreeSwitch Group, i'm a little bit confused about the X-PRE-PROCESS and XML Dialplan Module.
I'm using a dynamic dialplan to include in FreeSwitch with <X-PRE-PROCESS cmd="exec" data="wget -qO - http://www.domain.com/dialplan.php" />
This don't work if i place X-PRE-PROCESS in at the top from public.xml outsite the <include> tag
<include> <context name="public"> <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> </context> </include>
but
this works if X-PRE-PROCESS is in the <include> tag, but it's not clean XML, because the root is missing
<extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension>
My Question is what is the right anatomy of a XML to include my dialplan in the public.xml with X-PRE-PROCESS and exec wget ?
Thanks for your answers. Daniel
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi All, i used XML/Curl module, but the problem at this module is, that he ask the webserver for every call. It is better to have static diaplans (in my case these have the most call traffic) and after parsing static plan he ask the webserver. My X-PRE-PROCESS Option is described in XML/Curl Wiki under Sektion "Storing Static Dialplans." I found a little solution, but I think it is very dirty I use this without having "header('Content-Type: text/xml'); " in my php <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> If you had a solution, that -not- every call made a http request (only if don't find extension in static dialplan), I'm happy about that. Thanks for help Daniel 2011/7/19, Nandy Dagondon <gcd@i.ph>:
hi daniel,
the X-PRE-PROCESS only purpose is to read the *.xml files in the said directory at that point before proceeding further down. cool way of organizing configuration files. nothing else.
if you want dynamic dialplan, use XML/Curl.
On Tue, Jul 19, 2011 at 5:17 PM, Daniel Knoll <daniel@danielknoll.de> wrote:
Hi FreeSwitch Group, i'm a little bit confused about the X-PRE-PROCESS and XML Dialplan Module.
I'm using a dynamic dialplan to include in FreeSwitch with <X-PRE-PROCESS cmd="exec" data="wget -qO - http://www.domain.com/dialplan.php" />
This don't work if i place X-PRE-PROCESS in at the top from public.xml outsite the <include> tag
<include> <context name="public"> <extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension> </context> </include>
but
this works if X-PRE-PROCESS is in the <include> tag, but it's not clean XML, because the root is missing
<extension name="123456789"> <condition field="destination_number" expression="123456789"> <action application="set" data="hangup_after_bridge=true"/> <action application="javascript" data="app.js"/> </condition> </extension>
My Question is what is the right anatomy of a XML to include my dialplan in the public.xml with X-PRE-PROCESS and exec wget ?
Thanks for your answers. Daniel
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Daniel Knoll Liberdastr.. 9 12047 Berlin fon +49 (0)179 20 16 50 8 mail daniel@danielknoll.de web www.danielknoll.de
On Tue, Jul 19, 2011 at 5:16 AM, Daniel Knoll <daniel@danielknoll.de> wrote:
Hi All,
i used XML/Curl module, but the problem at this module is, that he ask the webserver for every call. It is better to have static diaplans (in my case these have the most call traffic) and after parsing static plan he ask the webserver.
Just how much traffic are you talking about here? Unless it's many hundreds of calls per second then a local web server should easily be able to handle the request load. Believe me, the amount of resources that you will save by using static XML first and then falling back to dynamic is minimal. -MC
Well if you really really wanna go crazy… this is not well documented: <?xml version="1.0"?> <document type="freeswitch/xml"> <X-PRE-PROCESS cmd="exec" data="/path/to/my_uber_leet_script_that_barfs_all_configs_to_stdout.pl"/> </document> :P /b PS Linux only. On Jul 19, 2011, at 1:30 PM, Michael Collins wrote:
Just how much traffic are you talking about here? Unless it's many hundreds of calls per second then a local web server should easily be able to handle the request load. Believe me, the amount of resources that you will save by using static XML first and then falling back to dynamic is minimal.
-MC
hahahaha. ok have understood. if even you say that ironic, it can't be a good solution. Now i use XML/curl, it's good, that i have 2 Webservers in a load balancing. I Think it's always good to show many opinions. The Mailing list is pretty much good way for that. Thanks to all Daniel Am 19.07.2011 um 22:18 schrieb Brian West:
Well if you really really wanna go crazy… this is not well documented:
<?xml version="1.0"?> <document type="freeswitch/xml"> <X-PRE-PROCESS cmd="exec" data="/path/to/my_uber_leet_script_that_barfs_all_configs_to_stdout.pl"/> </document>
:P
/b PS Linux only.
On Jul 19, 2011, at 1:30 PM, Michael Collins wrote:
Just how much traffic are you talking about here? Unless it's many hundreds of calls per second then a local web server should easily be able to handle the request load. Believe me, the amount of resources that you will save by using static XML first and then falling back to dynamic is minimal.
-MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
This is incredibly cool! why isn't this documented!? :P thanks for this! David On Tue, Jul 19, 2011 at 10:18 PM, Brian West <brian@freeswitch.org> wrote:
Well if you really really wanna go crazy… this is not well documented:
<?xml version="1.0"?> <document type="freeswitch/xml"> <X-PRE-PROCESS cmd="exec" data="/path/to/ my_uber_leet_script_that_barfs_all_configs_to_stdout.pl"/> </document>
:P
/b PS Linux only.
On Jul 19, 2011, at 1:30 PM, Michael Collins wrote:
Just how much traffic are you talking about here? Unless it's many
hundreds
of calls per second then a local web server should easily be able to handle the request load. Believe me, the amount of resources that you will save by using static XML first and then falling back to dynamic is minimal.
-MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (7)
-
Avi Marcus
-
Brian West
-
Daniel Knoll
-
David Villasmil
-
Michael Collins
-
Nandy Dagondon
-
Steven Ayre