<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=194283117-26012007>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?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=194283117-26012007>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?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007>MD</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007>==============================================</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=194283117-26012007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=194283117-26012007></SPAN><FONT face=Arial><FONT size=2>/<SPAN
class=194283117-26012007>/ Test #1</SPAN></FONT></FONT><BR><FONT face=Arial
size=2>function setid<SPAN class=194283117-26012007>1</SPAN>(<SPAN
class=194283117-26012007>$name,</SPAN>$number) {</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=194283117-26012007> $newid
= </SPAN> "\"" . trim( substr( trim( $name ), 0, 15 )
)<BR> . "\"<" .
trim( substr( str_replace( " ", "", $number ), 0, 24 )
)<BR>
.">";</FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=194283117-26012007>
obj</SPAN>->set_callerid( <SPAN class=194283117-26012007>$</SPAN><SPAN
class=194283117-26012007>newid </SPAN>);</FONT></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN
class=194283117-26012007>}</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN
class=194283117-26012007></SPAN></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2><SPAN class=194283117-26012007>// Test
#2</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN class=194283117-26012007>function
setid<SPAN class=194283117-26012007>1</SPAN>(<SPAN
class=194283117-26012007>$name,</SPAN>$number) {
<DIV><FONT face=Arial><FONT size=2><SPAN
class=194283117-26012007>
$obj->cmd("Set(CALLERID(name)=\"$name\"");<BR>
$obj->cmd("Set(CALLERID(num)=\"$number\""); </SPAN></FONT></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN
class=194283117-26012007>}</SPAN></FONT></DIV>
<DIV align=left></SPAN></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2><SPAN
class=194283117-26012007></SPAN></FONT> </DIV></DIV></BODY></HTML>