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"><<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>></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, <<a href="mailto:ljjimenez@gmail.com">ljjimenez@gmail.com</a>> wrote:<br>
> I did it that way because I tried thru the api, but got the same results<br>
><br>
> Luis Jimenez<br>
><br>
> -----Original Message-----<br>
> From: Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>><br>
> Sender: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
> Date: Mon, 19 Sep 2011 10:24:32<br>
> To: FreeSWITCH Users Help<<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
> Reply-To: FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
> Subject: Re: [Freeswitch-users] uuid_broadcast not working<br>
><br>
> are you running a lua script on the session and then trying to connect<br>
> to event socket on the same server just to send it a command you can<br>
> already do with a freeswitch.API object ?<br>
><br>
><br>
> On Sun, Sep 18, 2011 at 2:48 PM, Luis Jimenez <<a href="mailto:ljjimenez@gmail.com">ljjimenez@gmail.com</a>> wrote:<br>
>> Hello, list<br>
>><br>
>> I have this lua script, i try to put music to the aleg while do another<br>
>> task, but it is not working (not audio at all), any advice on what am doing<br>
>> wrong?<br>
>><br>
>> THanks in advance, here my script:<br>
>><br>
>> ----------------------------------------------------------------------------------------------<br>
>><br>
>> require 'socket'<br>
>> local host = "127.0.0.1"<br>
>> local port = 8021<br>
>><br>
>> function set_hold(uuid)<br>
>> local conn = socket.connect(host, port)<br>
>><br>
>> if (conn) then<br>
>> local cmd = "bgapi uuid_broadcast " .. uuid .. "<br>
>> /opt/freeswitch/sounds/es/dm/dm-promo-recharge-hold.G729 aleg";<br>
>> freeswitch.consoleLog("info", "CMD: " .. cmd .. "\n")<br>
>> conn:send(string.format("auth<br>
>> ClueCon\r\n\r\n%s\r\n\r\nexit\r\n\r\n", cmd))<br>
>> line, err = conn:receive()<br>
>> while (not err) do<br>
>> if (line ~= nil) then freeswitch.consoleLog("info", "SCKT: " ..<br>
>> line .. "\n") end<br>
>> line, err = conn:receive()<br>
>> end<br>
>> conn:close()<br>
>> else<br>
>> debug.notice("Error posting to server: " .. host .. ":" .. port)<br>
>> end<br>
>> end<br>
>><br>
>> function sleep(n)<br>
>> os.execute("sleep " .. tonumber(n))<br>
>> end<br>
>><br>
>> session:answer()<br>
>> session:sleep(500);<br>
>> uuid = session:get_uuid();<br>
>> freeswitch.consoleLog("info", "UUID: " .. uuid .. "\n");<br>
>><br>
>> api = freeswitch.API();<br>
>><br>
>> set_hold(uuid);<br>
>> freeswitch.consoleLog("info", " - - - RETURNED - - -\n");<br>
>><br>
>><br>
>> for i=1,50 do<br>
>> if not session:ready() then break end<br>
>> sleep(1);<br>
>> end<br>
>><br>
>> if session:ready() then api:executeString("uuid_break" .. uuid); end<br>
>> freeswitch.consoleLog("info", " - - - FINNISH COUNTING - - -\n");<br>
>><br>
>> session:hangup();<br>
>><br>
>> ----------------------------------------------------------------------------------<br>
>><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>
><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>
><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>
<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>