[Freeswitch-users] Set channel variables before bridge leg B hangup

Zoltán Szabó zoell at zoell.us
Tue Mar 10 21:22:03 MSK 2015


So this is not possible, right?

2015-03-06 8:53 GMT+00:00 Zoltán Szabó <zoell at zoell.us>:

> How can I reference the session variable in the hook lua script?
>
> Thank you
>
> 2015-03-05 17:10 GMT+00:00 Vik Killa <vipkilla at gmail.com>:
>
>> You could try using the api_on_hangup to set a variable.
>> or there maybe an execute_on_hangup too.
>>
>> On Thu, Mar 5, 2015 at 12:06 PM, Zoltán Szabó <zoell at zoell.us> wrote:
>>
>>> Hi,
>>>
>>> In lua I bridge two sessions. When leg B hangup the call I need to set
>>> up some custom channel variables for odbc_cdr reporting.
>>>
>>> freeswitch.bridge(session1, session2);
>>> session2:execute("set", "custom_var1=asdf");
>>>
>>> But when the set command tries to run, the log says "channel is hangup
>>> already".
>>>
>>> Is there any way to do this properly?
>>>
>>> Many thanks,
>>> Zoltan
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> 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
>>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> 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/20150310/62d46f11/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list