[Freeswitch-dev] api_hangup_hook and channel variable

Dome Charoenyost dome at tel.co.th
Wed Jul 6 13:58:41 MSD 2011


2011/7/5 Michael Collins <msc at freeswitch.org>:
> Once you are in report.lua the channel is already hung up. To the best of my
> knowledge there is no way to add/manipulate channel variables in a hangup
> hook since you really just have a static copy of the channel variables.
> What is it that you are trying to do?
my system do realtime billing like a mod_nibblebill
but my module deduct balance by memcache protocol (balance store in
membase server)
so sometime i want to give them bonus (increase balance ) for some
call (like a over 10 min)
after hangup. i need to create new channel variable and  munipulate
some variable too.

Dome C.





> -MC
>
> On Tue, Jul 5, 2011 at 3:39 AM, Dome Charoenyost <dome at tel.co.th> wrote:
>>
>> This is my lua script
>>
>>            session:setVariable("session_in_hangup_hook", "true");
>>            session:setVariable("api_hangup_hook", "lua
>> hangup/report.lua "..macct);
>>            session:transfer("dialnow_wh", "XML", "wh");
>>
>> It's work fine before hangup i cal see session vation in report.lua
>> but my quession is how to manipulate or create new variable in
>> report.lua  ?
>> i want to see variable in cdr
>>
>> BG
>>
>> Dome C.
>>
>> _______________________________________________
>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> http://www.cluecon.com 877-7-4ACLUE
>>
>> FreeSWITCH-dev mailing list
>> FreeSWITCH-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>



More information about the FreeSWITCH-dev mailing list