Hello, Thanks for replying.
Answers below: On 23 April 2011 18:29, Sherwood McGowan <[email protected]> wrote: > > > On Sat, Apr 23, 2011 at 11:20 AM, Tiago Geada <[email protected]>wrote: > >> Hi. >> >> Im having trouble setting variables in channel dialplan and re-using them >> in Extension dialplan... >> >> Im using the following call file: >> >> Channel: Local/210332450@ZonNew-Outbound >> CallerID: ZonNew-Outbound:49:210332450: >> MaxRetries: 5 >> RetryTime: 10 >> WaitTime: 60 >> Account: Outbound210332450 >> Context: agents >> Extension: 888210332450 >> Set: __PARTNER=ZonNew-Outbound >> Set: NUMBER=210332450 >> >> >> - >> >> In "Local/210332450@ZonNew-Outbound" I Set(bla='blabla'); >> >> It seems I cannot re-use this var in extension _888XXXXXXXXX in context >> agents... >> >> >> Basically the Channel dialplan has a Queue() and in _888XXXXXXXXX I would >> like to know the peer (or interface) that answered it... What can I do? >> >> Thanks in advance >> >> > I'm a little confused by "It Seems I cannot re-use this var in extension > _888XXXXXXXXXX in context agents"....Of course you can use it...but if you > set bla to a different value in your code where your callfile is processed, > Asterisk will (rightfully so) just set bla = to whatever you set it to.... > > Now, if the callfile doesn't send a channel "through" the context that > you're trying to set blah, that's a little odd... > > Now, as far as retrieving the information about the interface that answered > the call....look in queues.conf.sample....there's a nifty configuration > option: > > *setinterfacevar=no ; (the default is no)* > > Yes, I am aware of this and I do use it. However, I cannot use MEMBERINTERFACE variable in dialplan _888XXXXXXXXX, and that is where I'm needing it. Also seems that its two channel legs and the only way would be to use IMPORT() o SHARED() and for that I would have to know the channel name... I am right now using IMPORT() like: Set(CALLERID(num)=${IMPORT(${CHANNEL:0:$[${LEN(${CHANNEL})} - 1]}2,MEMBERNAME)}); but I fee that it is a ugly fix. What if call leg changes from 2 to 3? > That option, when set to yes, causes several variables to be created *just > * prior to the caller being bridged with the queue member... > > -- > Sherwood McGowan > Telecommunications and VOIP Consultant > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
