[asterisk-dev] Outgoing call file question

Steve Mathers Steve.Mathers at prosodieCRM.com
Thu Aug 28 10:56:13 CDT 2008


Hey guys,

 

Im new to the mailing list, got a quick question:

 

$file=fopen('/var/lib/asterisk/agi-bin/Transcall.call','a');

fputs($file,'Channel: Zap/g1/'."4036480478\n");

fputs($file,'waittime: 15'."\n");

fputs($file,'Set: CALLERID(number) = '.$ANI."\n");

fputs($file,'Application: AGI'."\n");

fputs($file,'Data: sayTransFile.php'."\n");

fclose($file);

 

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 :

 


Synopsis: 


 Set CallerID Number 


Description: 


 Set(CALLERID(number)=<number>)  (for Asterisk >= v1.2.x) 
 SetCIDNum(<number>[|a])             (for Asterisk <= v1.0.x) 

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>). 

Examples: 

 Set(CALLERID(number)=6135551234)  (for Asterisk >= v1.2.x) 
 SetCIDNum(6135551234)             (for Asterisk <= v1.0.x)

 

 

 

 

I tried using the set command in the callfiles with 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20080828/8e7c5ef7/attachment.htm 


More information about the asterisk-dev mailing list