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:[email protected]] 
Sent: Tuesday, June 22, 2010 3:52 AM
To: [email protected]
Cc: [email protected]
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
cont...@9793905858
email: [email protected]
         [email protected]
http://profile.iiita.ac.in/RIT2007033/

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to