Hello,
I have a script that I am trying to make it work. The Add and Delete functions work fine. the Get and Update do not and I cannot seem to figure out why. As well as the logging to /var/log/pdns.log also does not log anything....
The way this works is that from a browser, you call the call.php with a function and string to do.
The call.php includes webservice.inc with the functions.
For example:
http://10.98.4.75/call.php?todo=add&number=+15553331212&sipuri=15553331212@10.98.7.201
This would in fact add the number to the SQL with the content being the sipuri along with other static information.
The entry in the SQL would look like this:
(29, 10, 2.1.2.1.3.3.3.5.5.5.1.e164.siptest.com', 'NAPTR', '100 10 "u" "E2U+sip" "!.*$!sip:15553331212@10.98.7.201!" .', 600, NULL, 1237393300);
I am attaching the 2 files call.php and webservices.inc in the ZIP file.
Let me know if your able to find out why the update and get functions don't work.
1) For the get function, I want to print the number, sipuri and somehow convert the linux time to date and time. If the number does not exist, then print "this number is not in the database".
2) for the update function, I want to be able to update the sipuri based on the number i call from the todo function. Example: http://10.98.4.75/call.php?todo=update&number=+15553331212&sipuri=5553331212@10.98.9.100
If the number is not in the db, again respond with "this number is not in the database".
If it is, then update the sipuri of that record with the one stated in the url and then print out to screen the net number and sipuri.
Later on, I would like to have a webpage that would enable me to do this from a gui, and not by URL.
Thanks for any help you can provide me.