[asterisk-bugs] [Asterisk 0017487]: [patch] app_recordkey - new record application that returns key pressed

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jun 14 19:09:15 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17487 
====================================================================== 
Reported By:                cal
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17487
Category:                   Applications/NewFeature
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-06-08 12:27 CDT
Last Modified:              2010-06-14 19:09 CDT
====================================================================== 
Summary:                    [patch] app_recordkey - new record application that
returns key pressed
Description: 
I tweaked the app_record application such that it returns a key. Here is an
example of how I am using it:
; RecordKey stops on any digit rather than just #. It returns the digit as
in ${EXTEN}
exten => s,2,RecordKey(${newmsg}.${rectype},${silence},${msg_length}) 
exten => _X,1,Set(seccode=${EXTEN})
exten => _X,2,Read(secrest,,3)
exten => _X,3,Set(seccode=${seccode}${secrest})
exten => _X,4,AGI(ll-login.pl,${seccode})
exten => _X,5,Playback(ll-en-invalid)
exten => _X,6,Goto(lifeline,s,2)
exten => _X,100,Goto(geninstr,s,1)

The reason for this application is to make it easier for our voicemail
clients to enter their login information. The behavior matches that of our
old dialogic equipment.
====================================================================== 

---------------------------------------------------------------------- 
 (0123402) cal (reporter) - 2010-06-14 19:09
 https://issues.asterisk.org/view.php?id=17487#c123402 
---------------------------------------------------------------------- 
Thanks for removing all those files. I've uploaded versions as text files
for 1.4 and 1.6. 

I won't argue one way or the other about making RecordKeys a separate
application or not. Not deleting files by default is important and an
important difference.

Here's a synopsis of how it can be used:

;put no keys into ${EXTEN} but stop on any key
exten => s,1,RecordKeys(${file},${sil},${duration});

;put exactly 4 keys into ${EXTEN}
exten => s,1,RecordKeys(${file},${sil},${duration},,4);

;put up to 8 keys into ${EXTEN} optionally stop early with #
exten => s,1,RecordKeys(${file},${sil},${duration},p,4);

;put up to 8 keys into ${EXTEN} optionally stop early with *
exten => s,1,RecordKeys(${file},${sil},${duration},t,4);

;optionally delete the file on hang up
exten => s,1,RecordKeys(${file},${sil},${duration},d,4);

Note there is no x option but I can put that back in. The Record
application's behavior was an issue because it was too different from how
Dialogic's api works and was likely to confuse some of our clients so this
is the motivation for making a version of Record that handles key input
differently.

I appreciate the comments I have received its certainly a much better
application as a result. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-14 19:09 cal            Note Added: 0123402                          
======================================================================




More information about the asterisk-bugs mailing list