[Freeswitch-users] script answers one session, creates another, need to hand off one to another lua without hanging up

Trever L. Adams trever at middleearth.sapphiresunday.org
Tue Jul 21 16:58:07 MSD 2015


Hello Everyone,

I am stuck. I have a lua script that gets run from a bind digit setup.
The only way to make it work was to have the bind digit call another lua
script that contains:

theret = api:executeString("uuid_dual_transfer " .. my_uuid .. "
'm:^:set:number=" .. call_id_num .. "^ set:name=" .. call_id_name ..
"^lua:lua_script.lua/inline' " .. "ext/XML/context")

The incoming call goes to the ext the lua script is a menu for the
internal user.

I have another script that answers some incoming calls. It then creates
a new session and gives the internal user a menu. One option is to
connect, another to voicemail. I have these working. The problem is that
one option is to call the lua script above and to send the incoming call
to the same ext. At one point I had it to where it would do one and then
the other. I need a way to make them happen simultaneously.

The lua script in the executeString above uses session, but the session
is created as internal_session in the other script.

i have tried bridging with execute_on_answer calling the script with the
dual transfer above, but it executes AFTER hangup.

Has anyone found a way to solve this problem? session:executeString
doesn't seem to exist anymore for lua.

Thank you,
Trever

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150721/bde8206b/attachment.bin 


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