I have question about your script attached to this post to send sms.
I am testing your script now and it is working fine by send SMS still issue on send USSD but I wait until new release, can I get result from $agi call or do I need to create new function to read from log file from GSM gateway?
[align=center]when sending USSD request from script can we have result back on same execution or i have to create function to read from log file from [/align][align=center]GSM gateway?[/align]
[align=left]
[/align]
[align=left][align=center]Thank you in advance[/align][/align]
I think you can create a function, which is able to detect your Action ID over AMI.
As the doc said, you can set up your Action ID when sending USSD command.
For example:
//////////////////////////////////////////////////////////////////////////////////////////////
Action: Command
Action: 2013
Command: gsm send ussd <span> <message> [timeout]
/////////////////////////////////////////////////////////////////////////////////////////////
After sending this USSD code out, the system will send back a result to the AMI client. You can make your function detected the same ActionID of your USSD sending command. in this example, if you get 2013 from the result, which means that you get the result.
The attachment is a newer API doc for the GSM Gateway.
Actually, when you download a new phpagi package, upload it to /var/lib/asterisk/agi-bin, then pay attention to the function exec_goto if your php version is higher than 5.3. That's it.