Have you tried
phpagi
http://phpagi.sourceforge.net/
Jon Farmer
Telford, Shropshire, UK
----- Original Message ----
From: Michelle Dupuis <support@ocg.ca>
To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com>
Sent: Friday, 26 January, 2007 5:52:27 PM
Subject: [asterisk-users] PHP AGI script callerid question
I am trying to set
callerid from a PHP script, using one of two functions as shown below (setid1
and setid2). The first function works great with regular names and
numbers, BUT, if I call the function with
("Test","UnknownNumber"), the cid
number gets set to "asterisk". Why is my passed number parameter not
being
accepted in this case?
The second function
uses the new/recommended method of setting cid name and number, but it has NO
EFFECT. (i.e. the name and number remain at the asterisk default).
Why is this one not working?
Thanks,
MD
=============================================
// Test #1
function setid1($name,$number) {
$newid
= "\"" . trim( substr( trim( $name ), 0, 15 )
)
. "\"<" .
trim( substr( str_replace( " ", "", $number ), 0, 24 )
)
.">";
obj->set_callerid( $newid );
}
// Test
#2
function
setid1($name,$number) {
$obj->cmd("Set(CALLERID(name)=\"$name\"");
$obj->cmd("Set(CALLERID(num)=\"$number\"");
}
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
___________________________________________________________
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at
the Yahoo! Mail Championships. Plus: play games and win prizes.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20070201/5b551aab/attachment.htm