Unable to load remote content privately. Load Content¶
2 Alibaba com/ Trade Assurance¶
Trade Assurance Protects your Alibaba.com orders [Notification] Payment for your Trade Assurance order 123722243501023611 has been received
Dear Brad Isenbek: The supplier Yan Yan has received your full payment.
View Order Details¶
| Product Name | Quantity | Unit Price | Total |
|---|---|---|---|
| 8 port 4 g modem for bulk sms . 8 port sms modem 4 g Ite sim card, bulk sms modem 4 g Ite | 1 | USD 595 | USD 595.00 |
Total Order Amount:USD 595.00
Read our Privacy Policy and Terms of Use Alibaba.com Singapore E-Commerce Private Limited 8 Shenzhen Wity, #45-01 AXA Tower, Singapore 068811 Tel: (+852) 2215-5100 Carrier violations: What to avoid during SMS text marketing - DailyStory
Carrier violations: What to avoid during SMS text marketing - DailyStory¶
Caren Roblin¶
Text messaging, also known as SMS marketing, is a powerful tool that enables you to contact people directly. But carrier violations may be preventing your texts from being delivered.
According to Smart Insights, 97 percent of text messages are read within 15 minutes of delivery, and 45 percent of text message marketing campaigns "generate a successful ROI (return on investment)."
In fact, 54 percent of consumers have said they would like to receive promotions via text messages.
However, your SMS marketing success can suffer from simple mistakes that will get your message blocked by phone carriers.
Why would a text message not be delivered?¶
A text message may not be delivered because the recipient has opted out. This occurs because they believe your message was a spam text or no longer want to receive your messages have replied STOP. But, the most common reason a text message is not delivered is because of a carrier violation.
What is a carrier violation?¶
A carrier violation occurs when carriers (such as Verizon, AT\&T and such) receive an outbound SMS and opt to not deliver the message to the destination phone number. In other words, carriers monitor and filter SMS traffic, and if your message triggers a perceived violation from the carrier's perspective, your text will not be delivered.
The monitoring is through adaptive (machine learning) software systems that take into account the rate of sending and the content of the messages. Think of the spam filtering you've seen in email accounts, except that instead of being delivered to a spam folder, the message is not delivered at all. According to Betwext, messages receive a "cumulative score based on how many messages have come from a phone number during a time period, how many similar messages have transited the carrier's network, or if the message contains content that makes it a high match for spam. Time periods are measured by the second, minute, hour and day."
When your text messages are flagged, it becomes very likely that future messages from the same number (or those with similar content) will be filtered out as well.
While carriers do not share their exact and unique triggers for a violation (so that spammers can't game the system), here are tips to avoid carrier violations during your text message marketing.
Warm up your sending reputation¶
Similar to warming up your email sending reputation, you should warm up your text message sending number(s).
Sending from a new number can cause recipients to opt-out, which may cause your message to get flagged as a carrier violation.
When carriers see your text messages for the first time, it's best to keep your messages simple and concise. Most importantly, don't use links or any sales language.
Consider your sending number¶
First, it's important to understand that in SMS text messaging, there are short codes and long codes.
A short code is a 5- to 6-digit number used to send SMS or MMS messages. For example, a spa health club can ask customers to text RELAX to Carrier violations: What to avoid during SMS text marketing - DailyStory 35353 to join its loyalty program.
A long code is a standard, 10-digit number that also can be used to send SMS or MMS messages.
One of the differences between the two is that short codes allow you to send thousands of messages at once, making them ideal for mass texting, while long codes can only send one message per second. A common practice is to register multiple long codes to share the load because short codes can be more costly and frankly more impersonal.
Find out more about the pros and cons of using either short or long codes.
Text frequency counts¶
Be aware of your texting volume and frequency. Sending too many messages from a single number during a certain time period could cause that number to be blacklisted.
The CTIA, which represents the U.S. wireless communications industry, advises that each long code phone number should stay under 15 to 60 messages per minute and under 200 unique recipients a day. (See more best practices from the CTIA.)
Using multiple numbers and/or building in a "cool down" period where sending is paused for a day or two can both help prevent carrier violations.
Watch your links¶
Links are tricky. You want your lead or customer to easily click on a link as a call to action. However, "http," "http://," "https://," "https," "bit.ly," "goo.gl," "TinyURL.com," "Ow.ly" and others can trigger some filters.
However, before you avoid links altogether, make sure you're using a messaging service that will alert you for any blocked texts. DailyStory uses Twilio and other SMS providers to deploy and report on text messages.
Encourage replies to your text messages¶
Replies, other than those used to opt-out, is a positive signal for your sending reputation.
A good practice is to send messages asking for replies to specific questions.
If you can craft a message that requests a response, such as "Reply YES for more info," these help the carriers identify that your content is expected and welcomed by the recipient.
Don't use flag words and avoid carrier violations¶
Aggressive language, hyperbole (exaggeration), too many CAPITALIZED words and even certain keywords can violate a carrier's rules.
For example, the word "gift" with a $ symbol looks like spam to the content-checking programs carriers use. Repetitive content can appear spammy as well.
Also, consider what sort of content your customers or leads are expecting from you. Did they sign up for more promotions or other types of updates?
In general, consider "warming up" your leads before getting into any sale or promo speak.
A good rule of thumb? Put yourself in your recipient's shoes and write in a way that would be compelling for you. It's about delivering a good user experience always.
Use the DailyStory deliverability score¶
SMS marketing created in DailyStory is automatically scored to help you understand the likelihood that your message will be flagged as a carrier violation.
Consider the length of your text¶
The structure of your text message matters just as much as the content itself.
Most critically, you should keep your text at no more than 160 characters. When a message is longer than 160 characters, you risk the carrier breaking it up into multiple texts. The carrier can then send those in an incorrect order and charge you for multiple messages.
That's a bad experience for both you and the recipient.
Identify yourself¶
This is both a best practice and an expectation of the FTC.
If you don't identify yourself, your text risks looking that much more mysterious and spammy to recipients.
Confirm the source of your leads¶
This might sound obvious, but make sure that the phone numbers you have are opted into hearing from you.
Not only does this help you adhere to FTC guidelines, but consumers can easily report texts as spam. If they don't really know who you even are, the likelihood of being reported as spam is that much higher.
Be upfront about opting out¶
On the flip side, you also should offer clear opt-out instructions. If users do not understand how to unsubscribe, they might automatically contact their carrier to request blocking your messages.
Unfortunately, if your think your sending number has been blacklisted, there's not much you can do to appeal that designation. However, many carriers will automatically remove numbers from their blacklists after a certain period of time. This amount of time has not been made public by any carrier.
To find out more about the laws regarding text messaging (that all businesses should be up to date on), check with the FCC directly.
Remain compliant with applicable laws¶
If you are planning to send a high volume of SMS marketing, it important to familiarize yourself with the laws and guidelines surrounding SMS marketing.
We've put together some guidance for tips to keep your business out of trouble.
EJOIN HTTP API DEVELOPMENT SPEC¶
Version: 2.0.012
DOC NO: XXXXXXXX
| Project Name: Project Code: | | Internal
Confidential |
| :--: | :--: | :--: |
| Doc Name:
Version:
Release | 2.0
012 | Doc No: xxxxxxxx |
| | | File: |
| Prepared by:
Endorsed by: | PengJian | Date: |
| | | Date: |
| Accepted by: | | Date: |
| | Doc. Effective Date:
Date of Expiry: | Date: |
| | | Date: \(\quad N / \Lambda\) |
| Related Document | |
|---|---|
| Doc No. | Description |
| Distribution | |
|---|---|
| Copy No. | Holder |
| 1 | |
| 2 | |
![]() |
|
| # Table of Content |
1 OVERVIEW ..... 4 2 COPYRIGHT NOTICE. ..... 4 3 INTERFACE SECURITY ..... 5 3.1 interactive process ..... 6 3.2 interactive description ..... 7 3.2.1 URL request parameters ..... 7 3.2.2 reply information ..... 8 3.2.3 subsequent URL request parameters ..... 8 3.3 statement of calculation ..... 9 4 STATUS NOTIFICATION ..... 9 4.1.1 URL. ..... 9 4.1.2 Parameter. ..... 10 4.1.3 Dev-status message. ..... 10 4.1.4 Port -status message. ..... 11 5 OPERATE COMMAND SENDING. ..... 12 5.1.1 Command sending URL ..... 12 5.1.2 Parameter. ..... 12 5.1.3 Data ..... 13 6 SMS SENDING ..... 14 6.1 TOPOLOGY ..... 14 6.2 SMS SENDING FLOW CHART. ..... 15 6.2.1 SMS sending ..... 15 6.2.2 Sending status report ..... 15 6.2.3 Sending status query ..... 15 6.2.4 Status query ..... 15 6.2.5 Pause the SMS task ..... 15 6.2.6 Resume the paused SMS task ..... 15 6.2.7 Delete the SMS task ..... 16 6.2.8 Query the SMS task ..... 16 6.3 MESSAGE DESCRIPTION ..... 16 6.3.1 SMS Sending ..... 16 6.3.2 Task send report ..... 16 6.3.3 Task send status query. ..... 21 6.3.4 Pause the SMS task ..... 22 5.3.6 Delete the SMS task ..... 24 5.3.7 Query the SMS task ..... 25 6.4 EXAMPLE. ..... 27 7 SMS FORWARDING ..... 30 7.1 TOPOLOGY ..... 30 7.2 SMS FORWARDING ..... 31 7.2.1 SMS Forward URL ..... 31 7.2.2 Parameter. ..... 31 7.2.3 Data. ..... 31 8 QUERY SMS ..... 32 8.1 QUERY PROCESS ..... 32 8.2 MESSAGE DESCRIPTION ..... 32 8.2.1 URL ..... 32 Document No : xxxxxxx 5/16/2020 Page 3 Version: 2.0
Ejoin HTTP SMS Development Spec.¶
8.2.2 Parameter ..... 33 8.2.3 Data ..... 33 9 QUERY SMS STATISTICS. ..... 34 9.1 MESSAGE DESCRIPTION ..... 34 9.1.1 URL ..... 34 9.1.2 Parameter ..... 34 9.1.3 Response ..... 35 10 QUERY CALL STATISTICS. ..... 36 10.1 MESSAGE DESCRIPTION ..... 36 10.1.1 URL ..... 36 10.1.2 parameter ..... 36 10.1.3 Response ..... 37
1 Overview¶
This document specifies HTTP SMS API of Ejoin device, include SMS receiving, single sending, group-sending and status of Sending task querying.
Based on 'Ejoin SMS sending API', this document extra support Group-Sending and multi task and status report support in one message.
Document No : xxxxxxx \(8 / 6 / 2120\) Page 5 Version: 2.0 This SMS API is still base on HTTP, and add POST request support, it provide multitask and status report by JSON array. About JSON array format, please refer its standardization state.
2 Copyright Notice¶
This document is just for Ejoin R\&D team reference. If in need, it can be offered to a cooperation project developer.
3 Interface Security¶
This section describes a way to ciphertext the body content submitted using HTTP POST, providing some security for the submitted data.
3.1 Interactive process¶
To enable encrypted transmission, a handshake is required to establish a secure session, as shown in Figure 3.1, as described below:
- Setting up a secure session:The client uses heep://host:port/crypt_sess. json to request the device to set up a session;
- Secure session establishment Reply:After authenticating and setting the client, the device replies to the client' s request;
- Common interface request:After the session is successfully established, the client use the ciphertext mode to submit data to the device through HTTP POST;
- Reply on the common interface:After receiving the ciphertext POST, the device uses the negotiated encryption method decrypt POST, processes the data, and replies to the client in plaintext.

Document No : xxxxxxx 8/6/2120 Page 6 Version: 2.0
3.2 Interactive description¶
The establishment of a secure session requires that client interacts with the device through the special URL http://host:port/crypt sess. iso. During the interaction, the two parties need to exchange some information. The information described as follows.
3.2.1 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| username | Device account | None | Y | |
| cnonce | Initial random string | None | Y | A random string provided by The client. See section 3.3 |
| expires | Timeout value | 180 | N | Life cycle of a secure session |
| auth | Customer session ID | None | Y | The ID of the session (client-session-id), on the client. See section 3.3 (part 1) for the calculation method. |
| crypt | Encryption method | None | N | The encryption method used in this secure session. The value is (see section 3.3 For the calculation method Of each encryption method KEY) . |
3.2.2 Response message¶
The reply information is in JSON format. The values are as follows:
| Parameter | Data type | Description | Default | Required | Remark |
|---|---|---|---|---|---|
| code | Int | result code | None | Y | Interface processing result, 0 indicates Success, and non-0 Indicates failure |
| desc | String | Instructions of the result | None | Y | When code is not 0, The Failure cause is Described. |
Document No : xxxxxxx 8/6/2120 Page 7 Version: 2.0 Ejoin HTTP SMS Development Spec.
| Session | String | Device session ID | None | Y | ID of the session on the Device. |
|---|---|---|---|---|---|
| expires | Int | Timeout value | 180s | N | Life cycle of a secure session |
3.2.3 Subsequent URL request parameters¶
Agter an encrypted session in established, the username and password are not required for the URL of the subsequent request, but the following parameters are required:
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| seq | sequence number | None | Y | The sequence number should Be increments in subsequent requests. if the seq of the previous request is 10 , than the seq of the next request must be greater than 10. In principle, it should be 11. |
| auth | Customer session ID | None | Y | note that this field is not the same as the auth field Representing client-session-id |
| session | Session ID | None | Y | When a session is established. The device returns the session id to the client. (server-session-id) |
| expires | Timeout value | 180 | N | Reset the life cycle of a secure session |
3.3 Statement of calculation¶
There are some parameters in a secure session that need to be computed. The fol1lwing describes how there parameters are computed(the following ' + ' represents a connection string)
- Auth(ID of an initial client session)=MDG(username + password + cnonce + url-resourse), url-resource is the rest of the URL excluding http://host:port and parameters. such as http://host:port/goip_get_status. html?url=xxx\&period=0 for this request, url-resource refers to/goip_get_status. html, the rest of the fields are as described in section 3.2;
- Auth(ID of the subsequent URL calculated in real time) = MD5 (username + password + session + seq + url-resourse), url-resource is same as above, session is the server-session-ID returned when the session is established, the rest of the fields are as described in section 3.2;
- Encrypt KEY=MD5(username + password + auth + session + seq), the auth field is the client-session-id calculated during the establishment of the session, that is, the auth calculated in step 1, session is the server-session-ID returned when the session is established, the rest of the fields are as described in section 3.2 ;
4 Status Notification¶
This device will send a HTTP POST request which include the device running status information to the SMS server when it reaches either of below conditions.
- One of device port status changed.
- Community period expired.
4.1.1 URL¶
Server can send a GET request to get the status on device by below URL: http://host:port/goip get status. html?url=xxx&period=0
Device report url: Server send a get request like above to specific the URL.
4.1.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| Url | Specific the report URL | None | N | Tips: Special characters need do URL encode Just need specific sance time. |
| Period | Report period | 60 | N | 70:Report status according to the specified report period, the minimum value is 60 , the unit is second 0 :cancel status report |
| all_sims | Get all the card status | 0 | N | 0: disable 1: enable |
Document No : xxxxxxx 8/6/2120 Page 9 Version: 2.0
4.1.3 Dev-status message¶
Device send ' dev-status' to server periodically. dev-status message (information in HTTP message Body) is a JSON array string that comprised of ports status. Parameter Content-Type in HTTP head should set to "application/json; charset=utf-8" . {"type" : "dev-status" , "seq" : 1, "expires" :180, "mac" : "00-30-f1-01-02-03", "ip" : "192.168.1.67", "max-ports" :32, "max-slots" :4, "status" :[{"port" : "1A", ...}, { "port" : "2B", ...}, ..., { "port" : "32D", ...}]} Components state:
| Parameter | Data type |
Description | Default | Required |
|---|---|---|---|---|
| Type | String | Message type. | None | Y (dev-status) |
| seq | Int | Device status message sequence number, start from 1. | None | Y |
| expires | Int | Dev-status sending period. | 180s | N |
| mac | String | Device MAC. | None | Y |
| ip | String | Device IP address. | None | Y |
| max-ports | Int | Total ports of device. | None | Y |
| max-slots | String | Total SIM slots of device. | 1 | N |
| status | array | Status of device port. | None | Y |
For the description of the port status, see 3.1.4 [Port Status]
4.1.4 Port -status message¶
Any one port status changed, device will send 'port-status' message to server immediately.
Status message (information in HTTP message Body) is a JSON array string that comprised of ports status. Parameter Content-Type in HTTP head should set to "application/json; charset=utf-8" . {"type" : "port-status" , "port" : "2B", "seq" : 1, "status" : "3 OK", "bal" : "100.00", "opr" : "46000 China Mobile", "an": "139xxxxxxxx", "imei": "86xxxxxxxxxxxx", "imsi" : "xxx", "iccid" : "xxx" }
Components state: Ejoin HTTP SMS Development Spec.
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| Type | String | Message type | None | Y (port-status) |
| port | String | Describe the current working port and SIM slot. Like 1.01.1.02.....32.04 |
None | Y |
| seq | Int | The port is incremented from port 1 | ||
| st | string | Port status code + detail 0: No SIM card 1: Exist idel SIM card 2: Registering 3: Registered 4: call connected 5: no balance or alarm 6: Register failed 7: SIM card locked by device 8: SIM card locked by operator 9: Recognize SIM card error 11: Card Detected 12: User locked 13: Port inter-calling 14: Inter-calling holding |
None | Y |
| bal | Floatin g point |
SIM card_balance (yy, mm) | None | Y |
| opr | String | SIM card operator name and ID valid while parameter "st" equal to 3 or 4 | None | N |
| sn | string | SIM number | None | N |
| imsi | string | IMEI of module | None | N |
| imsi | string | IMSI num of SIM card | None | N |
| iecid | string | ICCID num of SIM card | None | N |
5 Operate command sending¶
Device offer API to server to change device status, like change sim card, lock/unlock port, reboot device. About USSD command sending, please refer to "Ejoin HTTP-USSD API (V1. 0). docx" ;
Device will send message to the server by port status notification when lock port or change SIM card. S. 1.1 URL
http://host:port/goip_send_cmd. html¶
host: Device IP address port: Device webpage management port, default value is 80 .
5.1.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| Version | API version | 1.1 | Y | This document describes specification support only |
| username | Device account | None | Y | |
| Password | Device password | None | Y | |
| Op | Operation description | None | N | get:get device configuration set: set device configuration lock: lock port unlock:unlock port switch:switch SIM card reset: reboot module save: save configuration reboot:reboot device |
| par_name ( n ) | Parameter name of the get/set operation | The value of the set operatio n | N | The name of the parameter to be actually operated. If the parameter is an array parameter, you can use parentheses with parameters, and the subscript starts from 0 . Sms_url: destination URL for SMS push |
5.1.3 Data¶
Device support a single command to operate multi-ports and multi-commands to operate different port.
Command sending message (information in HTTP message Body) is a JSON array string that composed by one or more command. Parameter "Content-Type" in HTTP head should set to "application/json; charset=utf-8". {"type":"command", "op":"lock", "ports":"1A, 2B, 3C, 4-32", "ops":[{"op":"lock", "ports":"1A"}, {"op":"switch", "ports":"2B"}]} Components state:
| Parameter | Data Type |
Description | Default | Required |
|---|---|---|---|---|
| type | string | Message type | None | Y (command) |
| op | string | operation type lock: lock port unlock: unlock port switch: switch SIM card reset: reboot module save: save configuration reboot: reboot device multiple: multiple command |
None | Y |
| ports | string | the port NO. need to operate. all, *: all ports It is valid while op parameter equal to lock/unlock/switch/reset When op=lock |
unlock, if you do not specify the SIM slot, the entire port will be locked/unlocked. When op=switch, it means to switch to this location. When op=reset, only the port number is valid. |
None |
| ops | array | Multi-command array Valid when op is multiple |
None | Y (op= multiple) |
Attributes of tasks in json data
| Parameter | Data type |
Description | Default | Required |
|---|---|---|---|---|
| op | string | Operation type lock: lock port unlock:unlock port |
None | Y |
Document No : xxxxxxx
8/6/2120
Page 13
Version: 2.0

6 SMS Sending¶
Server send SMS sending request to device by Ethernet, and it keep sending task in a JSON array.
6.1 Topology¶
While device and server not in a same LAN, device HTTP port should been Nat mapping out on boundary router, so server can send message to device actively.

6.2 SMS sending flow chart¶
Server can send SMS by GET/POST request. GET request use API specified in 'Ejoin http SMS sending API' document. POST request can be used to send long SMS (more that 300 characters) or send more that one SMS in a request message.
6.2.1 SMS sending¶
After got the SMS sending request from server, device will design a task ID (related to the sending report ) to create one or more SMS sending task, and after those task finished, device will send 200ok message to server.
6.2.2 Sending status report¶
While SMS send successfully/failed/timeout, device will put the result in cache, after meet condition (cache storage full or cache time reached), device will send POST request to report one or more task execute result. If it is group sending, device will report execute result periodically until all num in this group sending task get a result.
6.2.3 Sending status query¶
Server can send a GET request to query task sending status, like successfully send statics, failed information(num and reason), current sending num and so on.
6.2.4 Pause the SMS task¶
When a SMS task is still waiting to be sent in the send queue, one or more SMS can be paused.
6.2.5 Resume the paused SMS task¶
Resume the sending of one or more suspended SMS tasks.
6.2.6 Delete the SMS task¶
Delete one or more SMS tasks waiting to be sent in the send queue.
6.2.7 Query the SMS task¶
Query the SMS task waiting to be sent in the send queue.
6.3 Message description¶
6.3.1 SMS Sending¶
6.3.1.1 URL¶
http://host:port/goip_post_sms.html host: Device IP address port: Device webpage management port, default value is 80 .
6.3.1.2 Parameter¶
| Parameter | Description | Default | Required | Remark | |
|---|---|---|---|---|---|
| version | API version | 1.0 | N | 1.0 < Compatible with previous API 1.1: Support for the |
|
| Document No : xxxxxxx | 8/6/2120 | Page 15 | |||
![]() |
Note: All URL parameters only appear in the GET request. For POST, it will appear in the JSON attribute of the body segment. The following will not be explained.
6.3.1.3 Data¶
The task data (the body segment of the HTTP message) is a JSON format string consisting of one or more tasks, and the value of the HTTP header parameter "Content-Type" is "application/json; charset=utf-8"。 {"type":"send-sms", "task_num":n, "tasks":[{"tid":tid_1, ...}, ...,{"tid":tid_n, ...]} Components state:
| Parameter | Data type | Description | Default | Required | Remark |
|---|---|---|---|---|---|
| type | string | Message type | None | N | |
| sr_url | string | Status report forward url | System configurat ion |
N | |
| sr_cnt | string | Max num of SMS result can keep in cache. | 100 | N | 1. The buffer number reaches this value, the buffered report is sent immediately, and the timer is reset. |
| sr_prd | Int | The max time SMS result can keep in cache | 30 | N | 2. The time expired, even if not enough reports are received, send immediately , then reset the timer |
| sms_url | string | SMS forward URL | System configurat ion | N | |
| sms_cnt | Int | Max num of SMS can keep in cache | 1 | N | 1. When the buffer number reaches this value, the buffered SMS is sent immediately and the timer is reset. 2. In order to be compatible with old customers, this parameter must be set to a value greater than 1 , in order to buffer the received SMS and use the new sending |
Document No : xxxxxxx 8/6/2120 Page 16 Version: 2.0 Ejoin HTTP SMS Development Spec.
| mechanism | ||||||
|---|---|---|---|---|---|---|
| sms_prd | Int | Max time SMS can keep in cache | 30 | N | 1. The time expired, even if not enough SMS is received, it is sent immediately, then the time: is reset. | |
| task_num | string | Total task | 1 | Y | ||
| tasks | Array | Specific SMS send task | None | Y |
Attributes of tasks in json data
| Parameter | Data type | Description | Defau1t | Required |
|---|---|---|---|---|
| tid | Int | Task ID | None | Y |
| from | String | Use '..'..'-' to assign more than one port (from channel 1) | Choose of device | N |
| to | string | one or more (use ',' to distinguish) recipients | None | Y |
| sms | string | SMS content | None | Y |
| chs | string | Character coding set (utf8|base64) | utf8 | N |
| coding | Int | pecific the SMS codec: 0:not assign 1:USC2 2:7bit |
0 | N |
| smstype | Int | SMS type 0: SMS. 1: MMS |
0 | N |
| smstitle | string | MMS subject: MMS subject format is UTF-8, this parameter could be empty; | " " | N |
| attachments | string | 1. MMS attachment. This field take effect only when smstype=1; 2. Field content format: "File type1 |
base64 code file content 1; File type2 | base64 code file content 2; .... File type n |
| Ejoin HTTP SMS Development Spec. |
| 4. example: "txt|x8Sxvg==;.jpg|4AAGSkZJRgABAgAAZABk" |
||||
|---|---|---|---|---|
| smsc | string | Store the SMSC number. | "" | N |
| intvl | string | Interval of 2 SMS while device sending them in= | "0" | N |
| tmo | Int | Max time while waiting sending result (second). | 30 | N |
| sdr | Int | If enable the successfully send report. 1:enable, 0:disable. |
Disable | N |
| fdr | Int | If enable the failed report. 1:enable, 0:disable. | Enable | N |
| dr | Int | If enable SMS delivery report. 1:enable, 0:disable. | Disable | N |
| sr_prd | Int | Status report period (second)., 0: not on, >0: on Control only the period in which a single task generates a report |
60 | N |
| sr_cnt | Int | Single-state report SMS number, less than 1 will use the default value Control only the number of processed messages that have been reported by a single task |
10 | N |
Tips:
- While not choose a port, device will pick up a random port to send SMS to every recipient.
- While chose more than one ports, and just one SMS recipient, then device will use all chose port to send SMS to this recipient.
- If more ports, and more recipient designed, then every port will send SMS to every recipient separately.
6.3.1.4 Response¶
Task sending is a JSON array composed by one or more task send status, Parameter "Content-Type" in HTTP head should set to "application/json; charset=utf- 8" . { "code":200, "reason": "OK", "type": "task-status", "status": [{"tid":tid_1, "status": "0 OK"},..," "tid":tid_n, "status": "2 Invalid Port" }]}
Status components state:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| tid | Int | Task ID | None | Y |
Document No : xxxxxxx
8/6/2120
Page 18
Version: 2.0

6.3.2 Task send report¶
6.3.2.1 URL¶
Server or device configuration decision.
6.3.2.2 Parameter¶
| Parameter | Description | Default | Requi red |
Remark |
|---|---|---|---|---|
| Version | API version | 1.1 | Y | This document describes specification support only |
6.3.2.3 Data¶
Status-report message is a JSON array composed by one or more task send report. Parameter "Content-Type" in HTTP head should set to "application/json; charset=utf-8" . {"type":"status-report","rpt_num":n,"rpts":[{"tid":tid_1, ...}, ...,{"tid":tid_n, ...]} Components state:
| Parameter | Data | Description | Default | Required |
|---|---|---|---|---|
Document No : xxxxxxx 8/6/2120 Page 19 Version: 2.0 Ejoin HTTP SMS Development Spec.
| type | ||||
|---|---|---|---|---|
| type | string | Message type | None | Y (status-report) |
| rpt_num | string | Report num | 1 | Y |
| rpts | Array | Detail status report | None | Y |
Attributes reported in json data
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| tid | Int | related task ID. | None | Y |
| sending | Int | total num of SMS in sending. | None | Y |
| sent | Int | total num of SMS successfully send. | None | Y |
| failed | Int | total num of SMS failed send. | None | Y |
| unsent | Int | total sMS in cache waiting for send. | None | 1 |
| sdr | array | Successfully send details (one list for one num) Success report is a array. {0}: recipients num index (based on group sending), int {1}: num, string {2}: SMS sending port (1.01, 2. 02, ...), string {3}: SMS send timestamp in UTC time, int |
None | N |
| fdr | array | Fail send details (one num one list) {0}: recipients num index (based on group sending), int {1}: num, string {2}: SMS sending port (1.01, 2. 02, ...), string {3}: SMS send timestamp in UTC time, int {4}: Progress reason, codedetails[refer to 1.0 API \(\}\) {5}: Carrier reason, coded description. Valid when \(\{4\}\) is failed to send |
None | N |
Tips:
- tid related to the task ID in the send-sms message.
- sending, sent, failed are accumulated num in one task.
- Sdr(successfully send record) list records between 2 status-report, server should keep before details.
- fdr(failed detail record) list records between 2 status-report, server should keep before details.
6.3.3 Pause the SMS task¶
6.3.3.1 URL¶
http://host:port/goip_pause_sms. html host: Device IP address port: Device webpage management port, default value is 80 .
6.3.3.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| version | API version | 1.1 | Y | This document describes specification support only |
| username | Device username | None | Y | |
| password | Device password | None | Y |
6.3.3.3 Data¶
The data (the body segment of the HTTP message) is a JSON format string consisting of one or more tasks, and the value of the HTTP header parameter "Content-Type" is "application/json; charset=utf-8" . \(\{\) "tids" : [tid1, tid2, ..., tidn]} Components state:
| Parameter | Data type |
Description | Default | Required |
|---|---|---|---|---|
| tids | String | Restore one or more tasks ID that are sent. |
None | No. When there is no (iid, n) send tasks are necessary |
The body of the query response is a JSON format string consisting of one or more tasks. The value of the HTTP header parameter "Content-Type" is "application/json; charset=utf-8". \(\{\) "code" :200, "reason" : "OK", "results" : [{ "tid" :tid_1, "status" : "0 OK" }, ..., { "tid" :tid_n, "status" : "2 Invalid Port" }]}
Components state:
| Parameter | Data type | Description | Default | Requ |
|---|---|---|---|---|
| code | Int | Interface processing result code | None | Y |
Document No : xxxxxxx 8/6/2120 Page 21 Version: 2.0 Ejoin HTTP SMS Development Spec.
| reason | String | Interface processing results | None | Y |
|---|---|---|---|---|
| results | Array | Task processing results. When there is no tids in the request, this field is not included in the result. | None | N |
| tid | Int | Task ID | None | N |
| status | String | Task status code 0: OK 1: Invalid User 2: Invalid Port 3: USSD Expected 4: Pending USSD 5: SIM Unregistered 6: Timeout 7: Server Error 8: SMS expected 9: TO expected 10: Pending Transaction 11: TID Expected 12: FROM Expected If task status ID not equal to 0 , then means this task not received by device. |
None | N |
6.3.4 Resume the paused SMS task¶
6.3.4.1 URL¶
http://host:port/goip_resume_sms. html host: device IP address port: device web port, the default is 80 , optional.
6.3.4.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| version | API version | 1.1 | Y | This document describes specification support only |
| username | Device username | None | Y | |
| password | Device password | None | Y |
6.3.4.3 Data¶
Data(The body segment of the HTTP message) is a JSON array composed by one or more task. Parameter Content-Type in HTTP head should set to "application/json; charset=utf-8"
{ "tids" : [tid1, tid2, ..., tidn]}¶
Attributes instructions:
| Parameter | Data type |
Description | Default | Required |
|---|---|---|---|---|
| tids | String | The task ID to be restored | None | NO. Restore all sending tasks when there is no field |
The body of response is a JSON array composed by one or more task ID. Parameter "Content-Type" in HTTP head should set to "application/json; charset=utf-8" . {"code" :200, "reason" : "OK", "results" : [{"tid" :tid_1, "status" : "0 OK"}, ..., { "tid" :tid_n, "status" : "2 Invalid Port" }]}
Attributes instructions:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| code | Int | Interface processing result code | None | Y |
| reason | string | Interface processing results | None | Y |
| results | array | Task processing results | None | Y |
| tid | Int | Task ID | None | Y |
| status | string | The status code and reason description of the task 0: OK 1: Invalid User 2: Invalid Port 3: USSD Expected 4: Pending USSD 5: SIM Unregistered 6: Timeout 7: Server Error 8: SMS expected 9: 10 expected 10: Pending Transaction 11: TID Expected 12: FROM Expected |
None | |
| 16 the task's response code is not 0, it indicates that the task is not accepted by 0, 10 |
6.3.5 Delete the SMS task.¶
6.3.5.1 URL http://host:port/goip_remove_sms. html host: device IP address. port: device web port, the default is 80 , optional. Document No : xxxxxxx \(8 / 6 / 2120\) Page 23 Version: 2.0
6.3.5.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| version | API version | 1.1 | Y | This document describes specification support only |
| username | Device username | None | Y | |
| password | Device password | None | Y |
6.3.5.3 Data¶
Data(The body segment of the HTTP message) is a JSON array composed by one or more task. Parameter Content-Type in HTTP head should set to "application/json; charset=utf-8" . \(\{\) "tids" : [tid1, tid2, ..., tidn]} Attributes instructions:
| Parameter | Data type |
Description | Default | Required |
|---|---|---|---|---|
| tids | String | The task ID to be restored. | None | NO. Restore all stmiling tasks, when these is no Tidd |
The body of response is a JSON array composed by one or more task ID. Parameter "Content-Type" in HTTP head should set to "application/json; charset=utf- 8". \(\{\) "code" : 200, "reason" : "OK", "results" : [{ "tid" :tid_1, "status" : "0 OK" }, ..., { "tid" :tid_n, "status" : "2 Invalid Port" }]}
Attributes instructions:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| code | Int | Interface processing result code | None | Y |
| reason | string | Interface processing results | None | Y |
| results | array | Task processing results 7i成类中没有tid的,结果中不得人下段 |
None | Y |
| tid | Int | Task ID | None | Y |
| status | string | The status code and reason description of the task 0: OK | None | Y |
Document No : xxxxxxx
8/6/2120
Page 24
Version: 2.0

6.3.6 Query the SMS task¶
6.3.6.1 URL¶
http://host:port/goip get tasks. html?version=xxx\&username=root\&password=root\&port=x xx\&pos=xxx\&num=xxx\&has_content=xx host: device IP address. port: device web port, the default is 80 , optional.
6.3.6.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| version | API version | 1.1 | Y | This document describes specification support only |
| username | Device username | None | Y | |
| password | Device password | None | Y | |
| port | Send port. Starting from 1 | None | Y | |
| Has_content | Whether to bring a text message in the result. | 0 | N | 0 - Do not return text message content. 1 - return text message content |
| Pos | The starting position of the request. 0 represents the beginning of the first task. |
None | Y | The location of this field is in the order of the submission of the message task order |
| Num | The number of | 10 | N | |
| The body of response is a JSON array composed by one or more task ID. Parameter Content-Type in HTTP head should set to "application/json; charset=utf-8". | ||||
| \(\{\) "tids" : [tid1, tid2, ..., tidn]} | ||||
| Attributes instructions: |
| Parameter | Data type |
Description | Default | Required |
|---|---|---|---|---|
| tids | String | The task ID to be query. | None | N |
The body of response is a JSON array composed by one or more task ID. Parameter "Content-Type" in HTTP head should set to "application/json; charset=utf-8". \(\{\) " code " :200, " reason " : " OK ", "total_num" :n "task_num" :n, "tasks" :[{"tid" :tid_1, \(\cdots\}, \cdots,\{\) "tid" :tid_n, \(\cdots\}]\) Attributes instructions:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| code | Int | Interface processing result code. | None | Y |
| reason | string | Interface processing results | None | Y |
| Total_num | Int | The number of tasks. | None | Y |
| Task_num | Int | Query the number of tasks returned. | None | Y |
| Tasks | Array | Query the returned array of tasks. | None | Y |
Attributes instructions of task:
| Tasks | array | Query the returned array of tasks. | None | Y |
|---|---|---|---|---|
| Tid | Int | Task id | None | Y |
| From | string | One or more (commas, short horizontal connections) send ports (from 1) | Device selection | Y |
| To | string | One or more (comma connected) message receiver number. | None | Y |
| Sms | string | Message content | None | Y |
| Chs | string | Code set (utf8/base64) | int 8 | Y |
| Coding | Int | Specifies the encoding of the message sent. 0: Do not specify 1: USC2 2: 7bit |
0 | Y |
| State | Int | Task status: | None | Y |
Document No : xxxxxxx 8/6/2120 Page 26 Version: 2.0
6. 4 Example¶
6.4.1 Status notification¶
Url:
http://192.168.1.67:80/goip_set_status, html?url=http://192.168.1.142&period=60&username=root&password
=root
Response:

6.4.2 Send command¶
Url: http://192.168.1.67:80/goip_send_cmd, html?Username=root&password=root
Body: {"type":"command", "op":"switch", "ports": "2.02"}
Response:

6.4.3 Send SM5¶
Url:
http://192.168.1.67:80/goip_post_sms, html?username=root&password=root¶
Document No : xxxxxxx 8/6/2120 Page 27 Version: 2.0
Body:¶
{"type":"send-sms","task_num":1, "tasks": [("tid":1223, "to":"13686876620","sms":"hallo123")]}
Response:¶
6. 4. 4 Pause the SMS task¶
Ur1:¶
http://192.168.1.67:80/golp pause sms. html?username=root\&password=root Body: ("tids": \([2,3]\) )
Response:¶
6.4.5 Resume the paused SMS task¶
Ur1:¶
http://192.168.1.67:80/golp resume sms. html?Username=root\&password=root Body: ("tids": \([2,3]\) )
Response:¶
Document No : xxxxxxx
8/6/2120
Page 28
Version: 2.0

6. 4. 6 Delete the SMS task¶
Body: ("tids": \([2,3]\) )
Response:¶
| 1 | |||
|---|---|---|---|
| 2 | "code": 200, | ||
| 3 | "reason": "OK", | ||
| 4 | "results": [ | ||
| 5 | |||
| 6 | "tid": 2, | ||
| 7 | "status": "0 OK" | ||
| 8 | |||
| 9 | |||
| 10 | "tid": 3, | ||
| 11 | "status": "0 OK" | ||
| 12 | |||
| 13 | |||
| 14 |
6.4.7 Query the SMS task¶
Ur1:¶
http://192.168.1.67:80/goip set tasks.html?version=1.1&username=root&password=root&port=1& pos=0&has content=1
Response:¶
7 Receive the SMS¶
Device will send SMS to server by POST request, while it get SMS from operator.
7.1 Topology¶
While forwarding SMS, device send a request to server first, so even device in LAN, and server in a public net, it also can work effectively

7.2 Message description¶
7.2.1 URL¶
Default set by device, server can revise it in SMS sending quest message.
7.2.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| version | API version | 1.1 | Y | This document describes specification support only |
7.2.3 Data¶
A JSON format string consisting of one or more short messages. The value of the HTTP header parameter "Content-Type" is "application/json; charset=utf-8" .
Attributes instructions:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| type | String | Data type | None | Y (recv-sms) |
| sms_num | String | Total SMS num | None | Y |
| sms | Array | SMS array | None | Y |
For saving the bandwidth, SMS content also storage in a array. [0]: Delivery report flag, 0 :normal SMS, 1:This is a delivery report [1]: Receive report( '1.01', ' 1.02' ) [2]: timestamp while device got this SMS
[5]: SMS content: Delivery report: "code scts", code is 0 for successful delivery, utf-8 Ordinary SMS: BASE64 encoding of utf-8
8 Query SMS¶
Customers can actively query the SMS received by the device through HTTP GET/POST request.
8.1 Query process¶
- Query all messages received by the device without the query parameters (except for user-verified parameters).
- Use the value of next_sms returned by the device as the value of the sms_id parameter to query subsequent SMS messages.
- If the device restarts, return a different ssrc synchronization source ID and return to step 1.
- Repeat step 2
8.2 Message description¶
8.2.1 URL¶
http://host:port/goip_get_sms. html?username=root&password=root&sms_id=xxx&sms_num=xxx host: Device IP address port: Device webpage management port, default value is 80 .
8.2.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| sms_id | Start SMS ID | 1 | N | 1: The first SMS ID received by the device |
| sms_num | Specify the number of SMS to be queried | 0 | N | 0: Query all SMS |
| sms_del | Delete the SMS that has been returned by the query | 0 | N | 0: Do not delete, 1: delete |
8.2.3 Data¶
A JSON format string consisting of one or more short messages. The value of the HTTP header parameter "Content-Type" is "application/json; charset=utf-8" . \(\{\) "code": 0, "reason": "OK", "ssrc": "0123456789abcdef", "sms_num": 2, "next_sms": 3, "data": [ \(\left[0,{ }^{\prime} 1 B^{\prime \prime}\right.\), 1466506477, "10010", "13265825775", "SbCK5pWs55qE555o5o1377yM5oKo5aW977yB5o6o612Q5oKo5L2/555o Document No : xxxxxxx 8/6/2120 Page 32 Version: 2.0 44CQ5omL5py66JC15Lia5Y6F44CR5LiA56uZ5byP5YWN5rWB6YeP5pyN5Yqh5bmz5Y+wIGh0dHA6Ly91LjEwMDEwLm NuL2ROY2Qg77yM6L275p2+5p+16K+i6K+d6LS544CB5L2Z6aKd5Y+K6K+m5Y2V77yb5oiW5Zue5aSN5Lu15LiL5pWw 5a2X5Luj56CB6I635Y+W5oKo6ZyA6KaB55qE5pyN5Yqh77yaDQoxMDEu5b2T5py16K+d6LS577yblQ0oxMDIu5Y+v55 So5L2Z6aKd77yblQowLuWNh+e6pzRH77ybDQoxLuivnei0ueWPiuenr+WHhu+MmwOKM17otKbmiLfmn6Xor6LvvJsN CjMu5YWF5YC877yblQoOLuWuoualt+acjeWKoe+MmwOKNS7kuJr1iqH1ip7nkIbvvJsNCjYu5aKe5YC85Lia5Yqh77 ybDQo3LuecgeS7veS4k+WMuu+MmwOKOS7ng63ngrnkv4Pp1IDjgIINCuW5v+S4nOiB1OmAmuOAggAAAAA-^], [0, "iB", 1466506670, "10010", "13265825775", "5bCK5pWs55qE55So5oi377yM5oKo5aW977yB5o6o612Q5oKo5L2/55So 44CQ5omL5py66JC15Lia5Y6F44CR5LiA56uZ5byP5YWN5rWB6YeP5pyN5Yqh5bmz5Y+wIGh0dHA6Ly91LjEwMDEwLm NuL2ROY2Qg77yM6L275p2+5p+16K+i6K+d6LS544CB5L2Z6aKd5Y+K6K+m5Y2V77yb5oiW5Zue5aSN5Lu15LiL5pWw 5a2X5Luj56CB6I635Y+W5oKo6ZyA6KaB55qE5pyN5Yqh77yaDQoxMDEu5b2T5py16K+d6LS577yblQ0oxMDIu5Y+v55 So5L2Z6aKd77yblQowLuWNh+e6pzRH77ybDQoxLuivnei0ueWPiuenr+WHhu+MmwOKM17otKbmiLfmn6Xor6LvvJsN CjMu5YWF5YC877yblQoOLuWuoualt+acjeWKoe+MmwOKNS7kuJr1iqH1ip7nkIbvvJsNCjYu5aKe5YC85Lia5Yqh77 ybDQo3LuecgeS7veS4k+WMuu+MmwOKOS7ng63ngrnkv4Pp1IDjgIINCuW5v+S4nOiB1OmAmuOAggAAAAA-^]
Property description:
| Parameter | Data type | Description | Default | Requir ed |
|---|---|---|---|---|
| code | int | Operation code | None | Y |
| reason | string | Reason description | None | Y |
| sarc | string | Synchronization source identifier the device generates a new sarc for a time it runs. for the value changes, for users |
None | Y |
| sms num | int | Number of SMS queried | None | Y |
| next_sms | int | The next SMS ID | None | Y |
| data | int | Queryed SMS content | None | Y |
For saving the bandwidth, SMS content also storage in a array. [0]: Delivery report flag, 0 :normal SMS, 1 :This is a delivery report [1]: Receive report( '1.01', ' 1.02' ) [2]: timestamp while device got this SMS
[5]: SMS content: Delivery report: "code scts", code is 0 for successful delivery, utf-8 Ordinary SMS: BASE64 encoding of utf-8
9 Query SMS statistics¶
The client can actively query the short message statistics of the device through the HTTP GET request.
9.1 Message description¶
9.1.1 URL¶
http://host:port/goip_get_sms_stat. html?version=xxx&username=xxx&password=xx x&p orts=xxx&slots=xxx&type=xxx host: Device IP address port: Device webpage management port, default value is 80 .
9.1.2 Parameter¶
9.1.3 Response¶
The body of the response is a JSON array, and the value of the HTTP header parameter "Content-Type" is "application/json; charset=utf-8". {"code" :200, "reason" : "OK", "count" :n, "stats" :[{"port" : xxx, ...}, ...]} Property description:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| code | int | Interface processing result code | None | Y |
| reason | string | Interface processing result reason | None | Y |
| count | int | Number of statistical results | None | Y |
| stats | stat result array |
Array of statistical results (stat results are as follows) |
None | Y |
stat result description:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| port | int | Port number (value from 1) | None | Y |
| slot | int | Slot number (value from 1) | None | Y |
| received | int | Number of SMS received | None | Y |
| sent | int | Number of SMS sent | None | Y |
| sent_ok | int | Number of successful SMS sent | None | Y |
| sent_failed | int | Number of failed SMS sent | None | Y |
| con_failed | int | Number of consecutive failed SMS | None | Y |
| unsent | int | Number of unsent SMS | None | Y |
| sending | int | Number of SMS being sent | None | Y |
Document No : xxxxxxx 8/6/2120 Page 35 Version: 2.0
10 Query call statistics¶
The client can actively query the call statistics of the device through the HTTP GET request.
10.1 Message description¶
10.1.1 URL¶
http://host:port/goip_get_call_stat. html?version=xxx&username=xxx&password=x xx& ports=xxx&slots=xxx&type=xxx host: Device IP address port: Device webpage management port, default value is 80 .
10.1.2 Parameter¶
The body of the response is a JSON array, and the value of the HTTP header parameter "Content-Type" is "application/json; charset-utf-8". {"code" :200, "reason" : "OK", "count" :n, "stats" :[{"port" :xxx, \(\cdots\}, \cdots]\}\) Property description:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| code | int | Interface processing result code | None | Y |
| reason | string | Interface processing result reason | None | Y |
| count | int | Number of statistical results | None | Y |
| stats | stat result array |
Array of statistical results (stat results are as follows) |
None | Y |
stat result description:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| port | int | Port number (value from 1) | None | Y |
| slot | int | Slot number (value from 1) | None | Y |
| calls | int | Number of calling | None | Y |
| alerted | int | Number of alerting | None | Y |
| connected | int | Number of connected calls | None | Y |
| :--: | :--: | :--: | :--: | :--: |
| con_failed | int | Number of failed calls | None | Y |
| nc | string | No Carriers success ratio ("n/m"), the numerator n is the success number, and the denominator m is the total number | None | Y |
| pdd | int | PDD | None | Y |
| acd | int | ACD | None | Y |
| asr | int | ASR percentage value, for example, asr is 43 , which is \(43 \%\) | None | Y |
| ted | int | Cumulative call duration (minutes) | None | Y |
| act_ted | int | (actual) actual cumulative call duration (seconds) | None | Y |
| # EJOIN SMS Standard HTTP API |
Welcome to the official API reference documentation for eJointech Machine.
I. Table of Contents¶
Version: V 1.7.2
- Created Date: 21 July,2014
- Updated Date: 14 Mar,2021 1.SMS Sending. Page 1
2.SMS Receiving Page 8
3.Basic Acknoledge Page 10
II. SMS Sending¶
Server send SMS sending request to device by Ethernet, and it keep sending task in a JSON array.
2.1 Topology¶
When device and server not in a same LAN, device HTTP port should be Nat mapping out on boundary router, so server can send message to device actively.
2.2 SMS sending flow chart¶
Server can send SMS by GET/POST request. GET request use API specified in 'Ejoin http SMS sending API' document. POST request can be used to send long SMS(more that 300 characters) or send more that one SMS in a request message.
2.2.1 SMS sending¶
After receiving the SMS sending request from the server, the device creates one or more SMS sending tasks with the specified task ID (for subsequent status reports), and then responds with a 200 OK response message to the server.
2.2.2 Sending status report¶
When SMS is sent successfully/failed/timeout, device will cache the result, and when a certain condition is met(the upper limit of the cache capacity is reached or the cache time is up),the device will report the sending results of one or more SMS tasks through a POST request. If it is bulk sms sending, device will report execute result periodically until all number in this group sending task get a result.
2.2.3 Sending status query¶
Server can send a GET request to query task sending status, like successfully send statics, failed information(number and reason),current sending number and so on.
2.3 Message state¶
2.3.1 SMS Sending Task¶
2.3.1.1 SMS Sending URL http://host:port/goip_post_sms.html host: Device IP address port: Device webpage management port, default value is 80 .
2.3.1.2 HTTP Parameter¶
Parameter Description Default Required Remark Version API version 1.0 N
Username Device Username None Y
Password Device password None Y
Remark: Parameter URL just exist in GET request, about POST request, URL parameter will contain in JSON array, which will not be explained in following.
2.3.1.3 Send-sms message¶
send-sms message is a JSON array composed by one or more SMS send task. Parameter Content-Type in HTTP head should set to 'application/json; charset=utf-8' {"type":"send-sms", "task_number":n, "tasks":[{"tid":tid_1, $\cdots}, \cdots,{" t i d ": t i d _n, \cdots]}}
- Components state:
| Parameter | Data type | Description | Default | Require d |
Remark |
|---|---|---|---|---|---|
| type | string | message type | None | Y | send-sms |
| sr_url | string | Status report forward url | N | ||
| sr_cnt | int | Max number of SMS result can keep in cache. |
100 | N | While result number up to this value, device will send these results to server immediately and set this counter to 0 . |
| sr_prd | int | The max time SMS result can keep in cache |
30s | N | While this time expired, device will send these results to server right now even not get enough, and set this counter to 0. |
| :--: | :--: | :--: | :--: | :--: | :--: |
| sms_url | string | SMS forward URL | N | ||
| sms_cnt | int | Max number of SMS can keep in cache |
1 | N | While total SMS number in cache up to this value, device will send these SMS immediately, and set this counter to 0 . For capacity the old version, this value must set above 1, then device will keep SMS in cache, and send with new mechanism. |
| sms_prd | int | Max time SMS can keep in cache |
30 | N | While this time expired, device will send all SMS in cache out, even total number not up to sms_cnt. |
| task_number | string | Total task | 1 | Y | |
| tasks | array | Specific SMS send task |
None | Y |
- Attributes in task array state:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| tid | int | Task ID | None | Y |
| from | string | Use','-'to assign more than one port(from channel 1) | Choose by device | N |
| to | string | One or more(use ';'to distinguish) recipients | None | Y |
| flash_sms | int | Specific this SMS if flash sms or not. 0 | None | N |
| means normal sms, 1 means send as flash sms. | ||||
| :--: | :--: | :--: | :--: | :--: |
| sms | string | SMS content | None | \(Y\) |
| chs | string | Character coding set (utf8"base64) | utf8 | N |
| coding | int | Specific the SMS codec: 0:not assign 1:USC2 2:7bit |
0 | N |
| smsc | string | Store the SMSC numberber. | ||
| intvl | string | Interval of 2 SMS while device sending them(ms) | "0" | N |
| tmo | int | Max time while waiting sending result. | 30 | N |
| sdr | int | If enable the successfully send report. 1:enable,0:disable. |
0 | N |
| fdr | int | If enable the failed report.1:enable,0:disable. | 1 | N |
| dr | int | If enable SMS report.1:enable,0:disable. | 0 | N |
| sr_prd | int | Sending status report period.0:not need report, \(>0\) : enable report, and specific a time. Just can control the current task sending status report period. |
60 | N |
| sr_cnt | int | Total sending status in one report message, it will use Default while stetted less than 1. | 10 | N |
| # Remark: |
1.When the port is not specified, the system automatically selects a ramdon port to send SMS to each recipient. 2.When more than one port specified, and just one SMS recipient, device will use all specified ports to send SMS to this recipient. 3.If multiple ports specified and more recipient designed, the system selects the specified ports to send message to each recipient;.
2.3.1.4 Task received reply¶
Task sending is a JSON array composed by one or more task send status, Parameter ContentType in HTTP head should set to 'application/json; charset=utf-8' {"code":200, "reason": "OK", "type":"task-status", "status":{{"tid":tid_1, "status": "0 OK"},..., {"tid":tid_n, "status": "2 Invalid Port"}}}
- Attributes state:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| tid | int | Task ID | None | \(Y\) |
| status | string | Task Status Code 0: OK 1: Invalid User 2: Invalid Port 3: USSD Expected 4: Pending USSD 5: SIM Unregistered 6: Timeout 7: Server Error 8: SMS expected 9: TO expected 10: Pending Transaction 11: TID Expected |
None | \(Y\) |
| 12: FROM Expected |
If task status ID not equal to 0 , then means this task not received by device.
2.3.2 Task send report¶
2.3.2.1 URL¶
- Webpage configuration or set in send-sms message.
2.3.2.2 Parameter¶
| Parameter | Description | Default | Required | Remark |
|---|---|---|---|---|
| version | API version | 1.1 | \(Y\) |
2.3.2.3 Status-report message¶
- Status-report message is a JSON array composed by one or more task send report. Parameter Content-Type in HTTP head should set to 'application/json; charset=utf-8' {"type":"status-report","rpt_number":n,"rpts":[{"tid":tid_1, $\cdots}, \cdots,{"tid":tid_n, \(\cdots\}\}]\}\)
- Attributes state:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| type | string | message type | None | \(Y\) (status-report) |
| rpt_number | string | report number | 1 | \(Y\) |
| rpts | array | Detail status report | None | \(Y\) |
- Attributes of parameter 'rpts'state:
| Parameter | Data type | Description | Default | Required |
|---|---|---|---|---|
| tid | int | related task ID | None | \(Y\) |
| sending | int | total number of SMS in sending. | None | \(Y\) |
| sent | int | total number of SMS successfully send. | None | \(Y\) |
| failed | int | total number of SMS failed send. | None | \(Y\) |
| :--: | :--: | :--: | :--: | :--: |
| unsent | int | total SMS in cache waiting for send | None | \(Y\) |
| sdr | array | Successfully send details(one list for one number) Success report is a array, [0]: recipients number index(based on group sending),int [1]: number, string [2]: SMS sending port(1A,2B,...), string 3: SMS send timestamp in UTC time, int |
None | N |
| fdr | array | Fail send details(one number one list) [0]: recipients number index(based on group sending),int [1]: number, string [2]: SMS sending port(1A,2B,...), string 3: SMS send timestamp in UTC time.int 4: Progress reason, code+ details[refer to 1.0 API] [5]:operator reason, code+ details. valid while 4 progress reason have detail. |
None | N |
- tid corresponds to the task ID in the task request;
- Sending, sent, and failed are the cumulative statistics of the task;
- The sdr (success detail record) is the record between two reports, and the server needs to record the previous data.
- fdr (failure detail record) is the record between two reports, the server needs to record the previous data.
III. SMS Receiving¶
When the device receives the SMS, it sends the SMS to the server via HTTP POST request
3.1.1 SMS Forward URL¶
the forwarding URL can be set on the SMS Forward Column page.(ejoin gateway >> URL)

3.1.2 Parameter¶
| Parameter | Description | Default | Required |
|---|---|---|---|
| Username | Server login account. | No | No |
| Password | Server login password. | No | No |
| Sender | The sms sender numberber. | No | No |
| Receiver | SMS receiver, if not define this parameter, when forward SMS, device would put the real SIM numberber. |
No | No |
| Port | The original port numberber which received this SMS. |
No | No |
| Charset | Charset | UTF-8 | Yes |
| # 3.1.3 Data |
- If not set the charset parameter on device webpage, the post body data would be UTF-8 text.
POST /myweb/goip?username-root\&password-root\&port-4\&sender-13510956503 HTTP/1.1 Accept: / Accept-Language: en User-Agent: Ejoin-SMSC/1.0 Host: 192.168.1.31:8080 Connection: Close Content-Type: application/octet-stream; charset-utf-8 Content-Length: 78 Sender: 13510956503 SMSC: 8613010888500 SCTS: 14022322113832 Hello, world:
Sender: The original SMS sender. SMSC: SMSC numberber. SCTS: the exact time that SMS reach device, it's a UNIX time stamp. The last line is the SMS content.
IV. Basic Acknowledge¶
| Get all sim cards status | http://192.168.1.67/goip_get_status.html? username=root\&password=root\&all_sims=1 |
|---|---|
| Get specific sim card status | http://192.168.1.67/goip_get_status.html?username=root\&password=root |
| Switch sim cards | http://ip:port/goip_send_cmd.html? username=root\&password=root\&port=1.01\&op=switch |
| Disable/enable ports | http://ip:port/goip_send_cmd.html? username=root\&password=root\&op=unlock\&port=2.01 |
Shenzhen Ejoin Technology Co.,Ltd









