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

Set() — Sends

Synopsis

    Set(n=value)

Sets the variable n to the specified value. If the variable name is prefixed with _, single inheritance is assumed. If the variable name is prefixed with _ _, infinite inheritance is assumed. Inheritance is used when you want the outgoing channel to inherit the variable from the dialplan.

Variables set with this application are valid only in the current channel. Use the SetGlobalVar() application to set global variables.

    ; set a variable called DIALTIME, then use it
    exten => 123,1,SetVar(DIALTIME=20)
    exten => 123,1,Dial(Zap/4/5551212,,${DIALTIME})

See Also

SetGlobalVar(), README.variables

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