<br><br><div class="gmail_quote">On Sat, Apr 23, 2011 at 11:20 AM, Tiago Geada <span dir="ltr"><<a href="mailto:tiago.geada@gmail.com">tiago.geada@gmail.com</a>></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 "Local/210332450@ZonNew-Outbound" I Set(bla='blabla');</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> <br>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....<br>
<br>Now, if the callfile doesn't send a channel "through" the context that you're trying to set blah, that'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's a nifty configuration option:<br>
<br><i>setinterfacevar=no ; (the default is no)</i><br><br>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>