<font color="#000066"><font size="2"><font face="tahoma,sans-serif">Hello,<br></font></font></font><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif">Thanks for replying.<br>
</font></div><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif">Answers below:</font></div><div><div class="gmail_quote">
<br></div><div class="gmail_quote">On 23 April 2011 18:29, Sherwood McGowan <span dir="ltr">&lt;<a href="mailto:sherwood.mcgowan@gmail.com">sherwood.mcgowan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Sat, Apr 23, 2011 at 11:20 AM, Tiago Geada <span dir="ltr">&lt;<a href="mailto:tiago.geada@gmail.com" target="_blank">tiago.geada@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#000066"><font size="2"><font face="tahoma,sans-serif">Hi.</font></font></font><div><font color="#000066" face="tahoma, sans-serif"><br></font></div><div><font color="#000066" face="tahoma, sans-serif">Im having trouble setting variables in channel dialplan and re-using them in Extension dialplan...<br>


</font><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif">Im using the following call file:</font></font></font></div>


<div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><br></font></font></font></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>
<font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>Channel: Local/210332450@ZonNew-Outbound</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>


CallerID: ZonNew-Outbound:49:210332450:</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>MaxRetries: 5</div></font></font></font></div></div><div><div>


<font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>RetryTime: 10</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>WaitTime: 60</div>


</font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>Account: Outbound210332450</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>


Context: agents</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>Extension: 888210332450</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>


Set: __PARTNER=ZonNew-Outbound</div></font></font></font></div></div><div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div>Set: NUMBER=210332450</div></font></font></font></div></div></blockquote>


<div><div><font color="#000066"><font size="2"><font face="tahoma,sans-serif"><div><br></div><div>-</div><div><br></div><div>In  &quot;Local/210332450@ZonNew-Outbound&quot; I Set(bla=&#39;blabla&#39;);</div><div><br></div>


<div>It seems I cannot re-use this var in extension _888XXXXXXXXX in context agents...</div><div><br></div><div><br></div><div>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?</div>


<div><br></div><div>Thanks in advance</div></font></font></font></div></div>
<br></blockquote></div></div><div> <br>I&#39;m a little confused by &quot;It Seems I cannot re-use this var in extension _888XXXXXXXXXX in context agents&quot;....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....<br>

<br></div></div></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote">
<div>Now, if the callfile doesn&#39;t send a channel &quot;through&quot; the context that you&#39;re trying to set blah, that&#39;s a little odd...<br><br>Now, as far as retrieving the information about the interface that answered the call....look in queues.conf.sample....there&#39;s a nifty configuration option:<br>

<br><i>setinterfacevar=no ; (the default is no)</i><br><br></div></div></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span class="Apple-style-span" style="color: rgb(0, 0, 102); font-family: tahoma, sans-serif; ">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&#39;m needing it.</span></div>
<div><span class="Apple-style-span" style="color: rgb(0, 0, 102); font-family: tahoma, sans-serif; "><br></span></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 102); font-family: tahoma, sans-serif; ">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...</span></div>
<div><span class="Apple-style-span" style="color: rgb(0, 0, 102); font-family: tahoma, sans-serif; "><br></span></div><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif">I am right now using IMPORT() like:</font></div>
</div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div class="gmail_quote"><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif">Set(CALLERID(num)=${IMPORT(${CHANNEL:0:$[${LEN(${CHANNEL})} - 1]}2,MEMBERNAME)});</font></div>
</div></div></blockquote><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif"><div><font class="Apple-style-span" color="#000066" face="tahoma, sans-serif"><br></font></div>but I fee that it is a ugly fix. What if call leg changes from 2 to 3?<br>
</font><div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>That option, when set to yes, causes several variables to be created <i>just</i> prior to the caller being bridged with the queue member... <br>
<br>--<br></div></div>
Sherwood McGowan<br>Telecommunications and VOIP Consultant<br><br>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>