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?<div><br></div><div><br><span></span><div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_commands#mod_commands-sched_api">https://freeswitch.org/confluence/display/FREESWITCH/mod_commands#mod_commands-sched_api</a></div><div><br>On Tuesday, May 10, 2016, Gabriel Bustos <<a href="mailto:gabriel@pinaculo.com.br">gabriel@pinaculo.com.br</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi, <br><br></div>thanks for your reply.<br>Actually I already tried your suggestion. What I tested was:<br></div><br><action application="set" data="api_hangup_hook=originate gsmopen/ANY/${number} &bridge(user/${redirect_to})"/><br><br></div>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.<br><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-10 3:26 GMT-03:00 Michael Jerris <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','mike@jerris.com');" target="_blank">mike@jerris.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">if the first one works but just calls the parties in reverse, just swap them<div><div><span></span><br><br>On Monday, May 9, 2016, Gabriel Bustos <<a href="javascript:_e(%7B%7D,'cvml','gabriel@pinaculo.com.br');" target="_blank">gabriel@pinaculo.com.br</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>I'm trying to implement a callback (for specific numbers) in my project.<br><br>What I need to do is hangup the incoming call and return to that number. What I tried is this:<br><br><action application="set" data="api_hangup_hook=originate user/${redirect_to} &bridge(gsmopen/ANY/${number})"/><br><br>Actually this works (sort of), it originates a call in softphone and when I answer the softphone the call to destination number is made. <br><br>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.<br><br>My last attempt was calling a lua script who fires a custom event, like this:<br><br><action application="set" data="api_hangup_hook=${lua(websip/teste.lua ${caller_id_number})}"/><br><br>teste.lua:<br>function fireEvent()<br> local event = freeswitch.Event("CUSTOM", "Gateway::Callback")<br> event:addHeader("My-Header", "test")<br> event:addBody("EventTest")<br> session:sendEvent(event)<br> --event:fire();<br>end<br>fireEvent()<br><br>Ok, the event is fired as I can see in CLI but I think the event hook doesn't work.<br><br>This is the line from lua.conf:<br><hook envent="CUSTOM" subclass="Gateway::Callback" script="testecallback.lua"/><br><br>Can you help me telling me if I'm the right path or if there's a better way to do that?<br><br>Thanks in advance.<br></div>
</blockquote>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
</blockquote></div></div></div>