I wrote a JavaScript for IVR, I used session.execute("stop_dtmf"); now dtmf is not detected. but if the phone generates the sip_info or rfc2833, it does not seem to work. Would someone tell me how can i stop them along with dtmf detection. -- Regards, Piyush Sharma, Coral Telecom Ltd.
Can you provide the inbound invite for the call? Just the SDP is fine. /b On Feb 14, 2012, at 11:21 PM, Piyush Sharma wrote:
I wrote a JavaScript for IVR, I used session.execute("stop_dtmf"); now dtmf is not detected. but if the phone generates the sip_info or rfc2833, it does not seem to work. Would someone tell me how can i stop them along with dtmf detection.
-- Regards, Piyush Sharma, Coral Telecom Ltd.
-- Brian West FreeSWITCH Solutions, LLC Phone: +1 (918) 420-9266 Fax: +1 (918) 420-9267 brian@freeswitch.org http://www.freeswitch.org
Thanks for your response Brian. I am sending you the capture of wireshark. hope it will help to understand the problem, and giving me some solution. ----- Original Message ----- From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Wednesday, February 15, 2012 11:17:34 AM Subject: Re: [Freeswitch-users] stop sip_info Can you provide the inbound invite for the call? Just the SDP is fine. /b On Feb 14, 2012, at 11:21 PM, Piyush Sharma wrote: I wrote a JavaScript for IVR, I used session.execute("stop_dtmf"); now dtmf is not detected. but if the phone generates the sip_info or rfc2833, it does not seem to work. Would someone tell me how can i stop them along with dtmf detection. -- Regards, Piyush Sharma, Coral Telecom Ltd. -- Brian West FreeSWITCH Solutions, LLC Phone: +1 (918) 420-9266 Fax: +1 (918) 420-9267 brian@freeswitch.org http://www.freeswitch.org
On Tue, Feb 14, 2012 at 10:27 PM, Piyush Sharma <piyush.sharma@coraltele.com
wrote:
Thanks for your response Brian. I am sending you the capture of wireshark. hope it will help to understand the problem, and giving me some solution.
Notice he said, "Just the SDP will be fine," but you sent a 283K pcap
file! :D If you can just extract out the SDP and paste it into this thread that might suffice. If Brian has only a cell phone or iPad then he's probably not going to be using Wireshark. Don't forget that he's back in the hospital <http://jira.freeswitch.org/browse/BKW-1>. -MC
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 SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.4.244:5065;branch=z9hG4bK9268238112493813801;rport=5065 From: 30000 <sip:30000@192.168.4.18:5060>;tag=1653316119 To: "3333" <sip:3333@192.168.4.18:5060>;tag=6te4H15jaF6XF Call-ID: 188371401128256-63249236018@192.168.4.244 CSeq: 1 INVITE Contact: <sip:3333@192.168.4.18:5060;transport=udp> User-Agent: FreeSWITCH-mod_sofia/1.0.head-svn-23:25M Accept: application/sdp Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Supported: timer, precondition, path, replaces Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer Content-Type: application/sdp Content-Disposition: session Content-Length: 191 Remote-Party-ID: "3333" <sip:3333@192.168.4.18>;party=calling;privacy=off;screen=no v=0 o=FreeSWITCH 1337124076 1337124077 IN IP4 192.168.4.18 s=FreeSWITCH c=IN IP4 192.168.4.18 t=0 0 m=audio 23862 RTP/AVP 8 a=rtpmap:8 PCMA/8000 a=silenceSupp:off - - - - a=ptime:20 One more important thing, I noticed. I dowloaded this code from git dec 2012, in this code stop_dtmf is not working as it used to work in previous code, i mean stop_dtmf stop detecting sip_info along with dtmf.(it was downloaded approx 1 year 6 month before). ----- Original Message ----- From: "Michael Collins" <msc@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, February 16, 2012 3:27:40 AM Subject: Re: [Freeswitch-users] stop sip_info On Tue, Feb 14, 2012 at 10:27 PM, Piyush Sharma < piyush.sharma@coraltele.com > wrote: Thanks for your response Brian. I am sending you the capture of wireshark. hope it will help to understand the problem, and giving me some solution. Notice he said, "Just the SDP will be fine," but you sent a 283K pcap file! :D If you can just extract out the SDP and paste it into this thread that might suffice. If Brian has only a cell phone or iPad then he's probably not going to be using Wireshark. Don't forget that he's back in the hospital . -MC
This 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!!! /b PS: 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
Sorry Brian, this time i couldn't get you completely, and code was downloaded in Dec 2011, i wrote 2012 (my mistake). If this is really a phone issue, the same code must not work with the old FreeSwitch version and same phone. A day before, I tried with old FreeSwitch, it worked efficiently. Still i will try to go with your seggestion, so that i may find some way to solve this problem. Thanks for your suggestion and get well soon. ----- Original Message ----- From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, February 16, 2012 7:18:23 PM Subject: Re: [Freeswitch-users] stop sip_info This 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!!! /b PS: 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
Hi Brian This is Sharad, coligue of Piyush... Hope you are recovering fast at Hospital. I wish you get well soon. praying for your Good Health. Now let me just explain the case from begining. - a) We have written a very very basic Javascript to handle an incoming call. b) When call comes, XML dialplan invokes the Javascript. c) Javascript plays first prompt & expects some input from the caller. d) Caller can dial either in DTMF / Sip Info / RFC 2833. e) When caller punches some digit, Javascript just detects the input & a debug is printed 'You Entered = 12". f) Now Javascript moves to next etep & plays second prompt. g) While JS plays the second prompt, no input (if caller enters either in DTMF / Sip Info / RFC2833) should be detected. Means before playing second prompt, JS should disable the input detection. This is what we want. Hope it is clear. But the issue is - It works fine when caller dials in DTMF. But when caller dials the digit either in Sip_Info / Rfc2833, freeswitch is detecting the digit during second prompt also. We want to know where we are wrong. How can we disable the SIP_Info / RFC2833 detection during second prompt. Now let me show what we have defined - ==================================================================== Our XML dialplan is like this - <extension name="Digit detection "> <condition field="destination_number" expression="^(3333)$"> <!--<action application="set" data="bypass_media=true"/>--> <action application="stop_dtmf"/> <action application="start_dtmf"/> <action application="set" data="continue_on_fail=true"/> <action application="answer"/> <action application="sleep" data="100"/> <action application="javascript" data="sip_test.js 00 3333"/> </condition> </extension> ======================================================================= ======================================================================= Javascript is - //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. Regards Sharad ----- Original Message ----- From: Brian West To: FreeSWITCH Users Help Sent: Thursday, February 16, 2012 7:18 PM Subject: Re: [Freeswitch-users] stop sip_info This 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!!! /b PS: 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
participants (4)
-
Brian West
-
Michael Collins
-
Piyush Sharma
-
Sharad Garg