[Freeswitch-users] Hangup hooks on B legs
Avi Marcus
avi at avimarcus.net
Wed Aug 3 21:39:50 MSD 2011
I'm not sure exactly what you are trying to do, but yes, the ${uuid}
is expanded at the time of the "hunt" in the dialplan, before the
second leg was even created.
-Avi Marcus
On Wed, Aug 3, 2011 at 8:24 PM, Isaac Jurado <ijurado at econcept.es> wrote:
> On Wed, Aug 3, 2011 at 6:09 PM, Avi Marcus <avi at avimarcus.net> wrote:
>>
>> Yes, you can export it, "nolocal" to activate only on the B leg, e.g.:
>>
>> <action application="export" data="nolocal:api_hangup_hook=lua file.lua"/>
>
> It works! Thanks a lot. Now I have a small problem, the channels seem
> to be destroyed or unaccessible when the hangup hook is executed. I
> tested a dialplan with the following line:
>
> <action application="set" data="session_in_hangup_hook=true"/>
> <action application="export" data="api_hangup_hook=uuid_exists ${uuid}"/>
>
> And the FS log reports that none of the legs exists:
>
> 2011-08-03 19:01:30.609887 [DEBUG] switch_core_state_machine.c:492
> Hangup Command with no Session
> uuid_exists(2bd2ce25-99fe-41fe-bcfe-d8224a9d6f18):
> false
> [...]
> 2011-08-03 19:01:30.645615 [DEBUG] switch_core_state_machine.c:492
> Hangup Command with Session
> uuid_exists(2bd2ce25-99fe-41fe-bcfe-d8224a9d6f18):
> false
>
> This shows that the export works, as the hook is executed twice.
> Although the ${uuid} is expanded only once. But it's curious as the
> channel uuid where the hook is beign executed has not been destroyed
> yet.
>
> Cheers.
>
> --
> Isaac Jurado
> Internet Busines Solutions eConcept
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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
>
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list