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

Prefix() — Prepends the specified digits to the current extension and goes to the resulting extension

Synopsis

    Prefix(digits)

Prefixes the current extension with the digit string specified by digits and continues processing at the next priority for the new extension. So, for example, if priority 1 of extension 1212 is Prefix(555), 555 will be prepended to 1212 and the next step executed will be priority 2 of extension 5551212. If you switch into an extension that has no priority n+1 (where n is the current priority), Asterisk will treat it as though the user dialed an invalid extension.

Always returns 0.

               exten => 1212,1,Prefix(555)
    exten => 5551212,2,SayDigits(${EXTEN})

See Also

Suffix()

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