I'd like some feedback on potentially submitting a request (and probably a patch too) to change the way the AGI command GET DATA works.
Right now, # terminates the entry, which is then returned with the # stripped off the end. What I'd like is to allow user configurable termination digits, which are not stripped off the end. Reasoning: Some entries you'd like to terminate with #. Right now it's fine, you can tell if # was pressed or not by looking for the lack of a (timeout) entry in the returned result. You may want to allow * to cancel an entry. This is not possible right now. Systems I've coded previously allow # to terminate and complete a digit entry, * to correct an incorrect entry (playing the prompt again and restarting digit collection). Pressing * with no prior digit entry cancels the step and returns to the previous menu. I guess there's a compatibility issue with stuff that's out there already but if it was an optional 4th parameter this would be backwards compatible. Proposed new syntax: GET DATA <filename> <timeout> <maxdigits> <terminator> If terminator is specified (and it may be multicharacter, like "*#" to give me the functionality above), return the digit string collected so far, including the terminating digit. The calling app can strip the trailing character if needed. Thoughts? Cheers Paul _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users