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

ImportVar() — Sets a variable based on a channel variable from a different channel

Synopsis

    ImportVar(newvar=channel,variable)

Sets variable newvar to variable as evaluated on the specified channel (instead of the current channel). If newvar is prefixed with _, single inheritance is assumed. If prefixed with _ _, infinite inheritance is assumed.

    ; read the Caller ID information from channel Zap/1
    exten => 123,1,Answer()
    exten => 123,1,ImportVar(cidinfo=Zap/1,CALLERID)

See Also

Set()

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