[Freeswitch-users] intercepting a-leg from other context

Helmut Kuper helmut.kuper at ewetel.de
Thu Dec 16 11:26:14 MSK 2010


-----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-----



More information about the FreeSWITCH-users mailing list