[Freeswitch-users] Httapi: getting digits in playback

Denis Gasparin denis.gasparin at edistar.com
Wed Aug 14 20:49:03 MSD 2013


Hi. 


After playback I ask to the user to digit a number between 1 and 9999 with or without terminating the input with '#'. 


The first httapi xml I tried was the following: 



<document type="text/freeswitch-httapi"> 
<work> 
<playback file="ivr/please_enter_number_between_1_9999.wav" digit-timeout="5000" name="user_input" terminators="#"> 
<bind>~\d{1,4}#{0,1}</bind> 
</playback> 
</work> 
</document> 


Freeswitch calls my action as soon as the user input the first digit. 
So I modified the xml in order to use two bindings: 



<document type="text/freeswitch-httapi"> 
<work> 
<playback file="ivr/please_enter_number_between_1_9999.wav" digit-timeout="5000" name="user_input" terminators="#"> 
<bind>~\d{1,3}#{0,1}</bind> 
<bind>~\d{4}#{0,1}</bind> 
</playback> 
</work> 
</document> 


Using this xml I get the user input only if the user press "#" after inserting the number. 
If the user presses 123 and then waits for timeout, Freeswitch doesn't send any digits to my action (but sometimes it does). Why? 


>From the logs I see that the digits are always received from Freeswitch. 


Thank you in advance for your help. 
Denis Gasparin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130814/d29306f5/attachment-0001.html 


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