[Asterisk-Users] I'm stumped

Henry Devito hdevito at qwest.net
Sun Dec 12 13:33:22 MST 2004


I am trying to use the simple CID name management script on the wiki.
http://www.voip-info.org/wiki-Asterisk+tips+managing+CID+names   I can not
see what is wrong.  The values never get entered in the database.  Here are
the files:  I have asterisk running as the user asterisk also.

---cid-store.php----

<HTML>
<HEAD>
<TITLE>Storing Asterisk CID data</TITLE>
</HEAD>
<BODY>
<h1>Asterisk phone book</h1>
<?php
set_time_limit(5);
if ($PhoneNumber <> "" && $PhoneName <> "") {
       system("sudo -u asterisk /usr/sbin/asterisk -rx " .
escapeshellarg("database put cidname $PhoneNumber \"$PhoneName\"") . " &>
/tmp/error");
      print "Successfully stored <b>$PhoneNumber</b> as <b>$PhoneName</b>.";
} else {
       print "Please enter both phone number and name!";
}
?>
</BODY>
</HTML>

-----My sudoers files-----
asterisk  ALL=(ALL) NOPASSWD: /usr/sbin/asterisk








More information about the asterisk-users mailing list