Sending and receiving SMS messages using VoIP gateways OpenVox

Without exaggeration, we can say that the most popular question about GSM VoIP gateways concerns sending and receiving SMS messages. We have previously raised this topic and considered gateways of manufacturers such as GoIP and Yeastar. But then the OpenVox GSM gateways did not get into our review and now is the time to correct this omission.













As a rule, all manufacturers try to provide several different ways to work with SMS and OpenVox is no exception. Consider each of them:







WEB



The most standard, logical and most uncomfortable of the options. More suitable for performance testing or a one-time action than for permanent use.











It is easy to use, we indicate through which ports to send, list of recipients and the text of the message.







The WEB interface also provides the ability to view incoming and outgoing messages, you only need to pre-enable the ability to receive and store messages locally.







Email



SMS to Email can also be attributed to the standard features of such devices.











GSM OpenVox VS Series Gateways are no exception. Specify the necessary data to connect to SMTP, email addresses to which to send incoming SMS, and set up a template for sending emails. In this case, we have 4 variables available in the template: the sender's number, the port number of the SIM card, the time of receipt and the actual text of the incoming message itself.







Most often, manufacturers provide the opposite possibility - Email to SMS: we send an email to some address that periodically checks the gateway and generates SMS messages from incoming emails, but OpenVox decided not to implement such an option.







HTTP



Sending and receiving SMS messages via HTTP requests is probably one of the easiest ways to integrate these actions into the work of third-party applications.











To send SMS, we need to perform a request of the form:







http://172.16.99.1/sendsms?username=smsuser&password=password&phonenumber=89996135801&message=Hello









  { "message":"Hello", "report":[{ "1":[{ "port":"umts-1.1", "phonenumber":"89996135801", "time":"1970-01-01 09:49:03", "result":"success" }] }] }
      
      





Conveniently, as a result of the request, we can get a report on the dispatch. Such an implementation may be more convenient than a separate check for execution, as is done in Yeastar gateways.







Briefly about the parameters:







 username –  ,      password –    phonenumber –  ,      Β«,Β» message –    port –     ,           report –      JSON  String timeout –      SMS
      
      





In addition to sending, OpenVox gateways allow you to receive SMS messages over HTTP.











Everything is very simple: we specify the address of our handler, the path and the names of the parameters. When incoming messages arrive, the gateway will fulfill the request we have configured.







AMI



Since GSM and UMTS OpenVox gateways, like Yeastar's GSM gateways , are built using the Asterisk IP telephony server, of course, the Asterisk Managment Interface is implemented in them, which can also be used to send SMS messages. Especially for this, the following command is provided:







GSM send sms <span> <destination> <message> <timeout>









Briefly about the parameters:







 span –      destination –   message –   timeout –      /*   USSD    sms  ussd */
      
      





Work through AMI with examples was described last time , so it makes no sense to dwell on it in more detail. Let me just note that the implementation of OpenVox does not generate a special separate event when receiving SMS, as in Yeastar - we will need to monitor events like VarSet, of this type:







 Event: VarSet Privilege: dialplan,all Channel: EXTRA-SMS/1-1 Variable: SMSPDU Value: β€œpdu data” Uniqueid: 625.1
      
      





And one more spoon of tar: if we want to receive messages through AMI, then we will have to stop using HTTP to SMS, because if this option is enabled, then we will not see events on the arrival of SMS.







As a conclusion



You can work with any device on the market, but if I had the task to send and receive SMS, I would prefer OpenVox gateways as the most convenient for performing such tasks.








All Articles