im using a PHP script found in voip-info.org , its suppose to get the Asterisk environment input thrown to AGI when its loaded, at first i had my sip.conf’s callerid to ‘testing’ <>, the script reads the name as ‘testing’ and [color=red]null[/color] for the number (since i didnt put any), the problem is when i place a callerid number the name doesnt show up, what is left is the callerid number, ive been googling for quite awhile but still no luck, anyone?
$temp = fgets($stdin);
$temp = str_replace("\n","",$temp);
$s = explode(":",$temp);
$agivar[$s] = trim($s);
if (($temp == "") || ($temp == "\n")) break; }[/code]