then you'll need to schedule out making this fall until after this one is hung up? it's a bit hack but you could use sched_api?
On Tuesday, May 10, 2016, Gabriel Bustos <gabriel@pinaculo.com.br> wrote:I'm not sure but I guess when the session is hanged up it also hangup the one that I'm trying to originate on hangup hook. Also, as you can see I'm using mod_gsmopen and I have only one interface available for incoming/outgoing calls.Hi,thanks for your reply.
Actually I already tried your suggestion. What I tested was:
<action application="set" data="api_hangup_hook=originate gsmopen/ANY/${number} &bridge(user/${redirect_to})"/>2016-05-10 3:26 GMT-03:00 Michael Jerris <mike@jerris.com>:if the first one works but just calls the parties in reverse, just swap them
On Monday, May 9, 2016, Gabriel Bustos <gabriel@pinaculo.com.br> wrote:Hello,
I'm trying to implement a callback (for specific numbers) in my project.
What I need to do is hangup the incoming call and return to that number. What I tried is this:
<action application="set" data="api_hangup_hook=originate user/${redirect_to} &bridge(gsmopen/ANY/${number})"/>
Actually this works (sort of), it originates a call in softphone and when I answer the softphone the call to destination number is made.
BUT what I need is to call to destination number and bridge to softphone when the call is answered. And here is where I'm having problems.
My last attempt was calling a lua script who fires a custom event, like this:
<action application="set" data="api_hangup_hook=${lua(websip/teste.lua ${caller_id_number})}"/>
teste.lua:
function fireEvent()
local event = freeswitch.Event("CUSTOM", "Gateway::Callback")
event:addHeader("My-Header", "test")
event:addBody("EventTest")
session:sendEvent(event)
--event:fire();
end
fireEvent()
Ok, the event is fired as I can see in CLI but I think the event hook doesn't work.
This is the line from lua.conf:
<hook envent="CUSTOM" subclass="Gateway::Callback" script="testecallback.lua"/>
Can you help me telling me if I'm the right path or if there's a better way to do that?
Thanks in advance.
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org