then you&#39;ll need to schedule out making this fall until after this one is hung up?  it&#39;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 &lt;<a href="mailto:gabriel@pinaculo.com.br">gabriel@pinaculo.com.br</a>&gt; 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>&lt;action application=&quot;set&quot; data=&quot;api_hangup_hook=originate gsmopen/ANY/${number} &amp;bridge(user/${redirect_to})&quot;/&gt;<br><br></div>I&#39;m not sure but I guess when the session is hanged up it also hangup the one that I&#39;m trying to originate on hangup hook. Also, as you can see I&#39;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">&lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;mike@jerris.com&#39;);" target="_blank">mike@jerris.com</a>&gt;</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 &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;gabriel@pinaculo.com.br&#39;);" target="_blank">gabriel@pinaculo.com.br</a>&gt; 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&#39;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>&lt;action application=&quot;set&quot; data=&quot;api_hangup_hook=originate user/${redirect_to} &amp;bridge(gsmopen/ANY/${number})&quot;/&gt;<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&#39;m having problems.<br><br>My last attempt was calling a lua script who fires a custom event, like this:<br><br>&lt;action application=&quot;set&quot; data=&quot;api_hangup_hook=${lua(websip/teste.lua ${caller_id_number})}&quot;/&gt;<br><br>teste.lua:<br>function fireEvent()<br>    local event = freeswitch.Event(&quot;CUSTOM&quot;, &quot;Gateway::Callback&quot;)<br>    event:addHeader(&quot;My-Header&quot;, &quot;test&quot;)<br>    event:addBody(&quot;EventTest&quot;)<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&#39;t work.<br><br>This is the line from lua.conf:<br>&lt;hook envent=&quot;CUSTOM&quot; subclass=&quot;Gateway::Callback&quot; script=&quot;testecallback.lua&quot;/&gt;<br><br>Can you help me telling me if I&#39;m the right path or if there&#39;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,&#39;cvml&#39;,&#39;consulting@freeswitch.org&#39;);" 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,&#39;cvml&#39;,&#39;FreeSWITCH-users@lists.freeswitch.org&#39;);" 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>