[Freeswitch-users] Call Intercept

Lloyd Aloysius lloyd.aloysius at gmail.com
Sun Aug 4 18:07:24 MSD 2013


Post your lua script here

before the bridge(How to set the UUID for intercept) and intercept part

---

I use this way and it always works
session:execute("set","intercept_unbridged_only=true")

Lloyd


On Sun, Aug 4, 2013 at 6:49 AM, <cmrienzo at gmail.com> wrote:

> That channel variable was fetched in the routing state before the lua
> application was executed.   You can either transfer to a new extension to
> execute the intercept or execute the intercept in the lua script.
>
> Chris
>
>
> On Aug 3, 2013, at 11:51 PM, Frank Busalacchi Jr <frankjr at mcpeekdodge.com>
> wrote:
>
>  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*****
>
> <image001.jpg>****
>
> ** **
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130804/6450a5fb/attachment.html 


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