[Freeswitch-users] intercom in lua dialplan
Helmut Kuper
helmut.kuper at ewetel.de
Tue Jan 25 18:45:58 MSK 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I try to intercept a call in lua script. For the intercepting extension
I do this:
if (dialed_ext:len()==6 and dialed_ext:sub(1,2) == "**") then
uuid=api:execute("hash", "select/last_caller/"..dialed_ext:sub(3))
if (uuid and uuid:len()> 2) then
session:setAutoHangup(false)
session:execute("intercept", uuid)
return
end
end
This results to a hangup of the intercepting extension while intercepted
extension hangs up (completed_elsewhere) and caller/originator's call is
connected.
FS logs shows this for the intercepting extension:
switch_core_state_machine.c:189 sofia/internal_et/8000 at spklw.x has
executed the last dialplan instruction, hanging up.
When I use the ACTIONS table like this:
if (dialed_ext:len()==6 and dialed_ext:sub(1,2) == "**") then
uuid=api:execute("hash", "select/last_caller/"..dialed_ext:sub(3))
if (uuid and uuid:len()> 2) then
session:setAutoHangup(false)
table.insert(ACTIONS, {"intercept", uuid})
return
end
end
then intercept/pickup works fine. Is there a trick to get it work with
"session:execute("intercept", uuid)" ?
regards
helmut
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0+8DYACgkQ4tZeNddg3dyKwACeKR4lsxUv3G26pdNp8GGsbWNg
/OIAn2EIl2Vq+qibtodGd9vjjLfqKv8s
=2fTE
-----END PGP SIGNATURE-----
More information about the FreeSWITCH-users
mailing list