O'Reilly logo

Asterisk: The Future of Telephony by Leif Madsen, Jared Smith, Jim Van Meggelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

RetryDial() — Attempts to place a call, and retries on failure

Synopsis

    RetryDial(announce,sleep,loops,technology/resource[&Technology2/resource2...]
    [,timeout][,options][,URL])

Attempts to place a call. If no channel can be reached, plays the file defined by announce, waiting sleep seconds to retry the call. If the specified number of attempts matches loops, the call will continue with the next priority in the dialplan. If loops is set to 0, the call will retry endlessly.

While waiting, a one-digit extension may be dialed. If that extension exists in either the context defined in ${EXITCONTEXT} (if defined) or the current one, the call will transfer to that extension immediately.

All arguments after loops are passed directly to the Dial() application.

    ; attempt to dial the number three times via IAX, retrying every five 
    seconds
    exten => 123,1,RetryDial(priv-trying,5,3,IAX2/VOIP/8885551212,30)
    ; if the caller presses 9 while waiting, dial the number on the Zap/4 
    channel
    exten => 9,1,RetryDial(priv-trying,5,3,Zap/4/8885551212,30)

SeeAlso

Dial()

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required