Is there some place where I can get more detailed log information on this? I thought that streamFile was a blocking operation (the next statement wouldn't be executed until playback was completed), is that not the case?<br>
<br>Is there a difference in terms of performance with Freeswitch for Lua versus SpiderMonkey?<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Am I misreading the log?<div class="im"><br><br style="font-family: courier new,monospace;"><b style="color: rgb(255, 0, 0);"><span style="font-family: courier new,monospace;">2011-02-21 17:23:09.077014 [NOTICE] switch_cpp.cpp:1181 Playing file: /usr/local/freeswitch/</span></b><div style="font-family: courier new,monospace;">
<b style="color: rgb(255, 0, 0);">recordings/messages/16c0f890_</b><b style="color: rgb(255, 0, 0);">c35e33c0_777973.wav</b><br>
2011-02-21 17:23:09.077014 [DEBUG] switch_ivr_play_say.c:1186 Codec Activated L16@8000hz 1 channels 20ms<br>2011-02-21 17:23:19.417631 [DEBUG] switch_ivr_play_say.c:1515 done playing file<br>2011-02-21 17:23:19.417631 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished playing the file !!!!!<br>
2011-02-21 17:23:19.417631 [INFO] switch_cpp.cpp:1181 Was VM detected? no<br>2011-02-21
17:23:19.417631 [NOTICE] switch_cpp.cpp:1181 Played the message at
least once and checked for VM, we should be exiting the loop</div><br></div>The messages like "finished playing" are log commands that are only available in the script after it's answered.<div><div></div><div class="h5">
<br><br><br><br><div class="gmail_quote">
On Wed, Feb 23, 2011 at 11:48 AM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></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;">
Your logs also don't show anything else like the call being answered<br>
or hungup or any other information.<br>
<br>
you probably need to add {ignore_early_media=true} to your dial string<br>
so the message does not play while the call is not answered.<br>
<br>
if you are calling sofia/internal/<a href="mailto:foo@bar.com" target="_blank">foo@bar.com</a> change it to<br>
{ignore_early_media=true}sofia/internal/<a href="mailto:foo@bar.com" target="_blank">foo@bar.com</a><br>
<br>
<br>
<br>
<br>
On Wed, Feb 23, 2011 at 10:39 AM, Michael De Lorenzo<br>
<div><div></div><div><<a href="mailto:delorenzodesign@gmail.com" target="_blank">delorenzodesign@gmail.com</a>> wrote:<br>
> Maybe failure isn't the correct word. Here's what happens:<br>
><br>
> Call gets placed, recipient phone rings<br>
> Call answered<br>
> Check for VM<br>
> If not VM, play the message back after short delay <-- the message doesn't<br>
> play, the call hangs up (step 5), but the logs indicate that the message<br>
> played<br>
> Hangup<br>
><br>
> As the log shows, it doesn't indicate that the message playback fails.<br>
><br>
> On Wed, Feb 23, 2011 at 11:14 AM, Anthony Minessale<br>
> <<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>> wrote:<br>
>><br>
>> I am asking for description of what happens when it fails, How do you<br>
>> know it's failing?<br>
>> If it fails it would be logging errors.<br>
>><br>
>><br>
>><br>
>><br>
>> On Wed, Feb 23, 2011 at 12:00 AM, Michael De Lorenzo<br>
>> <<a href="mailto:delorenzodesign@gmail.com" target="_blank">delorenzodesign@gmail.com</a>> wrote:<br>
>> > I'm not sure where to check, but there's entries like this in<br>
>> > freeswitch.log.2011-02-21-23-40-11.1<br>
>> ><br>
>> > 2011-02-21 17:22:53.157390 [NOTICE] mod_logfile.c:158 New log started.<br>
>> > 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 Played the<br>
>> > message<br>
>> > at least once and checked for VM, we should be exiting the loop.<br>
>> > 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > SETTING SESSION VARIABLES ***************<br>
>> > 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 Session<br>
>> > Variable[profile_id]: 1<br>
>> > 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > DONE<br>
>> > SETTING SESSION VARIABLES ***********<br>
>> > 2011-02-21 17:22:53.377395 [NOTICE] switch_cpp.cpp:1181 Playing file:<br>
>> > /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav<br>
>> > 2011-02-21 17:22:53.377395 [DEBUG] switch_ivr_play_say.c:1186 Codec<br>
>> > Activated L16@8000hz 1 channels 20ms<br>
>> > 2011-02-21 17:23:03.717511 [DEBUG] switch_ivr_play_say.c:1515 done<br>
>> > playing<br>
>> > file<br>
>> > 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished<br>
>> > playing the file !!!!!<br>
>> > 2011-02-21 17:23:03.717511 [INFO] switch_cpp.cpp:1181 Was VM detected?<br>
>> > no<br>
>> > 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 Played the<br>
>> > message<br>
>> > at least once and checked for VM, we should be exiting the loop.<br>
>> > 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > SETTING SESSION VARIABLES ***************<br>
>> > 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 Session<br>
>> > Variable[profile_id]: 1<br>
>> > 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > DONE<br>
>> > SETTING SESSION VARIABLES ***********<br>
>> > 2011-02-21 17:23:03.937661 [NOTICE] switch_cpp.cpp:1181 Playing file:<br>
>> > /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav<br>
>> > 2011-02-21 17:23:03.937661 [DEBUG] switch_ivr_play_say.c:1186 Codec<br>
>> > Activated L16@8000hz 1 channels 20ms<br>
>> > 2011-02-21 17:23:08.237260 [DEBUG] switch_ivr_play_say.c:1515 done<br>
>> > playing<br>
>> > file<br>
>> > 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished<br>
>> > playing the file !!!!!<br>
>> > 2011-02-21 17:23:08.237260 [INFO] switch_cpp.cpp:1181 Was VM detected?<br>
>> > no<br>
>> > 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 Played the<br>
>> > message<br>
>> > at least once and checked for VM, we should be exiting the loop.<br>
>> > 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > SETTING SESSION VARIABLES ***************<br>
>> > 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 Session<br>
>> > Variable[profile_id]: 1<br>
>> > 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > DONE<br>
>> > SETTING SESSION VARIABLES ***********<br>
>> > 2011-02-21 17:23:08.437885 [NOTICE] switch_cpp.cpp:1181 Playing file:<br>
>> > /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav<br>
>> > 2011-02-21 17:23:08.437885 [DEBUG] switch_ivr_play_say.c:1186 Codec<br>
>> > Activated L16@8000hz 1 channels 20ms<br>
>> > 2011-02-21 17:23:08.857270 [DEBUG] switch_ivr_play_say.c:1515 done<br>
>> > playing<br>
>> > file<br>
>> > 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished<br>
>> > playing the file !!!!!<br>
>> > 2011-02-21 17:23:08.857270 [INFO] switch_cpp.cpp:1181 Was VM detected?<br>
>> > no<br>
>> > 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 Played the<br>
>> > message<br>
>> > at least once and checked for VM, we should be exiting the loop.<br>
>> > 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > SETTING SESSION VARIABLES ***************<br>
>> > 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 Session<br>
>> > Variable[profile_id]: 1<br>
>> > 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 *************<br>
>> > DONE<br>
>> > SETTING SESSION VARIABLES ***********<br>
>> > 2011-02-21 17:23:09.077014 [NOTICE] switch_cpp.cpp:1181 Playing file:<br>
>> > /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav<br>
>> > 2011-02-21 17:23:09.077014 [DEBUG] switch_ivr_play_say.c:1186 Codec<br>
>> > Activated L16@8000hz 1 channels 20ms<br>
>> > 2011-02-21 17:23:19.417631 [DEBUG] switch_ivr_play_say.c:1515 done<br>
>> > playing<br>
>> > file<br>
>> > 2011-02-21 17:23:19.417631 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished<br>
>> > playing the file !!!!!<br>
>> > 2011-02-21 17:23:19.417631 [INFO] switch_cpp.cpp:1181 Was VM detected?<br>
>> > no<br>
>> > 2011-02-21 17:23:19.417631 [NOTICE] switch_cpp.cpp:1181 Played the<br>
>> > message<br>
>> > at least once and checked for VM, we should be exiting the loop.<br>
>> ><br>
>> > I also have the Freeswitch log from the date too, but I'm not sure what<br>
>> > I<br>
>> > should post here that would be useful.<br>
>> ><br>
>> ><br>
>> ><br>
>> > On Tue, Feb 22, 2011 at 8:20 PM, Anthony Minessale<br>
>> > <<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>> wrote:<br>
>> >><br>
>> >> do you have any console logs of it failing or any error messages etc?<br>
>> >><br>
>> >><br>
>> >> On Tue, Feb 22, 2011 at 1:22 AM, Michael De Lorenzo<br>
>> >> <<a href="mailto:delorenzodesign@gmail.com" target="_blank">delorenzodesign@gmail.com</a>> wrote:<br>
>> >> > Hello,<br>
>> >> ><br>
>> >> > I have a Freeswitch installation that is intended to make many calls<br>
>> >> > (thousands) and playback a single wav file. The calls are<br>
>> >> > successfully<br>
>> >> > processed (the recipient's phone rings), but the call almost<br>
>> >> > immediately<br>
>> >> > disconnects, after about 1s. Everything seems to work fine if I'm<br>
>> >> > only<br>
>> >> > pushing one or two calls through the Freeswitch instance, but as soon<br>
>> >> > as<br>
>> >> > I<br>
>> >> > turn up the call rate (I'm still only doing about 50 concurrent<br>
>> >> > sessions)<br>
>> >> > the playback begins to fail.<br>
>> >> ><br>
>> >> > I've watched the calls go out from the console and nothing looks out<br>
>> >> > of<br>
>> >> > the<br>
>> >> > ordinary, except that the calls are disconnected with NORMAL CLEARING<br>
>> >> > prior<br>
>> >> > to completion.<br>
>> >> ><br>
>> >> > Here's the Lua script I'm using...<br>
>> >> ><br>
>> >> > profile_id = argv[1];<br>
>> >> > account_code = argv[2];<br>
>> >> > client_id = argv[3];<br>
>> >> > caller_id_name = argv[4];<br>
>> >> > caller_id = argv[5];<br>
>> >> > dial_id = argv[6];<br>
>> >> > number_to_call = argv[7];<br>
>> >> > message_to_play = argv[8];<br>
>> >> > max_retries = argv[9];<br>
>> >> > retry_interval = argv[10];<br>
>> >> ><br>
>> >> > local human_detected = false<br>
>> >> > local voicemail_detected = false;<br>
>> >> > local message_played = false;<br>
>> >> ><br>
>> >> > recordings_directory = "/usr/local/freeswitch/recordings/messages/";<br>
>> >> ><br>
>> >> > function setDialVariables(set_as_session_variables)<br>
>> >> > local s = "profile_id=" .. profile_id;<br>
>> >> > s = s .. ",account_code=" .. account_code;<br>
>> >> > s = s .. ",client_id=" .. client_id;<br>
>> >> > s = s .. ",caller_id_name=" .. caller_id_name;<br>
>> >> > s = s .. ",caller_id=" .. caller_id;<br>
>> >> > s = s .. ",dial_id=" .. dial_id;<br>
>> >> > s = s .. ",number_to_call=" .. number_to_call;<br>
>> >> > s = s .. ",message_to_play=" .. message_to_play;<br>
>> >> ><br>
>> >> > freeswitch.consoleLog("notice", s .. "\n");<br>
>> >> ><br>
>> >> > return s<br>
>> >> > end<br>
>> >> ><br>
>> >> > function printSessionVariables()<br>
>> >> > freeswitch.consoleLog("notice", "******* PRINTING SESSION<br>
>> >> > VARIABLES<br>
>> >> > **********\n");<br>
>> >> > -- ommitted<br>
>> >> > freeswitch.consoleLog("notice",<br>
>> >> > "**********************************************\n");<br>
>> >> > end<br>
>> >> ><br>
>> >> > function onInput(s, type, obj, arg)<br>
>> >> > if(type == "event" and voicemail_detected == false) then<br>
>> >> > freeswitch.consoleLog("debug","************ VOICE<br>
>> >> > MAIL/ANSWERING<br>
>> >> > MACHINE DETECTED *************\n");<br>
>> >> > voicemail_detected = true;<br>
>> >> > return "break";<br>
>> >> > end<br>
>> >> > return true;<br>
>> >> > end<br>
>> >> ><br>
>> >> > function playbackMessage(sleepTime)<br>
>> >> > message_played = false;<br>
>> >> > session:sleep(sleepTime);<br>
>> >> > -- play a file<br>
>> >> > message_file = recordings_directory .. message_to_play;<br>
>> >> > freeswitch.consoleLog("notice", "Playing file: " .. message_file<br>
>> >> > ..<br>
>> >> > "\n");<br>
>> >> > session:streamFile(message_file);<br>
>> >> > freeswitch.consoleLog("notice", "!!!!! Finished playing the file<br>
>> >> > !!!!!\n");<br>
>> >> > message_played = true;<br>
>> >> > end<br>
>> >> ><br>
>> >> > session = freeswitch.Session("{" .. setDialVariables(false) ..<br>
>> >> > ",ignore_early_media=true,origination_caller_id_name=" ..<br>
>> >> > caller_id_name<br>
>> >> > ..<br>
>> >> > ",origination_caller_id_number=+1" .. caller_id ..<br>
>> >> > "}sofia/gateway/gateway_"<br>
>> >> > .. profile_id .. "/" .. number_to_call);<br>
>> >> ><br>
>> >> > while(session:ready()) do<br>
>> >> > setDialVariables(true)<br>
>> >> > session:answer();<br>
>> >> ><br>
>> >> > -- session:execute("continue_on_fail","true");<br>
>> >> > session:setInputCallback("onInput","true");<br>
>> >> > session:execute("avmd","start");<br>
>> >> ><br>
>> >> > playbackMessage(200);<br>
>> >> ><br>
>> >> > vm_status = voicemail_detected == true and "yes" or "no"<br>
>> >> > freeswitch.consoleLog("info", "Was VM detected? " .. vm_status ..<br>
>> >> > "\n");<br>
>> >> > if(voicemail_detected) then<br>
>> >> > return "break";<br>
>> >> > end<br>
>> >> ><br>
>> >> > freeswitch.consoleLog("notice", "Played the message at least once<br>
>> >> > and<br>
>> >> > checked for VM, we should be exiting the loop.\n")<br>
>> >> > end<br>
>> >> ><br>
>> >> > if (voicemail_detected) then<br>
>> >> > freeswitch.consoleLog("info", "Playback for voicemail.\n");<br>
>> >> > session:execute("avmd","stop");<br>
>> >> > playbackMessage(5000);<br>
>> >> > end<br>
>> >> ><br>
>> >> > freeswitch.consoleLog("info", "All finished, hanging up the<br>
>> >> > session.\n");<br>
>> >> > session:hangup();<br>
>> >> ><br>
>> >> > Any help would be greatly appreciated.<br>
>> >> ><br>
>> >> > Thank you,<br>
>> >> ><br>
>> >> > Michael<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>
>> >> ><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" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
>> >> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">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" target="_blank">sip:888@conference.freeswitch.org</a><br>
>> >> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
>> >> pstn:+19193869900<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" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
>> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">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" target="_blank">sip:888@conference.freeswitch.org</a><br>
>> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
>> pstn:+19193869900<br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div>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" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">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" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>