Thanks Vitalli.<br><br>Increase the short delay solve the problem. I increase from 1000 to 2000.<br><br><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80);"></span>But when I answer the phone there is a silent before play the file because of the dealy. <br>

<br>How to improve this? Is there any setting to make the session fast.<br><br>Thanks<br>Lloyd<br>
<br><br><div class="gmail_quote">2010/6/10 Vitalii Colosov <span dir="ltr">&lt;<a href="mailto:vetali100@gmail.com">vetali100@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Try to add short delay - session:sleep:<div><font color="#500050" face="arial, sans-serif"><span style="border-collapse: collapse;"><br></span></font></div><div><font color="#500050" face="arial, sans-serif"><span style="border-collapse: collapse;">...</span></font></div>


<div>session:setAutoHangup(false);</div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80);"><br></span></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80);">session:sleep(1000);š</span></div>


<div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80);">...</span></div><div><div><br></div><div>Sometimes I was getting session is not ready, and fixed this by adding short delay.</div>


<div><br></div><div>Maybe you have same problem here.</div><div><br></div><div>Regards,</div><div>Vitalie</div><div><br></div><div><br><br><div class="gmail_quote">10 ΙΐΞΡ 2010 Η. 16:20 ΠΟΜΨΪΟΧΑΤΕΜΨ Aloysius Lloyd <span dir="ltr">&lt;<a href="mailto:lloyd.aloysius@sunteltech.ca" target="_blank">lloyd.aloysius@sunteltech.ca</a>&gt;</span> ΞΑΠΙΣΑΜ:<div>

<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">VItalli,<br><br>I try your suggestion. Now the script look like this<div><br><br>os.execute(&quot;sleep &quot; .. tonumber(10));<br>


<br>pin_number_test=&quot;0511&quot;;<br>out_gateway1=&quot;sofia/gateway/voipms/1&quot;;<br>message_dir=&quot;/usr/local/freeswitch/sounds/en/us/callie/custom/callback/&quot;;<br>

<br>number_to_call= argv[1];<br><br></div>session = freeswitch.Session(&quot;{ignore_early_media=true,originate_timeout=40}&quot;..out_gateway1..number_to_call);<br>session:setAutoHangup(false);<br><div><br>if ( session:ready() ) then<br>




ššššššš session:sleep(1000);<br>šššššššš if (session:answered()) then<br>ššššššššššššššš session:sleep(1000);<br>ššššššššššššššš session:streamFile(message_dir..&quot;enter-dest.wav&quot;);<br>šššššššš end<br>end<br><br>


</div>
===<br>
<br>Also I try 5 test . This time out of 5 test,š wave file play only one time. Other for 4 tests silent.<br><br>Thanks<br>Lloyd<br><br>
<br><br><div class="gmail_quote">2010/6/10 Vitalii Colosov <span dir="ltr">&lt;<a href="mailto:vetali100@gmail.com" target="_blank">vetali100@gmail.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




It looks OK what you wrote - we have almost same lua code.<div><br><div>The only thing that I have in addition in my script is &quot;if š(session:answered())&quot; construction.</div><div><br></div><div>Try to write it like this:</div>





<div>...</div><div><br></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">if ( session:ready() ) then<br>ššššššš session:sleep(1000);šš š š š</span></div>
<div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">šš š š šif (session:answered()) then</span></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">šš š š š ššsession:sleep(1000); š š š š</span></div>




<div>
<div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">šš š š š š session:streamFile(message_dir..&quot;enter-dest.wav&quot;);</span></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">šš š š šend</span></div>





</div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><br>end</span></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">...</span></div>




<div><br></div><div>Not sure why this should work and that does not, but this is how it works for me - worth trying at lest.</div><div><br></div><div><br></div><div>Regards,</div><div>Vitalie</div><div><br><br><div class="gmail_quote">





10 ΙΐΞΡ 2010 Η. 9:07 ΠΟΜΨΪΟΧΑΤΕΜΨ Aloysius Lloyd <span dir="ltr">&lt;<a href="mailto:lloyd.aloysius@sunteltech.ca" target="_blank">lloyd.aloysius@sunteltech.ca</a>&gt;</span> ΞΑΠΙΣΑΜ:<div><div></div><div><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">





<br clear="all">without bypass_media_after_bridge=true same results.<br><br>Lloyd<br><br>
<br><br><div class="gmail_quote">2010/6/10 Aloysius Lloyd <span dir="ltr">&lt;<a href="mailto:lloyd.aloysius@sunteltech.ca" target="_blank">lloyd.aloysius@sunteltech.ca</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">







I try the bypass_media_after_bridge=trueš .. same results.<br><br>Thanks<br><font color="#888888">Lloyd</font><div><div></div><div><br><br>
<br><br><div class="gmail_quote">On Thu, Jun 10, 2010 at 2:00 AM, Sergey Scheglov <span dir="ltr">&lt;<a href="mailto:sid@eltc.ru" target="_blank">sid@eltc.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">








χ Thu, 10 Jun 2010 01:26:51 -0400<br>
<div>Aloysius Lloyd &lt;<a href="mailto:lloyd.aloysius@gmail.com" target="_blank">lloyd.aloysius@gmail.com</a>&gt; wrote:<br>
<br>
<br>
</div><div>&gt; session =<br>
&gt; freeswitch.Session(&quot;{bypass_media_after_bridge=true,ignore_early_media=true,originate_timeout=40}&quot;..out_gateway1..number_to_call);<br>
&gt; session:setAutoHangup(false);<br>
&gt;<br>
</div>&gt; Thanks<br>
&gt; Lloyd<br>
<br>
Try without bypass_media_after_bridge=true<br>
<br>
Regard<br>
Sergey Scheglov<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>
</div></div></blockquote></div></div></div><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>