<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000'><div style="font-size: 10pt;"><br></div><span style="font-size: 10pt;">Thanks,</span><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;">actually there is an error in the freeswitch.Session method</div><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;">The documentation is not complete</div><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;">the correct syntax is</div><div style="font-size: 10pt;"><br></div><div style="font-size: 10pt;"><span style="font-size: 13.3333px;">legB = freeswitch.Session("{ignore_early_media=true, hangup_after_bridge=true, origination_caller_id_number=1234}sofia/internal/0123456789@myserver, <b>legA</b>)</span></div><div><span style="font-size: 13.3333px;"><br></span></div><div><span style="font-size: 13.3333px;">The last parameter is the legA session.</span></div><div><span style="font-size: 13.3333px;"><br></span></div><div><span style="font-size: 13.3333px;">Using this syntax everything works fine.</span></div><div><span style="font-size: 13.3333px;"><br></span></div><div><span style="font-size: 13.3333px;"><br></span><br><div style="font-size: 10pt;"><span name="x"></span>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-536870145 1073786111 1 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
{mso-style-noshow:yes;
mso-style-priority:99;
color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-noshow:yes;
mso-style-priority:99;
color:purple;
mso-themecolor:followedhyperlink;
text-decoration:underline;
text-underline:single;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:11.0pt;
mso-ansi-font-size:11.0pt;
mso-bidi-font-size:11.0pt;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11.5pt; font-family: "Arial","sans-serif"; color: navy;">Stefano Favaro </span><span style="font-size: 9pt; font-family: "Arial","sans-serif";"><br>
<span style="color: gray;">Sviluppo Servizi ed Applicazioni</span><br>
<span style="color: red;">_____________________</span><br>
<br>
<br>
<br>
</span><span style="font-family: "Arial","sans-serif"; color: rgb(0, 32, 96);">Edistar Srl<br></span></p>
<p class="MsoNormal"><span style="font-family: "Arial","sans-serif"; color: rgb(0, 32, 96);">a
socio unico soggetta a direzione e coordinamento di YourVoice SpA<br></span></p>
<p class="MsoNormal"><span style="font-family: "Arial","sans-serif"; color: rgb(0, 32, 96);">Via
Artigianato 1 – I – 31050 Vedelago (TV) Italy</span></p>
<p class="MsoNormal"><span style="font-family: "Arial","sans-serif"; color: rgb(0, 32, 96);">Phone
+39 0423 7331 – Fax +39 0423 733133</span></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="font-size: 9pt; font-family: "Arial","sans-serif"; color: black;"><br>
skype: stefanofavaro<br>
</span><span style="font-size: 9pt; font-family: "Arial","sans-serif";"><a href="http://www.edistar.com/"><br>
<span style="">www.edistar.com</span></a><span style="color: black;"></span></span></p>
<table class="MsoNormalTable" style="width: 73px; height: 42px;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr style="height: 2.25pt;">
<td colspan="18" style="padding: 0cm; height: 2.25pt;"><br></td>
</tr>
<tr style="">
<td style="padding: 0cm;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><a href="http://twitter.com/#%21/edistar"><span style="text-decoration: none;"><span style=""><br></span></span></a></span></p>
</td>
<td style="width: 12pt; padding: 0cm;" width="16">
</td>
<td style="padding: 0cm;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><a href="http://www.linkedin.com/company/239920"><span style="text-decoration: none;"><span style=""><br></span></span></a></span></p>
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
<td style="padding: 0cm;">
</td>
</tr>
</tbody></table>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: "Arial","sans-serif";"><br>
<br>
</span><span style="font-size: 8.5pt; font-family: "Arial","sans-serif";">Le informazioni trasmesse attraverso
la presente e-mail ed i suoi allegati sono dirette esclusivamente al destinatario
e devono ritenersi riservate con divieto di diffusione e di uso nei giudizi
salva espressa autorizzazione; nel caso di utilizzo senza espressa
autorizzazione, potrà essere effettuata denuncia alla competente Autorità. La
diffusione e la comunicazione da parte di soggetto diverso dal destinatario è
vietata dall’art. 616 e ss. c.p. e dal d. l.vo n. 196/03. Se la presente e-mail
e i suoi allegati fossero stati ricevuti per errore da persona diversa dal
destinatario preghiamo di distruggere quanto ricevuto e di rinviare al mittente
con lo stesso mezzo. Grazie per la collaborazione.<br>
<br>
This message may contain confidential and/or privileged information. If you are
not the addressee or authorized to receive this for the addressee, you must not
use, copy, disclose or take any action based on this message or any information
herein. If you have received this message in error, please advise the sender
immediately by reply e-mail and delete this message. Thank you for your
cooperation.</span></p>
</div>
<span name="x"></span><br></div><hr id="zwchr" style="font-size: 10pt;"><div style="font-size: 12pt; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif;"><b>Da: </b>"Aviv Shaham" <aviv@ironsip.com><br><b>A: </b>freeswitch-users@lists.freeswitch.org<br><b>Inviato: </b>Giovedì, 6 luglio 2017 15:48:19<br><b>Oggetto: </b>Re: [Freeswitch-users] freeswitch.Session with LUA<br><br>
<title></title>
<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" target="_blank">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><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></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>
<br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br>consulting@freeswitch.org<br>http://www.freeswitchsolutions.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://confluence.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org</div><br></div></div></body></html>