[prev in list] [next in list] [prev in thread] [next in thread]
List: asterisk-dev
Subject: [asterisk-dev] Outgoing call file question
From: "Steve Mathers" <Steve.Mathers () prosodieCRM ! com>
Date: 2008-08-28 15:56:13
Message-ID: E7B7EBF406B2BE4781BCDADC300FB21C01EDDC02 () exchsrv ! civds ! local
[Download RAW message or body]
--===============1249978886375294300==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C90926.99792EDB"
This is a multi-part message in MIME format.
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
[Attachment #3 (text/html)]
<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>
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
--===============1249978886375294300==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic