[Freeswitch-users] unable to insert channel variable in new call leg w/in Lua script

elijah elijah at crankenstein.com
Tue Mar 22 00:59:05 MSK 2011


Actually, I think the behavior I'm seeing is that I'm not able to retrieve
these variables on the A-leg, but they are present on the B-leg. How should
I insert custom channel variables into the A-leg of a call originated from
Lua, so that they appear in the CALL_HANGUP_COMPLETE event on this first
leg?


On Mon, Mar 21, 2011 at 11:50 AM, elijah <elijah at crankenstein.com> wrote:

> In a Lua script I instantiate a new call leg and (attempt to) insert a new
> channel variable:
>
>    local session = freeswitch.Session("user/1001 at stuff.com")
>    if session:hangupCause() == "SUCCESS" then
>       session:execute("export", "my_variable=" .. myVariable)
>       session:transfer("ext_in_mycontext", "XML", "mycontext")
>
> However, I am not able to retrieve my custom channel variable later. This
> call leg is established correctly but there is no point in this call leg's
> life where I can seem to find my variable. Is there another method by which
> I should try to insert a channel variable in a newly created call leg?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110321/16abe0fa/attachment.html 


More information about the FreeSWITCH-users mailing list