[asterisk-users] storing DTMF inputs

Danny Nicholas danny at debsinc.com
Tue Jun 22 08:43:41 CDT 2010


DTMF inputs are detected from the dialplan (usually, there are some
exceptions) from a waitexten or read command - let's say your play back said
"press 1 for apples, 2 for cherries or enter a count of bananas to ship".
Here's a dialplan to let you handle that situation

Exten => 100,1,playback(myprompt)

Exten => 100,2,Goto(get-fruit,s,1)

 

[get-fruit]

Exten => s,1,waitexten(5)

Exten => s,2,read(bananas,,100,5)

Exten => s,3,verbose(you want ${bananas} bananas)

Exten => s,4,hangup

Exten => 1,1,playback(apples)

Exten => 1,2,hangup

Exten => 2,1,playback(cherries)

Exten => 2,1,hangup

Exten => t,1,playback(whatdidyouwant)

Exten => t,n,hangup

Exten => *,1,playback(badinput)

Exten => *,n,hangup

 

If you press 1, you get the apples message, 2 the cherries message.  If you
wait 5 seconds, your dtmf input becomes a banana order.  If you didn't wait
5 seconds, bananas is invalid input.  If you enter nothing, you just
timeout.

 

  _____  

From: nikhil singhania [mailto:niksinghania at gmail.com] 
Sent: Tuesday, June 22, 2010 3:52 AM
To: danny at debsinc.com
Cc: asterisk-users at lists.digium.com
Subject: storing DTMF inputs

 

Thanks a lot Danny.

   I have done the part of playing a file by creating a context in my
dialplan. Now I   am puzzled as i wish to store the DTMF inputs done by the
users who is listening to the playback. I found there are ways, but some
specific way by which it is not stored in file but conveyed directly to the
asterisk server. 

  When the call landed up on the softphone, i pressed keys the softphone
detects pressing of the keys but how the server will know which key is
pressed and CLI shows no such message of key pressing. Is it supposed to
show the message??

  There may be other ways too, what ever would be implemented easily.

-- 
Nikhil Kumar
summer intern:simmortel voice technologies
rit2007033
b.tech IT 6th sem
IIIT Allahabad
contact at 9793905858
email: rit2007033 at iiita.ac.in
         niksinghania at gmail.com
http://profile.iiita.ac.in/RIT2007033/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100622/0d0c59dd/attachment.htm 


More information about the asterisk-users mailing list