B.98. RetryDial()

Attemps to dial and retries if the attempt fails.
RetryDial(announcement,sleep,retries,technology/resource[&technology2/resource2...][,timeout[,options[,URL]]])
Attempts, like Dial(), to call a device. Plays the file announcement (without file extension!) if no device can be reached, then waits sleep seconds before trying again. The default sleep interval is 10 seconds. After retries retries, the call is handed to the next priority in the dialplan. If retries is set to 0 or -1, the application retries indefinitely.
A single-digit extension may be dialed by the caller during the sleep interval. If this extension exists in the context defined by ${EXITCONTEXT} or in the current context, the call is passed to that extension.
All arguments following retries are passed to directly to Dial().
; Try to dial the number three times, repeat after 5 seconds:
exten => 123,1,RetryDial(trying-to-connect-you,5,3,IAX2/VOIP/18005554148,30)
; If the caller presses 4 while waiting, try the call on Zap/4:
exten => 0,1,RetryDial(trying-to-connect-you,5,3,Zap/4/18005554148,30)

Note

Internal help for this application in Asterisk 1.4:
  -= Info about application 'RetryDial' =- 

[Synopsis]
Place a call, retrying on failure allowing optional exit extension.

[Description]
  RetryDial(announce|sleep|retries|dialargs): This application will attempt to
place a call using the normal Dial application. If no channel can be reached,
the 'announce' file will be played. Then, it will wait 'sleep' number of
seconds before retying the call. After 'retires' number of attempts, the
calling channel will continue at the next priority in the dialplan. If the
'retries' setting is set to 0, this application will retry endlessly.
  While waiting to retry a call, a 1 digit extension may be dialed. If that
extension exists in either the context defined in ${EXITCONTEXT} or the current
one, The call will jump to that extension immediately.
  The 'dialargs' are specified in the same format that arguments are provided
to the Dial application.
diff output to internal help in Asterisk 1.2:
- none -