<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:Arial;">Have you tried transfer_ringback?<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;"><a href="https://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones#Transfer_Ringback">https://wiki.freeswitch.org/wiki/Custom_Ring_Back_Tones#Transfer_Ringback</a><br></div>
<div><br></div>
<div><br></div>
<div>On Thu, Jul 6, 2017, at 03:11 AM, Stefano Favaro wrote:<br></div>
<blockquote type="cite"><div style="font-family:arial, helvetica, sans-serif;font-size:10pt;color:rgb(0, 0, 0);"><div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;">Hello,<br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;">I'm writing a simple script with LUA to connect an inbound call to e new outbound call.<br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;">Everything work fine but <span class="size" style="font-size:10pt">I can't set the <b>ringback</b> tone nor a waiting music on the leg A and also the <b>call_timeout</b> variable.</span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">The legA is in silence while the legB is ringing and the call_timeout is always the default 60 seconds.</span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">What is wrong with this code?</span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt"></span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">Thanks </span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt"></span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">This is the code:</span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">...</span><br></div>
<div><div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;">legA:streamFile("/usr/share/freeswitch/sounds/wait.wav")<br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;">legA:setVariable("ringback", "$${uk-ring}")<br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;">legA:setVariable("call_timeout", 30)<br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt"></span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">legB = freeswitch.Session("{ignore_early_media=true, hangup_after_bridge=true, origination_caller_id_number=1234}sofia/internal/0123456789@myserver)</span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt"></span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><span class="size" style="font-size:10pt">if legB:ready() then</span><br></div>
<div><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:arial, helvetica, sans-serif"><span class="size" style="font-size:10pt"><span style="white-space:pre;"></span></span></span></span><span class="font" style="font-family:arial, " helvetica", " sans-serif""><span class="size" style="font-size:13.3333px">freeswitch.bridge(legA, legB)</span></span><br></div>
</div>
<div><span class="font" style="font-family:arial, " helvetica", " sans-serif""><span class="size" style="font-size:13.3333px">end</span></span><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><br></div>
<div style="font-family:Arial;"><br></div>
<div style="color:rgb(0, 0, 0);font-family:arial, helvetica, sans-serif;font-size:10pt;"><div style="font-family:Arial;"><span name="x"></span><br></div>
<div><p style="margin: 0cm 0cm 0.0001pt;"><span class="font" style="font-family:Calibri, sans-serif"><span class="size" style="font-size:11pt"><span class="colour" style="color:navy"><span class="font" style="font-family:Arial, sans-serif"><span class="size" style="font-size:11.5pt">Stefano Favaro </span></span></span><span class="font" style="font-family:Arial, sans-serif"><span class="size" style="font-size:9pt"><br> <span class="colour" style="color:gray">Sviluppo Servizi ed Applicazioni</span><br> <span class="colour" style="color:red">_____________________</span><br> <br> </span></span></span></span><br></p></div>
</div>
</div>
</blockquote><div style="font-family:Arial;"><br></div>
</body>
</html>