//var saved_digts="";
var dtmf="";
var
stop_dtmf=false;
var dtmf_digits="";
function
on_dtmf(session,type,digits,arg)
{
if(saved_digits =
session.getVariable("digits"))
session.setVariable("digits",saved_digits +
digits.digit);
else
{
session.setVariable("digits",digits.digit);
dtmf =
session.getDigits(10,"#",inter_digit_timeout);
session.setVariable("digits",session.getVariable("digits") +
dtmf);
}
stop_dtmf =
true;
return
false;
}
function
main()
{
session.streamFile("ivr/coral_welcom_deepawali.wav",on_dtmf);
while(dtmf_digits=="")
{
if(!stop_dtmf)
session.collectInput(on_dtmf,dtmf,"5"
);
if(stop_dtmf)
dtmf_digits=session.getVariable("digits");
}
console_log("INFO","You
Entered =
"+dtmf_digits+"\n");
session.execute("stop_dtmf");
session.streamFile("ivr/coral_welcom_deepawali.wav");
session.hangup();
}
main();
==========================================================================
If you need any other information related to this, plz do let me know.
----- Original Message -----From: Brian WestSent: Thursday, February 16, 2012 7:18 PMSubject: Re: [Freeswitch-users] stop sip_infoThis is your phones fault. Notice in the SDP it doesn't negotiate telephoney-event so we have nothing to clue us in on that it does 2833 or info. So in reality you should go beat the creator of this phone to death for not doing something about this. (btw info draft expired and IS NOT a standard).BUT you can relax now.. set the sofia profile option 'liberal-dtmf' to true.... NEXT!!!/bPS: BKW-1 updated with latest info.
On Feb 16, 2012, at 6:11 AM, Piyush Sharma wrote:
Thanks for Response Michael,
This is the capture of wireshark
INVITE sip:3333@192.168.4.18:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.244:5065;branch=z9hG4bK9268238112493813801;rport
From: 30000 <sip:30000@192.168.4.18:5060>;tag=1653316119
To: "3333" <sip:3333@192.168.4.18:5060>
Call-ID: 188371401128256-63249236018@192.168.4.244
CSeq: 1 INVITE
Contact: <sip:30000@192.168.4.244:5065>
Max-Forwards: 70
Supported: replaces, join, path
User-Agent: Voip Phone 1.0
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Type: application/sdp
Content-Length: 185
v=0
o=30000 24630637 15149730 IN IP4 192.168.4.244
s=A conversation
c=IN IP4 192.168.4.244
t=0 0
m=audio 10006 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=sendrecv
--
Brian West
FreeSWITCH Solutions, LLC
Phone: +1 (918) 420-9266
Fax: +1 (918) 420-9267
brian@freeswitch.org
http://www.freeswitch.org