I'm not sure where to check, but there's entries like this in freeswitch.log.2011-02-21-23-40-11.1 2011-02-21 17:22:53.157390 [NOTICE] mod_logfile.c:158 New log started. 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 Played the message at least once and checked for VM, we should be exiting the loop. 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 ************* SETTING SESSION VARIABLES *************** 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 Session Variable[profile_id]: 1 2011-02-21 17:22:53.157390 [NOTICE] switch_cpp.cpp:1181 ************* DONE SETTING SESSION VARIABLES *********** 2011-02-21 17:22:53.377395 [NOTICE] switch_cpp.cpp:1181 Playing file: /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav 2011-02-21 17:22:53.377395 [DEBUG] switch_ivr_play_say.c:1186 Codec Activated L16@8000hz 1 channels 20ms 2011-02-21 17:23:03.717511 [DEBUG] switch_ivr_play_say.c:1515 done playing file 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished playing the file !!!!! 2011-02-21 17:23:03.717511 [INFO] switch_cpp.cpp:1181 Was VM detected? no 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 Played the message at least once and checked for VM, we should be exiting the loop. 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 ************* SETTING SESSION VARIABLES *************** 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 Session Variable[profile_id]: 1 2011-02-21 17:23:03.717511 [NOTICE] switch_cpp.cpp:1181 ************* DONE SETTING SESSION VARIABLES *********** 2011-02-21 17:23:03.937661 [NOTICE] switch_cpp.cpp:1181 Playing file: /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav 2011-02-21 17:23:03.937661 [DEBUG] switch_ivr_play_say.c:1186 Codec Activated L16@8000hz 1 channels 20ms 2011-02-21 17:23:08.237260 [DEBUG] switch_ivr_play_say.c:1515 done playing file 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished playing the file !!!!! 2011-02-21 17:23:08.237260 [INFO] switch_cpp.cpp:1181 Was VM detected? no 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 Played the message at least once and checked for VM, we should be exiting the loop. 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 ************* SETTING SESSION VARIABLES *************** 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 Session Variable[profile_id]: 1 2011-02-21 17:23:08.237260 [NOTICE] switch_cpp.cpp:1181 ************* DONE SETTING SESSION VARIABLES *********** 2011-02-21 17:23:08.437885 [NOTICE] switch_cpp.cpp:1181 Playing file: /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav 2011-02-21 17:23:08.437885 [DEBUG] switch_ivr_play_say.c:1186 Codec Activated L16@8000hz 1 channels 20ms 2011-02-21 17:23:08.857270 [DEBUG] switch_ivr_play_say.c:1515 done playing file 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished playing the file !!!!! 2011-02-21 17:23:08.857270 [INFO] switch_cpp.cpp:1181 Was VM detected? no 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 Played the message at least once and checked for VM, we should be exiting the loop. 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 ************* SETTING SESSION VARIABLES *************** 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 Session Variable[profile_id]: 1 2011-02-21 17:23:08.857270 [NOTICE] switch_cpp.cpp:1181 ************* DONE SETTING SESSION VARIABLES *********** 2011-02-21 17:23:09.077014 [NOTICE] switch_cpp.cpp:1181 Playing file: /usr/local/freeswitch/recordings/messages/16c0f890_c35e33c0_777973.wav 2011-02-21 17:23:09.077014 [DEBUG] switch_ivr_play_say.c:1186 Codec Activated L16@8000hz 1 channels 20ms 2011-02-21 17:23:19.417631 [DEBUG] switch_ivr_play_say.c:1515 done playing file 2011-02-21 17:23:19.417631 [NOTICE] switch_cpp.cpp:1181 !!!!! Finished playing the file !!!!! 2011-02-21 17:23:19.417631 [INFO] switch_cpp.cpp:1181 Was VM detected? no 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. I also have the Freeswitch log from the date too, but I'm not sure what I should post here that would be useful. On Tue, Feb 22, 2011 at 8:20 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
do you have any console logs of it failing or any error messages etc?
On Tue, Feb 22, 2011 at 1:22 AM, Michael De Lorenzo <delorenzodesign@gmail.com> wrote:
Hello,
I have a Freeswitch installation that is intended to make many calls (thousands) and playback a single wav file. The calls are successfully processed (the recipient's phone rings), but the call almost immediately disconnects, after about 1s. Everything seems to work fine if I'm only pushing one or two calls through the Freeswitch instance, but as soon as I turn up the call rate (I'm still only doing about 50 concurrent sessions) the playback begins to fail.
I've watched the calls go out from the console and nothing looks out of the ordinary, except that the calls are disconnected with NORMAL CLEARING prior to completion.
Here's the Lua script I'm using...
profile_id = argv[1]; account_code = argv[2]; client_id = argv[3]; caller_id_name = argv[4]; caller_id = argv[5]; dial_id = argv[6]; number_to_call = argv[7]; message_to_play = argv[8]; max_retries = argv[9]; retry_interval = argv[10];
local human_detected = false local voicemail_detected = false; local message_played = false;
recordings_directory = "/usr/local/freeswitch/recordings/messages/";
function setDialVariables(set_as_session_variables) local s = "profile_id=" .. profile_id; s = s .. ",account_code=" .. account_code; s = s .. ",client_id=" .. client_id; s = s .. ",caller_id_name=" .. caller_id_name; s = s .. ",caller_id=" .. caller_id; s = s .. ",dial_id=" .. dial_id; s = s .. ",number_to_call=" .. number_to_call; s = s .. ",message_to_play=" .. message_to_play;
freeswitch.consoleLog("notice", s .. "\n");
return s end
function printSessionVariables() freeswitch.consoleLog("notice", "******* PRINTING SESSION VARIABLES **********\n"); -- ommitted freeswitch.consoleLog("notice", "**********************************************\n"); end
function onInput(s, type, obj, arg) if(type == "event" and voicemail_detected == false) then freeswitch.consoleLog("debug","************ VOICE MAIL/ANSWERING MACHINE DETECTED *************\n"); voicemail_detected = true; return "break"; end return true; end
function playbackMessage(sleepTime) message_played = false; session:sleep(sleepTime); -- play a file message_file = recordings_directory .. message_to_play; freeswitch.consoleLog("notice", "Playing file: " .. message_file .. "\n"); session:streamFile(message_file); freeswitch.consoleLog("notice", "!!!!! Finished playing the file !!!!!\n"); message_played = true; end
session = freeswitch.Session("{" .. setDialVariables(false) .. ",ignore_early_media=true,origination_caller_id_name=" .. caller_id_name .. ",origination_caller_id_number=+1" .. caller_id .. "}sofia/gateway/gateway_" .. profile_id .. "/" .. number_to_call);
while(session:ready()) do setDialVariables(true) session:answer();
-- session:execute("continue_on_fail","true"); session:setInputCallback("onInput","true"); session:execute("avmd","start");
playbackMessage(200);
vm_status = voicemail_detected == true and "yes" or "no" freeswitch.consoleLog("info", "Was VM detected? " .. vm_status .. "\n"); if(voicemail_detected) then return "break"; end
freeswitch.consoleLog("notice", "Played the message at least once and checked for VM, we should be exiting the loop.\n") end
if (voicemail_detected) then freeswitch.consoleLog("info", "Playback for voicemail.\n"); session:execute("avmd","stop"); playbackMessage(5000); end
freeswitch.consoleLog("info", "All finished, hanging up the session.\n"); session:hangup();
Any help would be greatly appreciated.
Thank you,
Michael
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900