Hi, How can I access the variable in marco? Say, there is a dial plan below. In line 4, it will show the variable FOO=1234. However, the variable in line 2 is nothing. Can I assign a varilable in macro and access it outside a macro in the same session only? [dialplan] 1: exten => 1234,1,Macro(test) 2: exten => 1234,2,NoOp(${FOO}) [macro-test] 3: exten => s,1,Set(FOO=1234) 4: exten => s,2,NoOp(${FOO})
On Tue, Jun 27, 2006 at 12:13:31PM +0800, unplug wrote:> Hi, > > How can I access the variable in marco? Say, there is a dial plan > below. In line 4, it will show the variable FOO=1234. However, the > variable in line 2 is nothing. Can I assign a varilable in macro and > access it outside a macro in the same session only?Yes.> > > [dialplan] > 1: exten => 1234,1,Macro(test) > 2: exten => 1234,2,NoOp(${FOO}) > > [macro-test] > 3: exten => s,1,Set(FOO=1234) > 4: exten => s,2,NoOp(${FOO})-- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com
How? Can u show me? On 6/27/06, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:> On Tue, Jun 27, 2006 at 12:13:31PM +0800, unplug wrote: > > Hi, > > > > How can I access the variable in marco? Say, there is a dial plan > > below. In line 4, it will show the variable FOO=1234. However, the > > variable in line 2 is nothing. Can I assign a varilable in macro and > > access it outside a macro in the same session only? > > Yes. > > > > > > > [dialplan] > > 1: exten => 1234,1,Macro(test) > > 2: exten => 1234,2,NoOp(${FOO}) > > > > [macro-test] > > 3: exten => s,1,Set(FOO=1234) > > 4: exten => s,2,NoOp(${FOO}) > > -- > Tzafrir Cohen sip:tzafrir@local.xorcom.com > icq#16849755 iax:tzafrir@local.xorcom.com > +972-50-7952406 > tzafrir.cohen@xorcom.com http://www.xorcom.com > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >