<div dir="ltr">Hi guys,<br>i'm trying to make a very simple IVR with a lua script. I'm calling the lua script in this way:<br><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><font face="monospace"><action application="play_and_get_digits" data="6 12 10 7000 # say:'Please inser order number.' silence_stream://250 order_number \d+" /><br></font><font face="monospace"><action application="lua" data="myivr.lua"/></font></blockquote><br>And myivr.lua has something like this:<br><br>----------------------------------------------------------------<br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><font face="monospace">if session:getVariable("order_number") ~= "1234567" then<br></font><font face="monospace">   session:speak("Error");<br></font><font face="monospace">   session:hangup("NO_ROUTE_DESTINATION")<br></font><font face="monospace">end</font><font face="monospace"><br></font><font face="monospace">session:speak("connecting to customer. Please wait");</font><font face="monospace"><br></font><font face="monospace">session:setAutoHangup(false);<br></font><font face="monospace">session:execute("bridge", "{ignore_early_media=true,bridge_generate_comfort_noise=true,effective_caller_id=anonymous,hangup_after_bridge=true}sofia/gateway/mygateway/123456789");</font></blockquote>--------------------------------------------------------------------<br><br>Now, the questions:<div><br></div><div>1) Biggest issue is that when I call session:hangup() , the call is still running, how can I force hangup ?</div><div><br></div><div>2) as this lua script is called after a "play_and_get_digits" (in dialplan), how can I replace the "Error" inside IF with something that will re-execute the dialplan from scratch asking for a new number ? In other words, if numbers are not "1234567", I have to ask for the numbers again.</div><div><br></div><div>3) how can I set the bridge to be anonymous on the remote phone ? I don't want the remote user to be able to see the caller number. It would be better if remote user will se MY number and not the origin number (it's a bridge: ORIGIN -> PBX -> REMOTE, the remote will see origin number. I want to be anonymous or PBX number)</div><div><br></div><div>Tnx in advance.</div></div>