Ozeki 10 SMS Gateway
Autoreply Easy Autoreply Easy | SMS from Excel SMS from Excel

Automatic SMS replies by script

The guide on this page is going to give you a brief introduction to how easy you can create an autoreply service that uses a script to answer by a defined action to the received messages. This service is capable of just reply with a predefined message, but you can write a script to forward the incoming messages to a specific phone number or do actions in case the sender phone number or the message itself matches with your predefined details. So, let's start it right now.

Step 1 - Create an Autoreply connection

The first thing that you need to do in this guide, is to create the autoreply service connection in the SMS Gateway. So for that, first, click on the Apps icon on the toolbar in the main menu. Here you can see all the available connections, that you can create in the SMS Gateway. Now, but need to scroll down to the 'Incoming SMS message processing and autoresponding services' section, and here, like in Figure 1, click on the Install button of the Autoreply connection.

create an autoreply connection
Figure 1 - Create an Autoreply connection

Step 2 - Configure the Autoreply connection

In the configuration menu of the Autoreply connection, you need to specify a name for the connection in the first step. Then, you select the way, that the connection uses the script to handle the incoming messages. As you can see it in Figure 2, you can set the path for a script file, that the connection can use, or you can just type the script in the textbox below.

configure the autoreply connection
Figure 2 - Configure the Autoreply connection

Step 3 - Select an example script

The easiest way to create this autoreply service is to just select one from the available four example scripts from the textbox. Right now they can't be executed since all lines commented out by an '#' sign. The first example script sends a 'Thank you' message back to the sender.

The second example script is capable of forwarding all the incoming messages to the defined phone number. The second line of the script shows how you can do that by first, defining the phone number, and then, MSG variable stores the incoming message which is in this case will be sent to that phone number.

The next example script activates only when the message comes from a specified phone number. This phone number can be defined in the first line of the script. Then, the script forwards the message to the phone number that is defined in the second line. The MSG variable stores the message.

The last example shows how you can do an action in case the message starts with a specific word. This example forwards the message to two other phone numbers defined in the second and third row. But it happens only in case when the message starts with the word 'important'. The word can be defined as the first row of the script demonstrates it.

To follow this guide, just select the script that will forward the message to the defined phone number. Figure 3 demonstrates, how you need to write the script into the textbox to be able to operate with that script in case of an incoming message.

write a script for the autoreply
Figure 3 - Write a script for the Autoreply service

Step 4 - Advanced configuration of Autoreply connection

The Autoreply connection can be further configured by setting a default sender address. This address will show up at the recipient side who receives the reply message. As you can see it in Figure 4, you can type here a phone number or an e-mail address which helps to identify the autoreply easy connection. If you finished the configuration, just click on OK.

advanced configuration autoreply connection
Figure 4 - Advanced configuration of the Autoreply connection

Step 5 - Enable the Autoreply connection

After you created the Autoreply connection, the next window is the main menu of the autoreply service. Here, you can modify the details of the connection anytime you want. To activate the service, you need to enable the connection here. For that, just click on the toggle as Figure 5 shows. The toggle is green now that indicates that the autoreply service is now active.

enable the autoreply connection
Figure 5 - Enabling the Autoreply connection

Step 6 - Connect to the mobile network

By this point, you created and enabled your autoreply service, but to receive messages, you also need a connection that can connect to the mobile network and forward messages to your Ozeki system. To do that, click on Connect on the toolbar, and select the SMPP client as you can see it in Figure 6.

create an smpp connection
Figure 6 - Create an SMPP client connection

In the configuration menu, you have to provide some details about the server. This is the server, that this SMPP client is going to use to handle SMS messages. So here, you need to type the host, port, and user account details. Then, you need to specify a telephone number for this connection (Figure 6). With this number, the connection can be identified, and able to send or receive messages. Lastly, you just need to click on OK to create the SMPP client connection.

configure an smpp connection
Figure 7 - Configure an SMPP client connection

Step 7 - Wait for the messages

After setting up and enabling the autoreply service, now it is ready for the incoming messages. You can check that easily in the main menu of the SMS Gateway. Figure 8 shows that the creation of the autoreply service established a routing rule as well. This rule routes all the incoming messages to the autoreply connection and it will just do its job and forward the messages to the dedicated phone number.

routing incoming messages to the autoreply service
Figure 8 - Route incoming messages to the Autoreply connection

Figure 9 demonstrates how simple an autoreply service works. All you need to do here is to wait for a message forwarded to the telephone number, that you gave for the SMPP client connection. As soon as the client received the message, it forwards it straight to the autoreply service.

send sms to an ozeki connection
Figure 9 - Incoming messages routed to the autoreply service

When the Autoreply service receives the message, the script, that you wrote for the service will be executed. In this case, it will forwards the incoming message to the specified phone number as Figure 10 shows that.

autoreply service sends the reply message
Figure 10 - The autoreply service forwards the message

 
Copyright © 2000- - Ozeki Ltd | info@ozeki.hu
Home > User guide > Autoreply SMS > Autoreply by Script
Legal | Privacy | Terms of use | 5747
3.230.119.106 | 92.118.27.157 | Login