hi,
Actually i’m trying to connect to remote database from my asterisk. inside the script i’m trying to connect but some problem is there…
here is my script:::
$db = ‘chaitu’;
$dbuser = ‘chaitu’;
$dbpass = ‘magindia123’;
$dbhost = ‘192.168.21.33’;
mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($db); //or die(“could not open database”);
$result=mysql_query(“select forward1 from service where id=’%$no%’”);
in CLI:::
– Launched AGI Script /phpagi-2.14/total.php
[Apr 15 00:20:02] NOTICE[22742]: chan_sip.c:15696 handle_request_subscribe: Received SIP subscribe for peer without mailbox: pra
– AGI Script Executing Application: (Dial) Options: (SIP/)
[Apr 15 00:20:03] WARNING[22765]: res_config_mysql.c:144 realtime_mysql: MySQL RealTime: Failed to query database. Check debug for more info.
[Apr 15 00:20:03] WARNING[22765]: res_config_mysql.c:144 realtime_mysql: MySQL RealTime: Failed to query database. Check debug for more info.
[Apr 15 00:20:03] WARNING[22765]: chan_sip.c:2984 create_addr: No such host:
please hep me…any solution???