[Freeswitch-users] Intercept a call from a fifo

Antonio Silva asilva at wirelessmundi.com
Thu Jan 14 13:34:11 MSK 2016


Hi,

Just an update...  it work!! :) Thanks for the tip.


If it help others, my solution was:

Dialplan action:
<action application="lua" data="intercept.lua 
${hash(select/last_uuid/".${val1}.")}"/>

Lua script:

intercept_uuid = argv[1] or nil
if (intercept_uuid == nil) then
     cm.error("Missing uuid to intercept")
     return
end

fifo_bridge_uuid = api:execute("uuid_getvar", intercept_uuid .. " 
fifo_bridge_uuid") or "_undef_"
fifo_status = api:execute("uuid_getvar", intercept_uuid .. " 
fifo_status") or "_undef_" -- TALKING when the call is answered

if (fifo_bridge_uuid ~= "_undef_" and fifo_status == "_undef_") then
     myuuid = session:get_uuid()
     -- fifo intercept / bridge uuids (caller / extension trying to 
intercep)
     api:execute("uuid_bridge", myuuid .. " " .. fifo_bridge_uuid)
else
     -- normal intercept
     session:execute("intercept", "-bleg " .. intercept_uuid)
end




On 01/13/2016 09:24 PM, Antonio Silva wrote:
> I'm my setup i have analog phones (using atas) and IP phones, to be 
> able to have call waiting in the analog phones i put a fifo for each 
> account connected to the ata. So a call going to an ata extension is 
> always from a "self" fifo.
>
>
> The problem is that, in the office extensions can capture/intercept 
> each other, when the person on that desk is out, by pressing 
> **+extension, answering the call (even if is just to say that the 
> person is out... ), this works for ip phones, but it fails when the 
> ringing phone is the analog extension because of the fifo.
>
>
> Mike:
>      you give me one idea, i could could uuid_bridge the uuid (a-leg) 
> from the caller in the fifo to the channel uuid trying to execute the 
> intercept. I guess once i done this the calls gets hangup in the fifo 
> and the b-leg (agent) channel should hangup as well.
>
>     i'm think of something like: uuid_bridge <original caller uuid> 
> <uuid extension that is requesting intercept >
>     I will try to do test this tomorrow. i post here the results.
>
>
>
> Thanks,
> António
>
>
> On 01/13/2016 07:22 PM, Anthony Minessale wrote:
>> Why do you want to intercept the agent anyway, won't that hangup on 
>> the customer?
>>
>>
>> On Wed, Jan 13, 2016 at 12:05 PM, Michael Jerris <mike at jerris.com 
>> <mailto:mike at jerris.com>> wrote:
>>
>>     in mod_fifo, the agent is called by mod_fifo before it is bridged
>>     to the a leg, therefore if you are trying to grab that a-leg
>>     while that b-leg is ringing, you will need to do so using the
>>     a-leg uuid, there is no connection to the b-leg until after the
>>     b-leg answers.
>>
>>
>>     > On Jan 13, 2016, at 1:00 PM, Antonio Silva
>>     <asilva at wirelessmundi.com> wrote:
>>     >
>>     > Hi all,
>>     >
>>     > is it possible to intercept a channel from a fifo with the
>>     intercept
>>     > command?
>>     >
>>     > scenario:
>>     > a ----> fifo (with fifo  calling ---> B)
>>     > c -- dial to trigger the command intercept -b uuid of B
>>     > It fails with "switch_ivr_bridge.c:1915 no uuid bridged to uuid
>>     of B"
>>     > forget to say, it work if the call (fifo -> B) is answered..
>>     >
>>     >
>>     > Could it be possible now... in 2010 wasn't possible...
>>     >
>>     http://freeswitch-users.2379917.n2.nabble.com/intercept-in-fifo-queue-td4739579.html
>>     >
>>     >
>>     >
>>     > --
>>     >
>>     > Saludos / Regards / Cumprimentos,
>>     > António silva
>>     >
>>
>>
>>     _________________________________________________________________________
>>     Professional FreeSWITCH Consulting Services:
>>     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>>     http://www.freeswitchsolutions.com
>>
>>     Official FreeSWITCH Sites
>>     http://www.freeswitch.org
>>     http://confluence.freeswitch.org
>>     http://www.cluecon.com
>>
>>     FreeSWITCH-users mailing list
>>     FreeSWITCH-users at lists.freeswitch.org
>>     <mailto: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
>>
>>
>>
>>
>> -- 
>> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>>
>>http://freeswitch.org/http://cluecon.com/>> http://twitter.com/FreeSWITCH
>> ☞ irc.freenode.net <http://irc.freenode.net> #freeswitch ☞ 
>> _http://freeswitch.org/g+_
>>
>> ClueCon Weekly Development Call
>> ☎ sip:888 at conference.freeswitch.org 
>> <mailto:sip%3A888 at conference.freeswitch.org>  ☎ +19193869900
>>
>> https://www.youtube.com/watch?v=9XXgW34t40s
>> https://www.youtube.com/watch?v=NLaDpGQuZDA
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.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://confluence.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

-- 

Saludos / Regards / Cumprimentos,
António silva

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160114/60deb516/attachment-0001.html 


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