Manually sending individual or bulk SMS messages: Perbedaan revisi

(Marked this version for translation)
 
(2 revisi antara oleh 2 pengguna tidak ditampilkan)
Baris 1: Baris 1:
=Sending SMS messages=
+
<languages/>
 +
<translate>
 +
=Sending SMS messages= <!--T:1-->
 
There are two possible ways to send SMS messages from the server (either to an individual, or to a group of users): using the Web site interface in the Administration section, or using a direct SQL connection to the database.
 
There are two possible ways to send SMS messages from the server (either to an individual, or to a group of users): using the Web site interface in the Administration section, or using a direct SQL connection to the database.
  
==Web site interface==
+
==Web site interface== <!--T:2-->
 
* Log in to iSIKHNAS as an administrative user
 
* Log in to iSIKHNAS as an administrative user
 
* Go to Administration | SMS metadata | Send SMS Message(s)
 
* Go to Administration | SMS metadata | Send SMS Message(s)
 +
* For a single message
 +
** fill in the destination phone number
 +
** fill in the message text
 +
** click send
 +
* For bulk SMS messages
 +
** click 'Multiple options'
 +
** Enter the area(s) to be sent to
 +
** Select the user type(s) to be sent to
 +
** Click to update the list
 +
** Select or unselect any individuals on the list
 +
** Enter the message to send
 +
** Click send
  
==Manual sending via direct database insert==
+
==Manual sending via direct database insert== <!--T:3-->
 
Administrators with appropriate database privileges can send messages by directly inserting them into the SMS outbox table on the database, using a message id of '0'. The table is checked periodically for any messages with an ID of zero, which are then automatically sent.  
 
Administrators with appropriate database privileges can send messages by directly inserting them into the SMS outbox table on the database, using a message id of '0'. The table is checked periodically for any messages with an ID of zero, which are then automatically sent.  
  
 +
<!--T:4-->
 
To insert messages into the table, use the following generic SQL structure:
 
To insert messages into the table, use the following generic SQL structure:
  
  insert into outbox (phone, message, msgid, createdby)
+
  <!--T:5-->
 +
insert into outbox (phone, message, msgid, createdby)
 
  select  
 
  select  
 
     phone,  
 
     phone,  
Baris 24: Baris 40:
 
  -- and groupid = 4 -- filter for a specific user group
 
  -- and groupid = 4 -- filter for a specific user group
  
Be very careful of this approach as poorly formed SQL can accidentally generate very large numbers of messages.
+
<!--T:6-->
 +
'''Be very careful of this approach as poorly formed SQL can accidentally generate very large numbers of messages.'''
 +
</translate>

Revisi terkini pada 1 September 2014 17.58

Bahasa lain:
English • ‎Bahasa Indonesia

Sending SMS messages

There are two possible ways to send SMS messages from the server (either to an individual, or to a group of users): using the Web site interface in the Administration section, or using a direct SQL connection to the database.

Web site interface

  • Log in to iSIKHNAS as an administrative user
  • Go to Administration | SMS metadata | Send SMS Message(s)
  • For a single message
    • fill in the destination phone number
    • fill in the message text
    • click send
  • For bulk SMS messages
    • click 'Multiple options'
    • Enter the area(s) to be sent to
    • Select the user type(s) to be sent to
    • Click to update the list
    • Select or unselect any individuals on the list
    • Enter the message to send
    • Click send

Manual sending via direct database insert

Administrators with appropriate database privileges can send messages by directly inserting them into the SMS outbox table on the database, using a message id of '0'. The table is checked periodically for any messages with an ID of zero, which are then automatically sent.

To insert messages into the table, use the following generic SQL structure:

insert into outbox (phone, message, msgid, createdby)
select 
   phone, 
   'Message to send', 
   0, 
   2  -- id of the current user (person creating the messages)
from users u
where not u.del
and phone is not null
and left(phone,2) = '62' -- only numbers in Indonesia
-- add any other filters here. For example
-- and groupid = 4 -- filter for a specific user group

Be very careful of this approach as poorly formed SQL can accidentally generate very large numbers of messages.