<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>​Hi,<br>
</p>
<p><br>
</p>
<p>Please suggest me for my below query ASAP.<br>
</p>
<p><br>
</p>
<p>Regards,<br>
</p>
<p>Manish Talwar<br>
</p>
<p><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Manish Talwar <manish.talwar@zaristo.com><br>
<b>Sent:</b> 19 September 2014 19:02<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Subject:</b> [Freeswitch-users] Problem for getting dtmf value in Web Application.</font>
<div> </div>
</div>
<div>
<p>Hi,<br>
</p>
<p><br>
</p>
<p>I am new in freeswitch and I want to integrate it with our IVR web application. I am using httapi for integrated it and able to play a audio file and TTS also by POST request to freeswitch.</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">As per my requirement, I</span><span style="font-size:12pt"> want to play multiple audio file by "playback", run TTS by "Speak", and get digit by
</span><span style="font-size:12pt">"Play_and_get_digits" in a single dialplan. I am sending below request to freeswit for this and its working fine too:</span></p>
<p><br>
</p>
<p><br>
</p>
<document type="xml/freeswitch-httapi"><params></params><variables><myDigit>-1</myDigit></variables><work><getVariable name="myDigit" permanent="1"/><execute application="log" data="INFO my_chan_var contains ${myDigit}"/><speak name="extenSpeak" text="Welcome
to Q Pay" engine="flite" voice="slt" ></speak><execute action="http://localhost:9000/ivr/fswelcomeresponse" application="play_and_get_digits" data="0 1 1 2000 # ivr/MP3/dial_menu_index_five.mp3 '' myDigit ''" /><execute application="log" data="INFO my_chan_var
contains ${myDigit}"/><execute application="log" data="INFO my_chan_var contains ${myDigit}"/><playback name="exten" file="ivr/MP3/dial_menu_index_one.mp3" action="http://localhost:9000/ivr/fswelcomeresponse" digit-timeout="1000" input-timeout="1000" ><bind>~\d{1,3}#{0,1}</bind></playback><execute
application="log" data="INFO my_chan_var contains ${myDigit}"/><speak name="extenSpeak1" text="Press two for english." engine="flite" voice="slt" ></speak><execute application="log" data="INFO my_chan_var contains ${myDigit}"/><playback name="exten" file="ivr/MP3/dial_menu_index_four.mp3"
action="http://localhost:9000/ivr/fswelcomeresponse" digit-timeout="1000" input-timeout="1000" ><bind>~\d{1,3}#{0,1}</bind></playback><execute action="http://localhost:9000/ivr/fswelcomeresponse" application="play_and_get_digits" data="0 1 1 2000 # ivr/MP3/dial_menu_index_five.mp3
'' myDigit ''" /><execute application="log" data="INFO my_chan_var contains ${myDigit}"/><execute application="log" data="INFO my_chan_var contains ${myDigit}"/><speak name="extenSpeak2" text="Press star to repeat." engine="flite" voice="slt" ></speak></work></document><br>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Currently, Its playing all commands as mentioned in dialplan and then move to Action URL. ​But I need to send my request to Action URL immidieatly when user press any digit.<br>
</div>
<div><br>
</div>
<div>Also, I am able to get dtmf digit by "log" command and its printed on freeswitch console too, but I am not able to get this dtmf value in my web application.<br>
</div>
<div> <br>
</div>
<div>Please let me know, how to I send my request <span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">to Action URL </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">immidie</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">atly </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">when
user press any digit and how can I read dtmf value in my web application.</span><br>
</div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Thanks,</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Regards,</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Manish Talwar</span></div>
<div><br>
</div>
</div>
</div>
</body>
</html>