[Freeswitch-users] Problem for getting dtmf value in Web Application.

Manish Talwar manish.talwar at zaristo.com
Fri Sep 19 17:32:50 MSD 2014


Hi,


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.


As per my requirement, I want to play multiple audio file by "playback", run TTS by "Speak", and get digit by "Play_and_get_digits" in a single dialplan. I am sending below request to freeswit for this and its working fine too:



<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>



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.

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.

Please let me know, how to I send my request to Action URL immidieatly when user press any digit and how can I read dtmf value in my web application.

Thanks,

Regards,
Manish Talwar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140919/6127ec16/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list