[Asterisk-Users] can't get the full callerid php/agi
Sathya
sathyaw at sbcglobal.net
Sat Mar 20 15:47:00 MST 2004
Hi folks,
I need some help from php/agi experts out there;
I am having difficulties in extracting the callerid number from php. My
script is given below;
#!/usr/local/bin/php -q
<?php
//environment dump
ob_implicit_flush(true);
set_time_limit(0);
$err=fopen("php://stderr","w");
$in = fopen("php://stdin","r");
while (!feof($in)) {
$temp = str_replace("\n","",fgets($in,4096));
echo "VERBOSE \"$temp\"\n";
if (($temp == "") || ($temp == "\n")) {
break;
}
}
?>
And the Response is:
getenv.agi: agi_request: getenv.agi
getenv.agi: agi_channel: SIP/-081524c0
getenv.agi: agi_language: en
getenv.agi: agi_type: SIP
getenv.agi: agi_uniqueid: 1079819757.97
getenv.agi: agi_callerid: Sathya <=====================
getenv.agi: agi_dnid: unknown
getenv.agi: agi_rdnis: unknown
getenv.agi: agi_context: default-in
getenv.agi: agi_extension: 91234
getenv.agi: agi_priority: 1
getenv.agi: agi_enhanced: 0.0
getenv.agi: agi_accountcode:
Actual caller ID is ; "Sathya Weerasooriya"<1001>, but what I get from this
PHP is only first part.
When I run the example test script in agi-bin directory, I get the correct
callerid.
I am using PHP 4.3.5CR xx.
Any help is appreciated.
Sathya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040320/e5533842/attachment.htm
More information about the asterisk-users
mailing list