<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h1
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:24.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hey guys,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Im new to the mailing list, got a quick question:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>$file=fopen('/var/lib/asterisk/agi-bin/Transcall.call','a');<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>fputs($file,'Channel: Zap/g1/'."4036480478\n");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>fputs($file,'waittime: 15'."\n");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>fputs($file,'Set: CALLERID(number) = '.$ANI."\n");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>fputs($file,'Application: AGI'."\n");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>fputs($file,'Data: sayTransFile.php'."\n");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>fclose($file);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Im using phpagi for all my apps in asterisk. To make out
going calls I like to use the callfiles. Here im creating a call file that runs
a php script. Problem is I want to pass the receiving application a different
ANI then the number im phone from. Reason being is I want to be able to pass
application info threw the ANI (like the record number). Ive searched the
internet and found that u can change ANI using the set command like this :<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<h1><b><font size=6 face=Arial><span style='font-size:24.0pt;font-family:Arial'>Synopsis:
<o:p></o:p></span></font></b></h1>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> Set CallerID Number <o:p></o:p></span></font></p>
<h1><b><font size=6 face=Arial><span style='font-size:24.0pt;font-family:Arial'>Description:
<o:p></o:p></span></font></b></h1>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'> Set(CALLERID(number)=<number>) (for Asterisk >= v1.2.x)
<br>
SetCIDNum(<number>[|a]) (for Asterisk <= v1.0.x)
<br>
<br>
Set Caller*ID Number on a call to a new value, while preserving the original
Caller*ID name. This is useful for providing additional information to the called
party. Sets ANI as well if "a" flag is used. In order to set ANI with
Asterisk >= v.1.2.x you will have to use Set(CALLERID(ANI)=<number>). <br>
<br>
Examples: <br>
<br>
Set(CALLERID(number)=6135551234) (for Asterisk >= v1.2.x)
<br>
SetCIDNum(6135551234) (for Asterisk <= v1.0.x)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>I tried using the set command in the callfiles with </span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>CALLERID(number)
= '.$ANI and also CALLERID(ANI) = '.$ANI. They both don’t work. Ive had
much success with this method in my VOS platforms, so I hope I can do it threw
asterisk. Im fairly new to asterisk, bout 6 months into it. Mainly use it for
lumenvox – speech reco. Thx for your time<o:p></o:p></span></font></p>
</div>
</body>
</html>