<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-GB vLink=purple link=blue>
<DIV><SPAN class=849353323-08012005><FONT face=Arial color=#0000ff 
size=2>Bill,</FONT></SPAN></DIV>
<DIV><SPAN class=849353323-08012005><FONT face=Arial color=#0000ff size=2>Are 
you sure there's an AGI enviroment variable that gives me that? I couldn't find 
any:</FONT></SPAN></DIV>
<DIV><SPAN class=849353323-08012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=849353323-08012005><FONT face=Arial color=#0000ff 
size=2>&nbsp;-- accountcode =<BR>&nbsp;-- callerid = "Assaf Benharoosh" 
&lt;21&gt;<BR>&nbsp;-- channel = SIP/26-f39a<BR>&nbsp;-- context = 
extensions<BR>&nbsp;-- dnid = 45<BR>&nbsp;-- enhanced = 0.0<BR>&nbsp;-- 
extension = 45<BR>&nbsp;-- language = en<BR>&nbsp;-- priority = 1<BR>&nbsp;-- 
rdnis = unknown<BR>&nbsp;-- request = agi-test.agi<BR>&nbsp;-- type = 
SIP<BR>&nbsp;-- uniqueid = 1105227054.140</FONT></SPAN></DIV>
<DIV><SPAN class=849353323-08012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=849353323-08012005><FONT face=Arial color=#0000ff size=2>I'm 
trying to get the other side channel string. If I run the AGI before the dial- 
is it all possible?</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN style="FONT-SIZE: 10pt; COLOR: #004080"><FONT 
face=Arial color=#000080>Assaf Benharoosh<BR>MCP, MCSA, MCSE<BR></FONT></SPAN><A 
title=mailto:ab@franticllc.com href="blocked::mailto:ab@franticllc.com"><FONT 
title=mailto:ab@franticllc.com face=Arial color=#000080><SPAN 
title=mailto:ab@franticllc.com 
style="FONT-SIZE: 10pt; COLOR: #004080">ab@franticllc.com</SPAN></FONT></A><BR><FONT 
face=Arial color=#000080><SPAN style="FONT-SIZE: 10pt; COLOR: #004080">Frantic, 
LLC.<BR><?xml:namespace prefix = st1 ns = 
"urn:schemas-microsoft-com:office:smarttags" /><st1:Street 
w:st="on"><st1:address w:st="on">246 West 38th 
Street</st1:address></st1:Street><BR>2nd Floor<BR><st1:place w:st="on"><st1:City 
w:st="on">New York</st1:City>, <st1:State w:st="on">NY</st1:State> 
<st1:PostalCode w:st="on">10018</st1:PostalCode></st1:place><BR>T: (212) 
302-5790<BR>F: (646) 201-9418<BR>C: (516) 805-7981</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> asterisk-users-bounces@lists.digium.com 
[mailto:asterisk-users-bounces@lists.digium.com] <B>On Behalf Of </B>Bill 
Seddon<BR><B>Sent:</B> Saturday, January 08, 2005 4:21 AM<BR><B>To:</B> 
'Asterisk Users Mailing List - Non-Commercial Discussion'<BR><B>Subject:</B> RE: 
[Asterisk-Users] Channel Variable<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&lt;&lt;Does anyone know how to get 
the channel ID on the other side of the call?&gt;&gt;</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Assaf, I don&#8217;t know if 
there is such an ID available.&nbsp; However if there is not, the value you want 
is pushed out in one of the events that Asterisk publishes to AGI connections 
when a call is constructed.&nbsp; As it result it ought to be possible to write 
an AGI script using, say, Perl to capture this value and write it back as a 
Dialplan variable.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Bill 
Seddon</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
face="Times New Roman" size=3><SPAN lang=EN-US style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN lang=EN-US 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
face=Tahoma size=2><SPAN lang=EN-US 
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> 
asterisk-users-bounces@lists.digium.com 
[mailto:asterisk-users-bounces@lists.digium.com] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Assaf Benharoosh<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> January 08, 2005 12:27 AM<BR><B><SPAN 
style="FONT-WEIGHT: bold">To:</SPAN></B> Asterisk Users Mailing List - 
Non-Commercial Discussion<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Asterisk-Users] Channel 
Variable</SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi all,</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Does anyone know how to get the 
channel ID on the other side of the call? </SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">For example: When SIP/50 calls 
SIP/21, and the call is answered by SIP/21 I get:</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">SIP/21-6735 answered 
SIP/50-b456</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">${CHANNEL} will show me SIP/50-b456. 
</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there a parameter or a workaround 
to get the SIP/21-6735 part?</SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks.</SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Assaf 
Benharoosh</SPAN></FONT></P></DIV></BODY></HTML>