I hope this is the right place to ask this question. I am running freeswitch using LUA. I'm doing outbound calling for a load tester. I have a number that when you call it you need to enter 2654# before the call get's answered. So I need a way of dialing DTMF digits before the other end answers. I tried to just sleep and send_dtmf after the session.ready but that doesn't work. Is there a way to do this. Sample code below...thanks if (session:ready()) then session:answer(); session:setVariable("CallCmp", "Script_dcetest1") session:setVariable("PromptFail", "Script_dcetest1") ; api = freeswitch.API(); session:sleep(1000); --status = session:getVariable("SilenceStatus"); session:execute("wait_for_silence", "200 30 20 20000"); -- -- Continue in english, press 2 status = session:getVariable("SilenceStatus"); -- This will get past langauge and main menu prompts if((status == "unset")and(session:ready())) then session:execute("send_dtmf", "2@100"); --@ determines dtmf length, enter NPI
________________________________ From: Jim Daley <jim.daley1223@yahoo.com> To: "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org>; "freeswitch-users@lists.freeswitch.org" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, November 8, 2012 6:31 PM Subject: [Freeswitch-users] (no subject) I hope this is the right place to ask this question. I am running freeswitch using LUA. I'm doing outbound calling for a load tester. I have a number that when you call it you need to enter 2654# before the call get's answered. So I need a way of dialing DTMF digits before the other end answers. I tried to just sleep and send_dtmf after the session.ready but that doesn't work. Is there a way to do this. Sample code below...thanks if (session:ready()) then session:answer(); session:setVariable("CallCmp", "Script_dcetest1") session:setVariable("PromptFail", "Script_dcetest1") ; api = freeswitch.API(); session:sleep(1000); --status = session:getVariable("SilenceStatus"); session:execute("wait_for_silence", "200 30 20 20000"); -- -- Continue in english, press 2 status = session:getVariable("SilenceStatus"); -- This will get past langauge and main menu prompts if((status == "unset")and(session:ready())) then session:execute("send_dtmf", "2@100"); --@ determines dtmf length, enter NPI _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com/ FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com/ Official FreeSWITCH Sites http://www.freeswitch.org/ http://wiki.freeswitch.org/ http://www.cluecon.com/ 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/
what happens in the media stream prior to the call being answered? -MC On Thu, Nov 8, 2012 at 4:31 PM, Jim Daley <jim.daley1223@yahoo.com> wrote:
I hope this is the right place to ask this question.
I am running freeswitch using LUA. I'm doing outbound calling for a load tester.
I have a number that when you call it you need to enter 2654# before the call get's answered. So I need a way of dialing DTMF digits before the other end answers. I tried to just sleep and send_dtmf after the session.ready but that doesn't work.
Is there a way to do this. Sample code below...thanks
if (session:ready()) then session:answer(); session:setVariable("CallCmp", "Script_dcetest1") session:setVariable("PromptFail", "Script_dcetest1") ; api = freeswitch.API(); session:sleep(1000); --status = session:getVariable("SilenceStatus"); session:execute("wait_for_silence", "200 30 20 20000"); -- -- Continue in english, press 2 status = session:getVariable("SilenceStatus"); -- This will get past langauge and main menu prompts if((status == "unset")and(session:ready())) then session:execute("send_dtmf", "2@100"); --@ determines dtmf length, enter NPI
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
participants (2)
-
Jim Daley
-
Michael Collins