[Freeswitch-users] how to access session variables after hangup???
rentmycoder rentmycoder
rentmycoder at gmail.com
Sun Mar 14 13:01:54 PDT 2010
> Pass them as arguments to your luarun hangup hook.
And what about variables are not available before the call setup (like
uuid), only during the call progress or after the hangup???
I would need to access the originate_disposition variable...
>> 'luarun hangup.lua ${originate_disposition}'
>> 2010-03-14 18:25:08.122511 [CRIT] switch_channel.c:759 Invalid data (${api_hangup_hook} contains a variable)
any other hint???
> ---------- Forwarded message ----------
> From: Brian West <brian at freeswitch.org>
> To: freeswitch-users at lists.freeswitch.org
> Date: Sun, 14 Mar 2010 13:00:10 -0500
> Subject: Re: [Freeswitch-users] how to access session variables after hangup???
> Pass them as arguments to your luarun hangup hook.
>
> /b
>
> On Mar 14, 2010, at 12:40 PM, rentmycoder rentmycoder wrote:
>
>> Hi guys,
>> Freeswitch rocks!
>> except the documentation:(
>> I'm not able to figure out how to access session variables after hangup...
>> I try to dial out on a gateway and detect it the called party hangs up
>> before bridge...
>>
>> bgapi originate
>> {ignore_early_media=true,continue_on_fail=true,bypass_media=false,hangup_after_bridge=true,originate_timeout=10,api_hangup_hook='luarun
>> hangup.lua ${uuid}'}sofia/gateway/phoneno &park()
>>
>> I cannot access the variables using:
>> 1. script arguments:
>> 'luarun hangup.lua ${uuid}'}
>> 2010-03-14 18:25:08.122511 [CRIT] switch_channel.c:759 Invalid data
>> (${api_hangup_hook} contains a variable)
>>
>> 2. session:getVariable("originate_disposition")
>> 2010-03-14 18:31:37.042756 [ERR] mod_lua.cpp:182 hangup.lua:2: attempt
>> to call global 'getVar' (a nil value)
>>
>> 3. params:getHeader("variable_sip_req_uri")
>> 2010-03-14 18:36:19.973939 [ERR] mod_lua.cpp:182 hangup.lua:3: attempt
>> to index global 'params' (a nil value)
>>
>> I have asked this before on the dev list too, but Anthony didn't gave
>> me a clean answer here:
>> http://lists.freeswitch.org/pipermail/freeswitch-dev/2009-July/002491.html
>>
>> "In the script you can access the data from the env event which is
>> automatically created for you and it
>> contains all the channel variables from that departed channel."
>>
>> Ok, but how?????
>>
>> Please help...
>>
More information about the FreeSWITCH-users
mailing list