[Freeswitch-users] Call Intercept

Frank Busalacchi Jr frankjr at mcpeekdodge.com
Sun Aug 4 07:51:11 MSD 2013


Hi everyone!  First and foremost, thanks for a great piece of software, and all the time you guys still put into this program day in and day out.  Thank you!

I'm having difficulty implementing an "intercept" system, and I'm thinking that I have to be "conceptually" misunderstanding something.  Towards those ends, I'm hoping someone can get me back on track, I'm sick of banging my head on the wall to try to make this work.

So here is my scenario:

1. A call (Call A) comes into the server from my voip provider on a DID.

2. My XML dialplan transfers the call to an extension in the XML dialplan of 1111.

3. My XML dialplan recognizes 1111 as a local extension, and executes a LUA script to handle the actual bridging of Call A to the appropriate devices.  I use the LUA script because I do some logic to decide whether to ring just the user's SIP phone, the user's cell phone, or a combination of both simultaneously.  Bottom line is that the LUA script does something like this after building the originate string in dialString:

session2 = freeswitch.Session(dialString);

   if session2:answered() == true then
      freeswitch.bridge(session,session2);
      return true;
   else
      return false;
   end

---All of the above works as expected ---

My issue is that when the LUA script starts ringing the sip phone registered as 1111, I want to 'intercept' that call from a different extension.  So here is what I do:

1.  Extension 1112 hears that his co-worker's extension 1111 is ringing, and wants to answer it.  He dials **1111

2.  My XML dialplan recognizes the request to pickup/intercept the call ringing at 1111, and calls a LUA script to figure out the uuid of the ringing phone.

3.  The LUA script sets a channel variable with the UUID it choose as the appropriate candidate to intercept, and exits.

4.  The XML dialplan resumes control, and does a <action application="intercept" data="${intercept-uuid}"/> .

5.  The calls aren't intercepted/bridged.

A pastebin of the log is here: http://pastebin.freeswitch.org/21267

What am I missing conceptually here?


Thanks,
Frank

Frank Busalacchi Jr
President
Direct (714) 254-2612
[Description: C:\Users\frankjr\Downloads\McPeekEmailLogo.jpg]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130804/ebd8f9e2/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 10108 bytes
Desc: image001.jpg
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130804/ebd8f9e2/attachment-0001.jpg 


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