Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

The GSM service is designed to control the monitoring system via SMS, to organize SMS dispatches and to send SMS notifications when logic schemes are activated.

GSM 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:

getgsm - get the parameters of the GSM modem:

  • k - user session ID.


Response example on a query getelement for GSM modem element
<gsm pin="1111" creg="1" csq="12" cops="Aqua3" allowed="+65214567788 +32154897744" smsc="59537322611" >
	<sms_list>
		<sms id="2545109407" to="+65214567788" text="test message 1" status="failed" date="1563176384" />
		<sms id="3784153937" to="+98521141100" text="test message A" status="pending" date="1563176803" />
		<sms id="1598774555" to="+98521563322" text="test message 3" status="sent" date="1563177201" />
	</sms_list>
</gsm>

Description of the xml nodes:

  • gsm - SGM modem settings and status;
    • pinSIM's PIN code;
    • allowed - list of numbers from which SMS commands are allowed, separator - space (example: +72224443434, +72224443435);
    • smsc - the number of the SMS center, this field is empty if the number is determined automatically;
    • creg - network registration status code:
      • 0 - not registered, modem is not currently searching a new operator to register to;

      • 1 - registered, home network;
      • 2 - not registered, but modem is currently searching a new operator to register to;
      • 3 - registration denied;
      • 4 - unknown;
      • 5 - registered, roaming.
    • csq - signal strength in the network:
      • 0 – -113 dBm or less;

      • 1 – -111 dBm;
      • 2...30 – -109... -53 dBm;
      • 31 – -51 dBm or greater;
      • 99 – not known or not detectable;
      • 100 – -116 dBm or less;
      • 101 – -115 dBm;
      • 102...191 – -114... -26dBm.
    • cops - current operator name.
  • sms_list - queue of sent SMS;
    • sms - SMS in the queue:
      • id - identifier of SMS in the queue;
      • status - SMS status:
        • pending - added to the queue, waiting for sending;
        • failed - could not be sent;
        • send - sent.
      • to - phone number of the SMS's recipient;
      • text - SMS text;
      • date - the time when added to the queue in UTS.


setgsm - set GSM modem parameters, additional fields are:

  • k - user session ID;
  • pin - SIM's PIN code;
  • smsc - the number of the SMS center, leave this field blank for automatic determination;

  • allowed - list of numbers from which SMS commands are allowed, separator - space (example: +72224443434, +72224443435);


send_sms_message - send SMS via GSM modem, message add to SMS queue, parameters:

  • k - user session ID;
  • to_phone - the phone number of the recipient;
  • message - SMS text.


clearsms - clear the SMS queue, parameters:

  • k - user session ID.


sendussd - send USSD request for check the balance state, not supported in LTE mode, parameters:

  • k - user session ID;
  • to_phone - the balance service number.
Answer
<ussd text="Account balance 55.6$. Some kind of advertisement here" />
<ussd text="Error parsing ussd answer" />
<ussd text="Request not supported in LTE mode" />
  • No labels