Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Forwarding The system can take incoming SMS and send them further (forward) to the specified phone number or email address. The system can also process incoming SMS as commands.

Incoming SMS control is possible if there is a "gsm" permission in the profile of the user performing the request.

The following values ​​of the querytype field are used for management:

getsmsforward getsmsincoming - get the parameters of the incoming SMS forwardingsettings:

  • k - user session ID.


Code Block
languagexml
titleResponse example on a query getgsm
<smsforward<smsincoming allowed="admin user5 123456789" sms_bot="1" mail_enable="1" mail_allowed_only="1" mail_list="guest foo@company.com" sms_enable="1" sms_allowed_only="1" sms_list="12345678 user40"/>
    <sms_inc_list>
		<sms_inc from="123456789" message="test message 1" date="1483260860"/>
		<sms_inc from="987654321" message="test message 2" date="1483260893"/>
    </sms_inc_list>
</smsforward>smsincoming>

Description of the xml nodes:

...

  • smsincoming - incoming SMS settings;
    • allowed - list of numbers and user names from which incoming SMS are allowed, separator - space (example: +123456789 user100);
    • sms_bot - enable SMS bot to process commands; 
    • mail_enable - enable forwarding to email;
      • mail_allowed_only - SMS forwarding to email only for allowed incoming phone numbers (see GSM Modem Service);
      • mail_list - list of email addresses or user names for SMS forwarding;
    • sms_enable - enable forwarding to phone number by SMS;
      • sms_allowed_only - SMS forwarding to phone only for allowed incoming phone numbers (see GSM Modem Service);
      • sms_list - list of phone numbers or user names for SMS forwarding.
  • sms_inc_list - queue of incoming SMS;
    • sms_inc - incoming SMS in the queue:
      • from - phone number from incoming SMS;
      • message - SMS text;
      • date - the time when added to the queue in UTS.


setsmsforward etsmsincoming - set the incoming SMS forwardingparameters, additional fields are:

  • k - user session ID;
  • allowed - list of numbers and user names from which incoming SMS are allowed, separator - space (example: +123456789 user100);
  • sms_bot - enable SMS bot to process commands (0 - disable, 1 - enable);
  • mail_enable - enable forwarding to email (0 - disable, 1 - enable);
    • mail_allowed_only - SMS forwarding to email only for allowed incoming phone numbers (0 - all incoming SMS, 1 - for allowed phone numbers only);
    • mail_list - list of email addresses or user names for SMS forwarding, separator - space (example: foo@company.com user44);
  • sms_enable - enable forwarding to phone number by SMS (0 - disable, 1 - enable);
    • sms_allowed_only - SMS forwarding to phone only for allowed incoming phone numbers (0 - all incoming SMS, 1 - for allowed phone numbers only);
    • sms_list - list of phone numbers or user names for SMS forwarding, separator - space (example: +123456789 user44).