<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>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>
</body>
</html>