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

While() — Starts a while loop

Synopsis

    While(expr)

Starts a while loop. Execution will return to this point when EndWhile() is called, until expr is no longer true. If a condition is met causing the loop to exit, it continues on past the EndWhile().

    exten => 123,1,Set(COUNT=1)
    exten => 123,2,While($[ ${COUNT} < 5 ])
    exten => 123,3,SayNumber(${COUNT})
    exten => 123,4,EndWhile()

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