XML curl and multiple extension in dialplan
Greetings, We use XML curl to fetch our dial plan extensions from a database. As per FS wiki we can only return one XML extension upon FS request. Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like? Thanks a lot.
Hello Paul I also use mod_xml_curl for a dialplan. I've solved this issue by generating the XML extension dynamically. My fastcgi daemon checks the input variables like caller id, originator, e.t.c, makes routing decision and dynamically generates only one XML extension. So, there is no real need for creating complex dialplan on mod_xml_curl output. Nazim On 03/07/2010 11:03 PM, paul gore wrote:
Greetings, We use XML curl to fetch our dial plan extensions from a database. As per FS wiki we can only return one XML extension upon FS request. Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?
Thanks a lot.
_______________________________________________ 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
Thanks fro the input. I thought about such approach, the only problem I see is there that I essentially would have to duplicate FS dial plan parsing functionality, so my question basically is there a way to avoid that? I have seen a Ruby dial plan example on XML curl wiki page which actually seem to generate response with multiple extensions, but unfortunately FS cannot read such response. On Sun, Mar 7, 2010 at 3:18 PM, Nazim Agabekov <nazim.agabekov@gmail.com>wrote:
Hello Paul
I also use mod_xml_curl for a dialplan. I've solved this issue by generating the XML extension dynamically. My fastcgi daemon checks the input variables like caller id, originator, e.t.c, makes routing decision and dynamically generates only one XML extension. So, there is no real need for creating complex dialplan on mod_xml_curl output.
Nazim
On 03/07/2010 11:03 PM, paul gore wrote:
Greetings, We use XML curl to fetch our dial plan extensions from a database. As per FS wiki we can only return one XML extension upon FS request. Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?
Thanks a lot.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ 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
Can you pastebin a sample dialplan and script? I'd like to better visualize what problem you're trying to solve. -MC Sent from my iPhone On Mar 7, 2010, at 2:13 PM, paul gore <paul.gore.j@gmail.com> wrote:
Thanks fro the input. I thought about such approach, the only problem I see is there that I essentially would have to duplicate FS dial plan parsing functionality, so my question basically is there a way to avoid that? I have seen a Ruby dial plan example on XML curl wiki page which actually seem to generate response with multiple extensions, but unfortunately FS cannot read such response.
On Sun, Mar 7, 2010 at 3:18 PM, Nazim Agabekov <nazim.agabekov@gmail.com
wrote: Hello Paul
I also use mod_xml_curl for a dialplan. I've solved this issue by generating the XML extension dynamically. My fastcgi daemon checks the input variables like caller id, originator, e.t.c, makes routing decision and dynamically generates only one XML extension. So, there is no real need for creating complex dialplan on mod_xml_curl output.
Nazim
On 03/07/2010 11:03 PM, paul gore wrote:
Greetings, We use XML curl to fetch our dial plan extensions from a database. As per FS wiki we can only return one XML extension upon FS request. Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?
Thanks a lot.
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
Well, basically we used to return XML dial plan response with one extension like <document type="freeswitch/xml"> <section name="dialplan" description="RE Dial Plan For FreeSwitch"> <context name="default"> <extension name="test9"> <condition field="destination_number" expression="^83789$"> <action application="bridge" data="iax/guest@conference.freeswitch.org/888"/> </condition> </extension></context></section></document> and now we want to return response like that <document type="freeswitch/xml"> <section name="dialplan" description="RE Dial Plan For FreeSwitch"> <context name="default"> <extension name="test9"><condition field="username" expression="^756755$"/><condition field="destination_number" expression="^83789$"><action application="bridge" data="iax/guest@conference.freeswitch.org/888"/></condition></extension> <extension name="test9"><condition field="username" expression="^5564645$"/><condition field="destination_number" expression="^83789$"><action application="bridge" data="iax/guest@conference.freeswitch.org/888"/></condition></extension></context></section></document> But FS seem not to understand the latter, we get "No route..." On Sun, Mar 7, 2010 at 5:38 PM, Michael S Collins <msc@freeswitch.org>wrote:
Can you pastebin a sample dialplan and script? I'd like to better visualize what problem you're trying to solve. -MC
Sent from my iPhone
On Mar 7, 2010, at 2:13 PM, paul gore <paul.gore.j@gmail.com> wrote:
Thanks fro the input. I thought about such approach, the only problem I see is there that I essentially would have to duplicate FS dial plan parsing functionality, so my question basically is there a way to avoid that? I have seen a Ruby dial plan example on XML curl wiki page which actually seem to generate response with multiple extensions, but unfortunately FS cannot read such response.
On Sun, Mar 7, 2010 at 3:18 PM, Nazim Agabekov <<nazim.agabekov@gmail.com> nazim.agabekov@gmail.com> wrote:
Hello Paul
I also use mod_xml_curl for a dialplan. I've solved this issue by generating the XML extension dynamically. My fastcgi daemon checks the input variables like caller id, originator, e.t.c, makes routing decision and dynamically generates only one XML extension. So, there is no real need for creating complex dialplan on mod_xml_curl output.
Nazim
On 03/07/2010 11:03 PM, paul gore wrote:
Greetings, We use XML curl to fetch our dial plan extensions from a database. As per FS wiki we can only return one XML extension upon FS request. Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?
Thanks a lot.
_______________________________________________ FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org>FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: <http://lists.freeswitch.org/mailman/options/freeswitch-users>http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org>http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org> FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org>http://www.freeswitch.org
_______________________________________________ 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
_______________________________________________ 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
Actually to be correct - FS does read such response, but looks like it processes only the first one from the top, and if its condition evaluates to false it does not process further extensions. On Sun, Mar 7, 2010 at 6:07 PM, paul gore <paul.gore.j@gmail.com> wrote:
Well, basically we used to return XML dial plan response with one extension like
<document type="freeswitch/xml"> <section name="dialplan" description="RE Dial Plan For FreeSwitch"> <context name="default"> <extension name="test9"> <condition field="destination_number" expression="^83789$"> <action application="bridge" data="iax/guest@conference.freeswitch.org/888"/> </condition> </extension></context></section></document>
and now we want to return response like that
<document type="freeswitch/xml"> <section name="dialplan" description="RE Dial Plan For FreeSwitch"> <context name="default"> <extension name="test9"><condition field="username" expression="^756755$"/><condition field="destination_number" expression="^83789$"><action application="bridge" data="iax/guest@conference.freeswitch.org/888"/></condition></extension>
<extension name="test9"><condition field="username" expression="^5564645$"/><condition field="destination_number" expression="^83789$"><action application="bridge" data="iax/guest@conference.freeswitch.org/888"/></condition></extension></context></section></document>
But FS seem not to understand the latter, we get "No route..."
On Sun, Mar 7, 2010 at 5:38 PM, Michael S Collins <msc@freeswitch.org>wrote:
Can you pastebin a sample dialplan and script? I'd like to better visualize what problem you're trying to solve. -MC
Sent from my iPhone
On Mar 7, 2010, at 2:13 PM, paul gore <paul.gore.j@gmail.com> wrote:
Thanks fro the input. I thought about such approach, the only problem I see is there that I essentially would have to duplicate FS dial plan parsing functionality, so my question basically is there a way to avoid that? I have seen a Ruby dial plan example on XML curl wiki page which actually seem to generate response with multiple extensions, but unfortunately FS cannot read such response.
On Sun, Mar 7, 2010 at 3:18 PM, Nazim Agabekov <<nazim.agabekov@gmail.com> nazim.agabekov@gmail.com> wrote:
Hello Paul
I also use mod_xml_curl for a dialplan. I've solved this issue by generating the XML extension dynamically. My fastcgi daemon checks the input variables like caller id, originator, e.t.c, makes routing decision and dynamically generates only one XML extension. So, there is no real need for creating complex dialplan on mod_xml_curl output.
Nazim
On 03/07/2010 11:03 PM, paul gore wrote:
Greetings, We use XML curl to fetch our dial plan extensions from a database. As per FS wiki we can only return one XML extension upon FS request. Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?
Thanks a lot.
_______________________________________________ FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org>FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: <http://lists.freeswitch.org/mailman/options/freeswitch-users>http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org>http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org> FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org>http://www.freeswitch.org
_______________________________________________ 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
_______________________________________________ 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
You generate exactly ONE extension which was the exact way it was designed to be used. You don't have to parse anything only look at the variables you care about and run with it. Its nothing too complex or overly intensive to do. /b On Mar 7, 2010, at 4:13 PM, paul gore wrote:
Thanks fro the input. I thought about such approach, the only problem I see is there that I essentially would have to duplicate FS dial plan parsing functionality, so my question basically is there a way to avoid that? I have seen a Ruby dial plan example on XML curl wiki page which actually seem to generate response with multiple extensions, but unfortunately FS cannot read such response.
OK, so that means multiple extensions not possible. Yes, it's not overly intensive, but nevertheless I actually have to parse regex in the second condition to find out which extension matches incoming number and I wanted instead to let FS do that for me. It is a bit complex since we store complete extension XML in DB, so I have to retrieve all the extensions matching first condition, extract their second condition, then run them in loop... Looks like I can be better off using JS for that instead. Thank you everybody. On Sun, Mar 7, 2010 at 7:32 PM, Brian West <brian@freeswitch.org> wrote:
You generate exactly ONE extension which was the exact way it was designed to be used. You don't have to parse anything only look at the variables you care about and run with it. Its nothing too complex or overly intensive to do.
/b
On Mar 7, 2010, at 4:13 PM, paul gore wrote:
Thanks fro the input. I thought about such approach, the only problem I see is there that I essentially would have to duplicate FS dial plan parsing functionality, so my question basically is there a way to avoid that? I have seen a Ruby dial plan example on XML curl wiki page which actually seem to generate response with multiple extensions, but unfortunately FS cannot read such response.
_______________________________________________ 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
Apparently you haven't used a SQL db before. SELECT * from extensions where did='1234'; You can query for EXACTLY the info you need. /b On Mar 7, 2010, at 7:30 PM, paul gore wrote:
It is a bit complex since we store complete extension XML in DB, so I have to retrieve all the extensions matching first condition, extract their second condition, then run them in loop... Looks like I can be better off using JS for that instead.
:-)) I used it a lot. Unfortunately we do not store did number as a field, as I said we store complete extension XML, with extension number and context as a key. So essentially I will retrieve a bunch of extension XMLs which I need to parse and run against regex matcher to find out the one, which is what exactly FS is doing when XML dial plan is defined in a static file. On Sun, Mar 7, 2010 at 8:46 PM, Brian West <brian@freeswitch.org> wrote:
Apparently you haven't used a SQL db before. SELECT * from extensions where did='1234'; You can query for EXACTLY the info you need.
/b
On Mar 7, 2010, at 7:30 PM, paul gore wrote:
It is a bit complex since we store complete extension XML in DB, so I have to retrieve all the extensions matching first condition, extract their second condition, then run them in loop... Looks like I can be better off using JS for that instead.
_______________________________________________ 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
Sounds like you zigged where you should have zagged. /b On Mar 7, 2010, at 8:03 PM, paul gore wrote:
:-)) I used it a lot. Unfortunately we do not store did number as a field, as I said we store complete extension XML, with extension number and context as a key. So essentially I will retrieve a bunch of extension XMLs which I need to parse and run against regex matcher to find out the one, which is what exactly FS is doing when XML dial plan is defined in a static file.
Hi "As per FS wiki we can only return one XML extension upon FS request. " Could you please tell me where did you find that info? I do return several extensions by request and FS works as expect (Am I wrong doing that?) "Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?" Yes, It seems to be possible (Am I wrong?) but notice that you are giving the same extension name for all your extensions: <extension name="test9"> I think this can mislead dialplan_hunt in mod_dialplan_xml...Give each extension a unique name, and FS will parse/regex all them for you... All the best,Paulo
From: brian@freeswitch.org Date: Sun, 7 Mar 2010 20:17:19 -0600 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] XML curl and multiple extension in dialplan
Sounds like you zigged where you should have zagged.
/b
On Mar 7, 2010, at 8:03 PM, paul gore wrote:
:-)) I used it a lot. Unfortunately we do not store did number as a field, as I said we store complete extension XML, with extension number and context as a key. So essentially I will retrieve a bunch of extension XMLs which I need to parse and run against regex matcher to find out the one, which is what exactly FS is doing when XML dial plan is defined in a static file.
_______________________________________________ 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
_________________________________________________________________ Hotmail: Powerful Free email with security by Microsoft. https://signup.live.com/signup.aspx?id=60969
It's in the Wiki: http://wiki.freeswitch.org/wiki/Mod_xml_curl - "You will only need to send one extension back..." In my real dial plan I do use unique names for the extensions, but as I mentioned FS only executes first extension from the response. If I place same extensions in a static XML they work as expected. I use FreeSWITCH Version 1.0.trunk (16573M). Which one do you use? Can you post a sample response you generate, please? On Mon, Mar 8, 2010 at 10:42 AM, Paulo Vicentini <vizentini@hotmail.com>wrote:
Hi
"As per FS wiki we can only return one XML extension upon FS request. "
Could you please tell me where did you find that info? I do return several extensions by request and FS works as expect (Am I wrong doing that?)
"Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?"
Yes, It seems to be possible (Am I wrong?) but notice that you are giving the same extension name for all your extensions:
<extension name="test9">
I think this can mislead dialplan_hunt in mod_dialplan_xml... Give each extension a unique name, and FS will parse/regex all them for you...
All the best, Paulo
From: brian@freeswitch.org Date: Sun, 7 Mar 2010 20:17:19 -0600 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] XML curl and multiple extension in dialplan
Sounds like you zigged where you should have zagged.
/b
On Mar 7, 2010, at 8:03 PM, paul gore wrote:
:-)) I used it a lot. Unfortunately we do not store did number as a field,
as I said we store complete extension XML, with extension number and context as a key.
So essentially I will retrieve a bunch of extension XMLs which I need to parse and run against regex matcher to find out the one, which is what exactly FS is doing when XML dial plan is defined in a static file.
_______________________________________________ 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
------------------------------ Hotmail: Powerful Free email with security by Microsoft. Get it now.<https://signup.live.com/signup.aspx?id=60969>
_______________________________________________ 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
Hello, FreeSWITCH version: 1.0.trunk (16870M) I have replied FS even with extensions you have emailed here (in my case I have data="sofia/gateway/myGW/888@conference.freeswitch.org/888") - it works You may need to give a look at "CS_ROUTING" state. best,PauloDate: Mon, 8 Mar 2010 12:22:37 -0500 From: paul.gore.j@gmail.com To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] XML curl and multiple extension in dialplan It's in the Wiki: http://wiki.freeswitch.org/wiki/Mod_xml_curl - "You will only need to send one extension back..." In my real dial plan I do use unique names for the extensions, but as I mentioned FS only executes first extension from the response. If I place same extensions in a static XML they work as expected. I use FreeSWITCH Version 1.0.trunk (16573M). Which one do you use? Can you post a sample response you generate, please? On Mon, Mar 8, 2010 at 10:42 AM, Paulo Vicentini <vizentini@hotmail.com> wrote: Hi "As per FS wiki we can only return one XML extension upon FS request. " Could you please tell me where did you find that info? I do return several extensions by request and FS works as expect (Am I wrong doing that?) "Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?" Yes, It seems to be possible (Am I wrong?) but notice that you are giving the same extension name for all your extensions: <extension name="test9"> I think this can mislead dialplan_hunt in mod_dialplan_xml...Give each extension a unique name, and FS will parse/regex all them for you... All the best, Paulo
From: brian@freeswitch.org Date: Sun, 7 Mar 2010 20:17:19 -0600 To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] XML curl and multiple extension in dialplan
Sounds like you zigged where you should have zagged.
/b
On Mar 7, 2010, at 8:03 PM, paul gore wrote:
:-)) I used it a lot. Unfortunately we do not store did number as a field, as I said we store complete extension XML, with extension number and context as a key. So essentially I will retrieve a bunch of extension XMLs which I need to parse and run against regex matcher to find out the one, which is what exactly FS is doing when XML dial plan is defined in a static file.
_______________________________________________ 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
Hotmail: Powerful Free email with security by Microsoft. Get it now. _______________________________________________ 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 _________________________________________________________________ Hotmail: Powerful Free email with security by Microsoft. https://signup.live.com/signup.aspx?id=60969
Thanks a lot Paulo! It does work, we have updated to the latest SVN and checked cs_routing and apparently discovered a problem with response generating script, it wasn't updated after recent DB change. On Mon, Mar 8, 2010 at 1:31 PM, Paulo Vicentini <vizentini@hotmail.com>wrote:
Hello,
FreeSWITCH version: 1.0.trunk (16870M)
I have replied FS even with extensions you have emailed here (in my case I have data="sofia/gateway/myGW/888@conference.freeswitch.org/888") - it works
You may need to give a look at "CS_ROUTING" state.
best, Paulo ------------------------------ Date: Mon, 8 Mar 2010 12:22:37 -0500 From: paul.gore.j@gmail.com
To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] XML curl and multiple extension in dialplan
It's in the Wiki: http://wiki.freeswitch.org/wiki/Mod_xml_curl - "You will only need to send one extension back..." In my real dial plan I do use unique names for the extensions, but as I mentioned FS only executes first extension from the response. If I place same extensions in a static XML they work as expected. I use FreeSWITCH Version 1.0.trunk (16573M). Which one do you use? Can you post a sample response you generate, please?
On Mon, Mar 8, 2010 at 10:42 AM, Paulo Vicentini <vizentini@hotmail.com>wrote:
Hi
"As per FS wiki we can only return one XML extension upon FS request. "
Could you please tell me where did you find that info? I do return several extensions by request and FS works as expect (Am I wrong doing that?)
"Now we need to return a set of extensions with same number condition and context but with different second condition so that FS can pick up the right one. Is it possible at all? And if yes how response XML with multiple extensions should look like?"
Yes, It seems to be possible (Am I wrong?) but notice that you are giving the same extension name for all your extensions:
<extension name="test9">
I think this can mislead dialplan_hunt in mod_dialplan_xml... Give each extension a unique name, and FS will parse/regex all them for you...
All the best, Paulo
From: brian@freeswitch.org Date: Sun, 7 Mar 2010 20:17:19 -0600 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] XML curl and multiple extension in dialplan
Sounds like you zigged where you should have zagged.
/b
On Mar 7, 2010, at 8:03 PM, paul gore wrote:
:-)) I used it a lot. Unfortunately we do not store did number as a field,
as I said we store complete extension XML, with extension number and context as a key.
So essentially I will retrieve a bunch of extension XMLs which I need to parse and run against regex matcher to find out the one, which is what exactly FS is doing when XML dial plan is defined in a static file.
_______________________________________________ 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
------------------------------ Hotmail: Powerful Free email with security by Microsoft. Get it now.<https://signup.live.com/signup.aspx?id=60969>
_______________________________________________ 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
------------------------------ Hotmail: Powerful Free email with security by Microsoft. Get it now.<https://signup.live.com/signup.aspx?id=60969>
_______________________________________________ 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 (5)
-
Brian West
-
Michael S Collins
-
Nazim Agabekov
-
paul gore
-
Paulo Vicentini