-----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@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-----
What are the log lines leading up to the "executed last dialplan instruction"? -MC On Tue, Jan 25, 2011 at 7:45 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
-----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@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-----
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, you can find the complete log of this process in pastebin: http://pastebin.freeswitch.org/15150 44180000 is A-Party calling 8367 8000 is C-Party which tries to intercept via **8367 Am 25.01.2011 20:44, schrieb Michael Collins:
What are the log lines leading up to the "executed last dialplan instruction"?
regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0/0dkACgkQ4tZeNddg3dx/kQCgk96NGvr777y6EC1Jz9vtsP8L 9AUAmwaBJZte6PmV13gsypaWnEHD+ty7 =xuM4 -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, any news to this? Am 26.01.2011 08:48, schrieb Helmut Kuper:
Hi Michael,
you can find the complete log of this process in pastebin: http://pastebin.freeswitch.org/15150
44180000 is A-Party calling 8367 8000 is C-Party which tries to intercept via **8367
regards Helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1C3CUACgkQ4tZeNddg3dxcPwCeJn0A2ypFGvaTU3iwbNAXbWSU udcAn07r3ugbs5oBaVptI0DCJYAmPmG0 =u6Gp -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, did you find some time to look at the log file? Am 28.01.2011 16:09, schrieb Helmut Kuper:
Hi Michael,
any news to this?
regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1JdDcACgkQ4tZeNddg3dwtdgCfYdtrUFRSKFMf7JyujrZwbWJp zpEAn3Sw7bxZ9LiUMsH3Gv+udNaWRtTm =Ei5z -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael, I fixed this. Was my fault. I tried to control a session directly in lua when lua was directly called as a dialplan from sofia profile. In this mode FS seems to expects a table (ACTIONS) filled with action to be executed. If this is not filled, FS hangs up the call after lua script has returned. Now I use a minimized XML dialplan which allways calls the lua script and voila it works as expected. Sorry for the trouble. regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1lNAMACgkQ4tZeNddg3dyoWACgh91ocgT7vj/v+JNoApYIX6Yf aG4AoJMqYTzoTcTH9qxcHiPNfgVlzsZ9 =06AT -----END PGP SIGNATURE-----
participants (2)
-
Helmut Kuper
-
Michael Collins