...
Note |
---|
Requirements:
* Before try trying to send from the dialplan be sure that the SMS from Dialplan, make sure SMS can be sent from WEB Collaboration |
...
The timeout for mass sending is 5 sec for each SMS / gateway.
The POST/GET required parameters are:
- message: the body SMS messages, length of no more than 300 characters
- number: the phone number or several numbers separated by a comma. Example: +391234567890 or +391234567890,+391234567891,+391234567892,...
The POST/GET optional parameters are
- postpone: date of postponed message delivery. Example: 14/07/2014 15:35
- gsm: GSM gateway MAC address. Example: 9c7514330001
...
Code Block |
---|
curl -k -X POST -u 101:sms101api --url "https://127.0.0.1/api/v1/originate/sms" --data-urlencode "number=+39123456789" --data-urlencode "message=This API is awesome, now I can add the sms support to my software" --data-urlencode "gsm=9c7514330001" |
Example of Dialplan configurationTo send SMS from Dialplan, apply the following configuration:
- Set -> CURLOPT(userpwd) -> 101:sms101api (admin user credentials) - allows sending API request. You can use credentials of any user with admin rights
- Custom application -> Set(message=${CURL(http://127.0.0.1/api/v1/originate/sms, message=the message body&number=%2B39333123456)}); - SMS API is applied.
Note |
---|
Note: "%2B" added to the mobile number is "+" character with URL encoding transformation. The full reference is available on the w3school web site. |
Note |
---|
Note: the same way you can send SMS using http SMS server. For this purpose, another PBX with a configured GSM trunk can be used. How to configure:
|
Html |
---|
<div class="fb-like" data-href="https://confluence.wildix.com/x/WAY8AQ" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div> |
...