When I play a file using Playback command in Asterisk, it doesn’t stop playing when a key is pressed on the phone. Is there a way to stop playing and go to the next command?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Playback is not intended to read input from the user, but as a kind of tool for playing a welcome message (note that Playback will answer the channel if not answered). The manual for Playback does not say anything about reading input from the user. Furthermore, this voip-info page states:
So try using Read in your dialplan, like:
This will play the sound mysound, and read up to 1 digit from the user. More examples (and the complete syntax with its options) are available at the voip-info page for Read.
Best!
EDIT: In the example, the digit read will be save in the dialplan variable get.