intercepting a-leg from other context
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I try to intercept an incoming call from pstn to internal. I have two contexts: default and "from_pstn". Phone C (from_pstn) is calling phone A (default) Phone B (default) is trying to pickup phone C Three cases: 1) In from_pstn I bridge the call via "user/<extension>@domain" to default context. When B tried to pickup phone C (in context default) all three phones hung up. Display of Phone A shows "completed_elsewhere". 2) When I transfer the call from phone C to default context, bridging it there to "user/<phone_A>@domain" and intercepting the call with phone B everything works fine. 3) When I bridging it in context "from_pstn" to "sofia/internal/<phone_A>@domain" and intercepting the call with phone B it works as well. ("internal" is an alias of "default" context) Why it is impossible to do an intercept the call as described in case 1? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0JBdQACgkQ4tZeNddg3dyR3gCgggf692CBwZVf7fLKRtsN1/H6 ecgAoK8THuDOS2TJv4aWZ3FEyzS8qhIE =d+jo -----END PGP SIGNATURE-----
In your "from_pstn" context do you have all the same stuff that happens in the "global" extension that's found in the default context? -MC On Wed, Dec 15, 2010 at 10:15 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I try to intercept an incoming call from pstn to internal.
I have two contexts: default and "from_pstn".
Phone C (from_pstn) is calling phone A (default) Phone B (default) is trying to pickup phone C
Three cases:
1) In from_pstn I bridge the call via "user/<extension>@domain" to default context. When B tried to pickup phone C (in context default) all three phones hung up. Display of Phone A shows "completed_elsewhere".
2) When I transfer the call from phone C to default context, bridging it there to "user/<phone_A>@domain" and intercepting the call with phone B everything works fine.
3) When I bridging it in context "from_pstn" to "sofia/internal/<phone_A>@domain" and intercepting the call with phone B it works as well. ("internal" is an alias of "default" context)
Why it is impossible to do an intercept the call as described in case 1? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0JBdQACgkQ4tZeNddg3dyR3gCgggf692CBwZVf7fLKRtsN1/H6 ecgAoK8THuDOS2TJv4aWZ3FEyzS8qhIE =d+jo -----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, Am 16.12.2010 00:14, schrieb Michael Collins:
In your "from_pstn" context do you have all the same stuff that happens in the "global" extension that's found in the default context? -MC
I found the reason: When bridging to phone C to A I use this in from_pstn: 1 session:setVariable("continue_on_fail", "true") 2 session:setVariable("hangup_after_bridge", "false") 3 session:execute("export", "ignore_display_updates=true") 4 session:execute("hash", "insert/last_caller/"..dialed_ext.."/"..session:get_uuid()) 5 session:execute("bridge", "user/"..dialed_ext.."@"..sip_domain) 6 hc = session:getVariable("originate_disposition") 7 if (callee_hasVM == "1" and (hc == "USER_BUSY" or hc == "NO_ANSWER" or hc == "NO_USER_RESPONSE")) then 8 ...voicemail... 9 end 10 freeswitch.consoleLog("NOTICE", "BRIDGE-HANGUP-REASON: "..hc.."\n") 11 session:execute("info"); 12 session:hangup(hc) I thought pickup handling resides in bridge and the call stays there until one leg hung up. But it seems, that the dialplan-process (ROUTING) from phone C ends as soon as Phone A got the cancel from intercept. Bridge ends and session:hangup() is called, which terminates the call from phone C. Solving this seems to be easy: Just remove the hangup for originator_cancel. Well, I think I have learned again a bit about FS call handling. Works now! Great project :) Thanks for reading Helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0JzSYACgkQ4tZeNddg3dw6HwCgklAlOxSugcoB+W2lXBYRDkhh STQAnjGpkZ6J4fbAhyRrMt7dOkQmNH6N =Zvgf -----END PGP SIGNATURE-----
participants (2)
-
Helmut Kuper
-
Michael Collins