<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>&#8203;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 &lt;manish.talwar@zaristo.com&gt;<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>&nbsp;</div>
</div>
<div>
<p>Hi,<br>
</p>
<p><br>
</p>
<p>I am new in freeswitch and I&nbsp;want to integrate it with our IVR web application. I am using httapi for integrated it and able to play a audio&nbsp;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">&nbsp;want to play multiple audio file by &quot;playback&quot;, run&nbsp;TTS by &quot;Speak&quot;, and get digit by
</span><span style="font-size:12pt">&quot;Play_and_get_digits&quot; 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>
&lt;document type=&quot;xml/freeswitch-httapi&quot;&gt;&lt;params&gt;&lt;/params&gt;&lt;variables&gt;&lt;myDigit&gt;-1&lt;/myDigit&gt;&lt;/variables&gt;&lt;work&gt;&lt;getVariable name=&quot;myDigit&quot; permanent=&quot;1&quot;/&gt;&lt;execute application=&quot;log&quot; data=&quot;INFO my_chan_var contains ${myDigit}&quot;/&gt;&lt;speak name=&quot;extenSpeak&quot; text=&quot;Welcome
 to Q Pay&quot; engine=&quot;flite&quot; voice=&quot;slt&quot; &gt;&lt;/speak&gt;&lt;execute action=&quot;http://localhost:9000/ivr/fswelcomeresponse&quot; application=&quot;play_and_get_digits&quot; data=&quot;0 1 1 2000 # ivr/MP3/dial_menu_index_five.mp3 '' myDigit ''&quot; /&gt;&lt;execute application=&quot;log&quot; data=&quot;INFO my_chan_var
 contains ${myDigit}&quot;/&gt;&lt;execute application=&quot;log&quot; data=&quot;INFO my_chan_var contains ${myDigit}&quot;/&gt;&lt;playback name=&quot;exten&quot; file=&quot;ivr/MP3/dial_menu_index_one.mp3&quot; action=&quot;http://localhost:9000/ivr/fswelcomeresponse&quot; digit-timeout=&quot;1000&quot; input-timeout=&quot;1000&quot; &gt;&lt;bind&gt;~\d{1,3}#{0,1}&lt;/bind&gt;&lt;/playback&gt;&lt;execute
 application=&quot;log&quot; data=&quot;INFO my_chan_var contains ${myDigit}&quot;/&gt;&lt;speak name=&quot;extenSpeak1&quot; text=&quot;Press two for english.&quot; engine=&quot;flite&quot; voice=&quot;slt&quot; &gt;&lt;/speak&gt;&lt;execute application=&quot;log&quot; data=&quot;INFO my_chan_var contains ${myDigit}&quot;/&gt;&lt;playback name=&quot;exten&quot; file=&quot;ivr/MP3/dial_menu_index_four.mp3&quot;
 action=&quot;http://localhost:9000/ivr/fswelcomeresponse&quot; digit-timeout=&quot;1000&quot; input-timeout=&quot;1000&quot; &gt;&lt;bind&gt;~\d{1,3}#{0,1}&lt;/bind&gt;&lt;/playback&gt;&lt;execute action=&quot;http://localhost:9000/ivr/fswelcomeresponse&quot; application=&quot;play_and_get_digits&quot; data=&quot;0 1 1 2000 # ivr/MP3/dial_menu_index_five.mp3
 '' myDigit ''&quot; /&gt;&lt;execute application=&quot;log&quot; data=&quot;INFO my_chan_var contains ${myDigit}&quot;/&gt;&lt;execute application=&quot;log&quot; data=&quot;INFO my_chan_var contains ${myDigit}&quot;/&gt;&lt;speak name=&quot;extenSpeak2&quot; text=&quot;Press star to repeat.&quot; engine=&quot;flite&quot; voice=&quot;slt&quot; &gt;&lt;/speak&gt;&lt;/work&gt;&lt;/document&gt;<br>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Currently,&nbsp;Its playing all commands as mentioned in dialplan and then move to Action URL.&nbsp;&#8203;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 &quot;log&quot; 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>&nbsp;<br>
</div>
<div>Please let me know, how to I send my request&nbsp;<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">to Action URL&nbsp;</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&nbsp;</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>