Hello Anthony, i am trying to put the caller to listen background music, while the script continue sending a SMS using curl, the duration of this process (send SMS) is about 4 secs.<br><br>Can you advice me on how to resolve this?<br>
<br>Thanks in advance.<br><br>Luis Jimenez<br><br><br><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 4:38 PM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">When playing a native file you should not specify the extension.<br>
Apart from that, I have too little information based on such a vague account.<br>
<br>
You would probably want to check your console logs at debug level.<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, Sep 19, 2011 at 1:25 PM,  &lt;<a href="mailto:ljjimenez@gmail.com">ljjimenez@gmail.com</a>&gt; wrote:<br>
&gt; I did it that way because I tried thru the api, but got the same results<br>
&gt;<br>
&gt; Luis Jimenez<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: Anthony Minessale &lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;<br>
&gt; Sender: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
&gt; Date: Mon, 19 Sep 2011 10:24:32<br>
&gt; To: FreeSWITCH Users Help&lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt; Reply-To: FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt; Subject: Re: [Freeswitch-users] uuid_broadcast not working<br>
&gt;<br>
&gt; are you running a lua script on the session and then trying to connect<br>
&gt; to event socket on the same server just to send it a command you can<br>
&gt; already do with a freeswitch.API object ?<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Sep 18, 2011 at 2:48 PM, Luis Jimenez &lt;<a href="mailto:ljjimenez@gmail.com">ljjimenez@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Hello, list<br>
&gt;&gt;<br>
&gt;&gt; I have this lua script, i try to put music to the aleg while do another<br>
&gt;&gt; task, but it is not working (not audio at all), any advice on what am doing<br>
&gt;&gt; wrong?<br>
&gt;&gt;<br>
&gt;&gt; THanks in advance, here my script:<br>
&gt;&gt;<br>
&gt;&gt; ----------------------------------------------------------------------------------------------<br>
&gt;&gt;<br>
&gt;&gt; require &#39;socket&#39;<br>
&gt;&gt; local host = &quot;127.0.0.1&quot;<br>
&gt;&gt; local port = 8021<br>
&gt;&gt;<br>
&gt;&gt; function set_hold(uuid)<br>
&gt;&gt;     local conn = socket.connect(host, port)<br>
&gt;&gt;<br>
&gt;&gt;     if (conn) then<br>
&gt;&gt;         local cmd = &quot;bgapi uuid_broadcast &quot; .. uuid .. &quot;<br>
&gt;&gt; /opt/freeswitch/sounds/es/dm/dm-promo-recharge-hold.G729 aleg&quot;;<br>
&gt;&gt;         freeswitch.consoleLog(&quot;info&quot;, &quot;CMD: &quot; .. cmd .. &quot;\n&quot;)<br>
&gt;&gt;         conn:send(string.format(&quot;auth<br>
&gt;&gt; ClueCon\r\n\r\n%s\r\n\r\nexit\r\n\r\n&quot;, cmd))<br>
&gt;&gt;         line, err = conn:receive()<br>
&gt;&gt;         while (not err) do<br>
&gt;&gt;             if (line ~= nil) then freeswitch.consoleLog(&quot;info&quot;, &quot;SCKT: &quot; ..<br>
&gt;&gt; line .. &quot;\n&quot;) end<br>
&gt;&gt;             line, err = conn:receive()<br>
&gt;&gt;         end<br>
&gt;&gt;         conn:close()<br>
&gt;&gt;     else<br>
&gt;&gt;         debug.notice(&quot;Error posting to server: &quot; .. host .. &quot;:&quot; .. port)<br>
&gt;&gt;     end<br>
&gt;&gt; end<br>
&gt;&gt;<br>
&gt;&gt; function sleep(n)<br>
&gt;&gt;    os.execute(&quot;sleep &quot; .. tonumber(n))<br>
&gt;&gt; end<br>
&gt;&gt;<br>
&gt;&gt; session:answer()<br>
&gt;&gt; session:sleep(500);<br>
&gt;&gt; uuid = session:get_uuid();<br>
&gt;&gt; freeswitch.consoleLog(&quot;info&quot;, &quot;UUID: &quot; .. uuid .. &quot;\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt; api = freeswitch.API();<br>
&gt;&gt;<br>
&gt;&gt; set_hold(uuid);<br>
&gt;&gt; freeswitch.consoleLog(&quot;info&quot;, &quot; - - - RETURNED - - -\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; for i=1,50 do<br>
&gt;&gt;     if not session:ready() then break end<br>
&gt;&gt;     sleep(1);<br>
&gt;&gt; end<br>
&gt;&gt;<br>
&gt;&gt; if session:ready() then api:executeString(&quot;uuid_break&quot; .. uuid); end<br>
&gt;&gt; freeswitch.consoleLog(&quot;info&quot;, &quot; - - - FINNISH COUNTING - - -\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt; session:hangup();<br>
&gt;&gt;<br>
&gt;&gt; ----------------------------------------------------------------------------------<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<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; Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</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="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
&gt; pstn:<a href="tel:%2B19193869900" value="+19193869900">+19193869900</a><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; 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; 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; 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>
<br>
<br>
<br>
--<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</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" target="_blank">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="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:<a href="tel:%2B19193869900" value="+19193869900">+19193869900</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>