1) turn off crash protection.<br>2) you cant manipulate more that one call per script, design the script to be run from the application interface so you originate the call with the api interface and transfer the call to the script so each one has it&#39;s own copy of the script.<br>
<br><br><br><div class="gmail_quote">On Tue, Feb 17, 2009 at 2:30 PM, Nik Middleton <span dir="ltr">&lt;<a href="mailto:nik.middleton@noblesolutions.co.uk">nik.middleton@noblesolutions.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m starting to think it&#39;s a thread/DTMF issue. &nbsp;Ran 15 lines to my<br>
office number (using latest trunk)<br>
<br>
2009-02-17 20:19:38 [CRIT] switch_core_state_machine.c:259<br>
handle_fatality() Caught signal 11 for unmapped thread!Aborted (core<br>
dumped)<br>
<br>
Also then I had tone detect on, I&#39;d often get this<br>
<br>
freeswitch: src/switch_ivr_async.c:1328: switch_ivr_tone_detect_session:<br>
Assertion `read_codec != ((void *)0)&#39; failed.<br>
<br>
Hardware, HP DL360 G4. Centos 5.2, 4 GB ram.<br>
<div class="Ih2E3d"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
</div><div><div></div><div class="Wj3C7c">[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Nik<br>
Middleton<br>
Sent: 17 February 2009 20:11<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] Big delays in playing audio files<br>
<br>
Pretty much<br>
<br>
I haven&#39;t included the on-event hooks as it never gets to the point<br>
where they&#39;re called.<br>
<br>
Only other thing is the dial it&#39;s self, attached below. &nbsp;However, I<br>
notice in the default dial plan, if I call extension 1001 from 1000 it<br>
takes about 2-3 seconds for the phone to ring. &nbsp;Is that normal?<br>
<br>
<br>
//build dial string<br>
var dial_string = &nbsp;&quot;{absolute_codec_string=PCMA,&quot; &nbsp; &nbsp; &nbsp; +<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;accountcode=&quot; + account_code<br>
+<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;,ignore_early_media=true&quot;<br>
+<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;<br>
,origination_caller_id_number=&quot; +<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; caller_id<br>
+<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;,originate_timeout=25}&quot;<br>
+<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;sofia/gateway/&quot;<br>
+<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;mygateway/&quot;<br>
+<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dial_num + &quot;&#39; &quot;<br>
<br>
var first_session = new Session(dial_string);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// Trap for call failure<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if (!first_session.ready()) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;consoleLog(&quot;err&quot;, &quot;Disposition: &quot; + first_session.cause<br>
+ &quot;\n&quot;);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (first_session.cause == &quot;USER_BUSY&quot;) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Disposition = &quot;BUSY&quot;;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if (first_session.cause ==<br>
&quot;NO_ROUTE_DESTINATION&quot;) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Disposition = &quot;DCN&quot;;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else if (first_session.cause == &quot;NO_ANSWER&quot;) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Disposition = &quot;NA&quot;;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;disp_call()<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;//set the on_hangup function to be called when this session is<br>
hungup<br>
 &nbsp; &nbsp; &nbsp; &nbsp;first_session.setHangupHook(on_hangup,&quot;hup&quot;);<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of<br>
Michael Collins<br>
Sent: 17 February 2009 19:25<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] Big delays in playing audio files<br>
<br>
Is this the entire script?!<br>
-MC<br>
<br>
On Tue, Feb 17, 2009 at 11:05 AM, Nik Middleton<br>
&lt;<a href="mailto:nik.middleton@noblesolutions.co.uk">nik.middleton@noblesolutions.co.uk</a>&gt; wrote:<br>
&gt; if (first_session.ready()) {<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console_log(&quot;notice&quot;,&quot;Session state=[&quot; +<br>
&gt; first_session.state + &quot;] &nbsp;\n&quot;);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; consoleLog(&quot;NOTICE&quot;, &quot;ready: Start DTMF\n&quot;);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.execute(&quot;start_dtmf&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.answer( );<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Disposition = &quot;ANS&quot;;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.sleep(1500);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console_log(&quot;notice&quot;, &quot;Playing message: &quot; +<br>
&gt; recording + &quot;\n&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.streamFile(recording, on_event);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (first_session.ready()) {<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; consoleLog(&quot;err&quot;, &quot;ready: Waiting for<br>
input\n&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.streamFile(&quot;4.wav&quot;,on_event,<br>
&quot;dtmf&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; consoleLog(&quot;err&quot;, &quot;ready: Timeout on<br>
input\n&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.execute(&quot;stop_tone_detect&quot;);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; //disp_call()<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.hangup()<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; first_session.execute(&quot;sleep&quot;, &quot;2000&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; consoleLog(&quot;NOTICE&quot;, &quot;EXITING\n&quot;);<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit();<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt;<br>
&gt; &nbsp; &nbsp; }<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ________________________________<br>
&gt;<br>
&gt; From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
&gt; [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of<br>
Anthony<br>
&gt; Minessale<br>
&gt; Sent: 17 February 2009 18:34<br>
&gt; To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
&gt; Subject: Re: [Freeswitch-users] Big delays in playing audio files<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; we would need to see your script.<br>
&gt;<br>
&gt; On Tue, Feb 17, 2009 at 12:23 PM, Nik Middleton<br>
&gt; &lt;<a href="mailto:nik.middleton@noblesolutions.co.uk">nik.middleton@noblesolutions.co.uk</a>&gt; wrote:<br>
&gt;<br>
&gt; Having spent the last week developing a small js app, I ran some tests<br>
&gt; today. With just 5 calls going on, I&#39;m seeing huge delays from when<br>
the call<br>
&gt; is answered to when the audio file is played. &nbsp;Sometimes it doesn&#39;t<br>
even<br>
&gt; play at all!!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Example 3 calls and the matching playbacks<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2009-02-17 15:41:04 [NOTICE] voice.js:1 console_log() ready: Start<br>
DTMF<br>
&gt;<br>
&gt; 2009-02-17 15:41:08 [NOTICE] voice.js:1 console_log() ready: Start<br>
DTMF<br>
&gt;<br>
&gt; 2009-02-17 15:41:22 [NOTICE] voice.js:1 console_log() ready: Start<br>
DTMF<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2009-02-17 15:41:26 [NOTICE] voice.js:1 console_log() Playing message:<br>
&gt; message.wav<br>
&gt;<br>
&gt; 2009-02-17 15:41:26 [NOTICE] voice.js:1 console_log() Playing message:<br>
&gt; message.wav<br>
&gt;<br>
&gt; 2009-02-17 15:41:26 [NOTICE] voice.js:1 console_log() Playing message:<br>
&gt; message.wav<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; That&#39;s 22 seconds for the first one!!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Anyone any ideas as to what&#39;s going on here?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Regards<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;<br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Anthony Minessale II<br>
&gt;<br>
&gt; FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt;<br>
&gt; AIM: anthm<br>
&gt; <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
&gt; GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
&gt; IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
&gt;<br>
&gt; FreeSWITCH Developer Conference<br>
&gt; <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
&gt; <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
&gt; <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
&gt; pstn:213-799-1400<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;<br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
<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>
_______________________________________________<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>
_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>