[Asterisk-Users] chan_local and variables

Steve Creel screel at turbs.com
Fri Feb 13 09:14:17 MST 2004


We need to implement the following:
	Call comes in, ring ZAP/1 (6 rings)
	For the last two rings, also ring ZAP/2

I have the following (which works as expected):

[incoming]
exten => s,1,DIAL(Local/123 at test1 & Local/124 at test1,18)

[test1]
exten => 123,1,Dial(ZAP/1)
exten => 124,1,Wait(12)
exten => 124,2,Dial(ZAP/2)


I can't figure out how to back this into a macro.  I would like to use the
setup below, but it seems impossible to pass variables down into the local
channel.  Can anyone confirm this, or suggest some alternative?  (I've
tried the /n on the chan_local, with no success)


[macro-standard-extension-coverage]
exten => s,1,SetVar(PrimaryChannel=${ARG1})
exten => s,2,SetVar(DelayedChannel=${ARG2})
exten => s,3,Dial(Local/1 at delayed & Local/2 at delayed,18)

[delayed]
exten => 1,1,Dial(${PrimaryChannel})
exten => 2,1,Wait(12)
exten => 2,2,Dial(${DelayedChannel})



___________________________________________________________
Steve Creel                                screel at turbs.com





More information about the asterisk-users mailing list