[Freeswitch-users] (no subject)

Jim Daley jim.daley1223 at yahoo.com
Fri Nov 9 03:31:23 MSK 2012


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 at 100"); --@ determines dtmf length, enter NPI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121108/d04514f9/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list