[Freeswitch-users] XML curl and multiple extension in dialplan

paul gore paul.gore.j at gmail.com
Sun Mar 7 16:19:31 PST 2010


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 at 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 at 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 at 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 at 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 at 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 at 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 at gmail.com>
>> nazim.agabekov at 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 at lists.freeswitch.org>FreeSWITCH-users at 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 at lists.freeswitch.org>
>>> FreeSWITCH-users at 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 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
>>
>>
>> _______________________________________________
>> 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/20100307/83a3aaef/attachment-0002.html 


More information about the FreeSWITCH-users mailing list