Hi .
i want to send ussd from AGi on windows with wampserver.
firstly i downloaded PHP-agi , then i changed exec_goto to exec_goto_new.
afther that, i created user and IP in asterisk API.
then i used this code to connect
include("phpagi-asmanager.php");
$agi=new AGI_AsteriskManager;
$vst_host='192.168.1.118';
$vst_user='admin'; #Corresponding to your GSM gateway API settings
$vst_pwd='admin'; #Corresponding to your GSM gateway API settings
$vst_port=5038; #Corresponding to your GSM gateway API settings
$agi_status=$agi->connect($vst_host.":".$vst_port,$vst_user,$vst_pwd);
if($agi_status)
{
echo $msg="Connection is OK";
exit(0);
}
else {
echo "connection failed";
}
the result of code is "connection is OK" , this show that i connected to asterisk.
after that i used $agi->Command("gsm send ussd 1 *444# ");
but this code can not return the result. the ussd code can show the result in Asterisk_CLI
please help me
thanks
Why not use our web gui to send ussd code?
[attach]325[/attach]
Your code is only for sending USSD, and you did nothing to handle the feedback of USSD code, how could it be possible to show you the result on your php code? If you need to return the result on your php, you need to monitor the related EVENTs through AMI connection. About howto, pls google AMI interface.
Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Skype: tim.jjune
This is Rick,please refer to below code test it,if still have some issues,please contact me directly,my contact info be shown as bwlow:
Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Skype: rick.zhu3
$vst_host='172.16.8.46';
$vst_user='admin'; #Corresponding to your GSM gateway API settings
$vst_pwd='admin'; #Corresponding to your GSM gateway API settings
$vst_port=5038; #Corresponding to your GSM gateway API settings