<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>