I have created an Asterisk call file with Maxretries = 3 and RetryTime = 300. Occasionally I need to remove the call file after 2 retries. How would I stop Asterisk making the third call attempt?
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.
There is currently no way to do that without removing the call file from your spooling directory (usually: /var/spool/asterisk/outgoing).
What you need to do (if you need to kill the retry attempts), is:
Another way to handle this is pragmatically, via your dialplan callbacks. For instance:
Let’s say your callfile looks like the following:
And you want to make your callfile retry the call two times (at most). You could write your dialplan code (to implement
my_code) as follows:This will store the state of the callfile in the Asterisk database, and do some manual counting to verify that the call has been attempted < 3 times (if not, then it’ll hangup).
This method is obviously not optimal (as it’s much easier to control this behavior from the application you wrote which actually spools the callfile), but it will work.
Hopefully that helps!