<!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.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff size=2>Hi 
Angel, </FONT></SPAN></DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff size=2>I 
assume you mean CALLERIDNUM (the number part of caller ID), </FONT></SPAN></DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff size=2>The 
easiest thing in that case is to pass it as a parameter to your AGI script 
</FONT></SPAN></DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff size=2>&nbsp; 
extex =&gt; 500,1,AGI(myscript.py|${CALLERIDNUM})</FONT></SPAN></DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff size=2>in 
your script you just used the argument passed as usual ( I am not a perl expert, 
so not sure on the syntax there )</FONT></SPAN></DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff size=2>Hope 
this helps.</FONT></SPAN></DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=656182922-10062004><FONT face=Arial color=#0000ff 
size=2>Umar.</FONT></SPAN></DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> 
  asterisk-users-admin@lists.digium.com 
  [mailto:asterisk-users-admin@lists.digium.com]<B>On Behalf Of </B>Angel 
  Diaz<BR><B>Sent:</B> 10 June 2004 22:41<BR><B>To:</B> 
  asterisk-users@lists.digium.com<BR><B>Subject:</B> [Asterisk-Users] How to get 
  the Called id with AGI<BR><BR></FONT></DIV>
  <DIV>Hi all,</DIV>
  <DIV>&nbsp;&nbsp;&nbsp; Is there a way to get the "called id" (the B number) 
  with AGI perl ?</DIV>
  <DIV>I know how to get the caller id which is working fine and is just 
  below:</DIV>
  <DIV><FONT size=2>
  <P>#!/usr/bin/perl</P>
  <P>use Asterisk::AGI;</P>
  <P>$AGI = new Asterisk::AGI;</P>
  <P>my %input = $AGI-&gt;ReadParse();</P>
  <P>$callerid = $input{'callerid'};</P>
  <P>$AGI-&gt;say_digits($callerid);</P>
  <P>}</P>
  <P>Thanks in advance,</P>
  <P>Angel.</P></FONT></DIV>
  <P>
  <HR SIZE=1>
  <FONT face=arial size=-1>Do you Yahoo!?<BR>Friends. Fun. <A 
  href="http://messenger.yahoo.com/">Try the all-new Yahoo! 
Messenger</A></FONT></BLOCKQUOTE></BODY></HTML>