[asterisk-dev] Please consider adding new sip peer/Google Voice retry options

Mark Michelson mmichelson at digium.com
Fri Nov 9 09:36:20 CST 2012


On 11/09/2012 09:20 AM, MichiganTelephone wrote:
> I'd like to see the following settings added for SIP configurations for peers and (in particular) in the settings for whatever is used in a Google Voice connection in Asterisk 11, unless there is already some mechanism to handle it (I'm not on 11 yet so don't know):
>
> errorretries= (default 0)
> errorretrydelay= (in ms, suggested default 500)
> retryonerrorcodes= (comma separated list, suggested default 503)
>
> The idea is that when you are creating a trunk to Google Voice, it is far too often the case that Google rejects the call with a 503 error.  But if you immediately retry the call, it will go through on the second attempt.  Rather than force the user to hang up redial, why not simply provide a mechanism that will retry the call one or more times on the same trunk or connection prior to giving up, with an optional short delay between attempts, and the ability to specify that these retries should occur only if particular errors (in particular the dreaded 503 error) are the cause of the rejection.
>
> Sane values (for Google Voice) might be something like  errorretries=2, errorretrydelay=500, and retryonerrorcodes=503.  If the errorretries value is not set it should default to 0, meaning the call fails without any retries if an error is received, as happens now.
>
> If possible it would be great if this could be backported as far as Asterisk 1.8.  Thank you for your consideration.
>
> By the way, FreePBX users could easily work around the lack of such a setting by adding a trunk more than once the the Outbound Route trunk selection list, however FreePBX doesn't allow that.  It's possible to circumvent FreePBX's disapproval by directly manipulating the MySQL database that FreePBX uses but that's a pain, and in any case, such a workaround would not help uses that don't use FreePBX.
>
These options aren't necessary since you can perform this sort of logic 
in the dialplan already in Asterisk 11. Have a look at 
https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause . It details how 
you can get the technology-specific cause for a failed Dial for each 
outbound channel. Once you have that information, you can retry, 
continue, try dialing a different destination, or whatever you feel like 
doing in your dialplan.

Mark Michelson



More information about the asterisk-dev mailing list