Hi,

I have my dialplan to do some simple routing. What I need to do is when
certain hangup code is received, route advance to the next or the route
after next based on the hangup code received.

So, I have:

<condition>
   <action application="set" data="hangup_after_bridge=true"/>
   <action application="set" data="continue_on_fail="false"/>
   <action application="bridge" data="sofia/internal/[email protected]./>
   <action application="bridge" data="sofia/internal/[email protected]./>
   <action application="bridge" data="sofia/internal/[email protected]./>
   <action application="bridge" data="sofia/internal/[email protected]./>

</condition>

What I want to do is that based on the error code received from ( bridge to
aaa), it can route to either bbb or ccc depends on the hangup code received
from aaa.

So there anyway to do it in the dialplan without any scripting?

thannks,
woody




On Mon, Aug 17, 2009 at 11:59 PM, Michael Collins <[email protected]>wrote:

>
>
> On Sun, Aug 16, 2009 at 4:24 AM, Woody Dickson <[email protected]>wrote:
>
>> Hello,
>>
>> I find hangup_hook, but I would like to define different actions for
>> different hangup codes.  Is there anyway to do that?
>>
>>
>
> I can think of at least two ways you could do this: one that uses only the
> dialplan and one that uses a script. If you don't mind using a scripting
> language then you can make it very clean:
>
> <action application="set" data="api_hangup_hook=luarun chancleanup.lua
> ${hangup_cause}"/>
>
> Then have your Lua script handle all the if-then-else or case stuff.
>
> Question: are you trying to transfer the a-leg to some other destination if
> the b-leg hangup is a specific cause, or are you just doing some external
> cleanup stuff? Just curious...
>
> -MC
>
>
>> Woody
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> [email protected]
>> 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
> [email protected]
> 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
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to