[Freeswitch-users] how to set different action for different cause code

Michael Collins msc at freeswitch.org
Mon Aug 17 08:59:31 PDT 2009


On Sun, Aug 16, 2009 at 4:24 AM, Woody Dickson <woodydickson at gmail.com>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
> 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/20090817/ab38f220/attachment-0002.html 


More information about the FreeSWITCH-users mailing list