GTI Networks Messaging Gateway API
The GTI Messaging Gateway allows the UC platform of a GTI Networks Extend partner to act as the PSTN messaging (next hop) peer for the sending and receiving of SMS and MMS messages to and from a GTI Networks Extend subscriber/SIM.
-
The Messaging Gateway provides a simple, synchronous HTTPs POST-based API for sending and receiving methods, and also media handling methods for MMS messages.
-
The Messaging Gateway assumes that the partner has implemented appropriate interfaces to a PSTN carrier for the DIDs/numbers they intend to use with GTI Networks Extend SIMs and messaging.
-
Partners wishing to use the Messaging Gateway must therefore implement a two-sided process for messaging:
-
Partner to PSTN carrier interface (typically SMPP or HTTP) for subscriber DID’s
-
Partner to GTI Messaging Gateway interface for sending/receiving messages to/from these DID’s to/from SIM’s.
-
?⇒☁️ SMS/MMS Origination Message Flow
The following picture shows how an SMS/MMS message origination flows from the GTI Extend subscriber, through the GTI Networks Extend Platform and the UC Partner's UCaaS Platform, to route over the PSTN to the destination party.
☁️⇒? SMS/MMS Term Network Flow
The following picture shows how an SMS/MMS message termination flows from the PSTN, through the UC Partner's UCaaS Platform and the GTIGLOBAL Networks Extend Platform, to deliver to the GTI Extend's mobile device.
GTI Messaging Gateway - Configuration
The GTI Messaging Gateway is configured as part of the GTI Networks Extend platform. The Partner must implement an interface to the GTI Provisioning API and manually configure the gateway using the GTI Networks Control Panel.
The configuration items include the following items that must be configured per GTI Messaging Gateway.
-
Primary URL - Required - The GTI Messaging Gateway uses this URL to send the HTTPS requests to the UCaaS Server. This URL is always the first option used to deliver an HTTPS Message.
-
Secondary URL - Optional - If the Primary Server returns an error. The GTI Messaging Gateway may try to deliver the message to the secondary server. See the section on Response Code Handling to understand when the secondary server is used.
-
Client Secret - Required - Any Request delivered to the GTI Messaging Gateway must contain an Bearer Authorization Header containing this token.
-
Security Token - Required - Any Request delivered to the UCaaS server must contain an Bearer Authorization Header containing this token.
? Store And Forward
In the case where a message fails to deliver to the UCaaS Server. The GTI Networks Extend platform will perform store and forward where the request is stored and delivered at a later time.
The GTI Networks Extend platform performs store and forward based on the error response received from the UCaaS server. Any response considered a temporary failure is processed by the store and forward service. Refer to the section on Error Responses for information on which responses are considered permanent or temporary.
A message that has been stored is tried again roughly every 30 seconds and will persist for 7 days, after which the message is discarded. These durations are controlled by GTI Networks and cannot be changed by a customer.
In order to maintain message order. After a subscriber’s message has been placed into the Store and Forward service. All future messages for this subscriber are automatically placed in the store. The messages are then delivered based on the re-try timer (no less than 30 seconds) and delivered based on the order placed in the store service.
??? Group Messaging
Group Messaging (also called Group MMS) is just an MMS message that contains more than one recipient. Group Messaging is supported by the GTI Messaging Gateway. Each recipient's E.164 number is contained in the list of TO users. Group messages use the message type mms in.
Group Messaging Originations
When a subscriber originates a group message, the GTI Messaging Gateway delivers a single message event, with "type" = "mms", to the UCaaS Platform. The To field contains the E.164 number of each participant that needs to receive the message. The From and Owner fields contain the E.164 number of the subscriber that has originated this message.
Group Messaging Terminations
When a 3rd party generates a group message, the UCaaS Server is expected to send a message to the GTI Messaging Gateway for each GTI Subscriber (SIM) that is part of the group. The To field contains the E.164 number of each participant that needs to receive the message. The Owner field contains the E.164 number of the subscriber that receives this message.
? Emojis
Emojis and extended characters are supported. These will be encoded as UTF-8. There may be limitations on how these are rendered based on the handset.
⚙️ SMS Messages with binary UDH data
User data header (UDH) is a binary structure that may be present at the start of a short message in an SMS. It does not contain text but defines how to process the message. Generally, the UDH is either used in combination with binary content known as smart messaging for ringtones, operator logos, WAP Push and vCards, or it is used for concatenated SMS.
Binary UDH messages are not supported using the GTI Messaging Gateway interface.
The GTI Networks Extend platform handles all SMS concatentation and fragmentation operations required for long message handling. As such, the UCaaS Server does not have to deal with handling message fragmentation/ordering/re-assembly operations for long SMS messages.
Message Concatentation during SMS Originations
When a mobile sends a message that exceeds the limit of a single SMS message (160 characters for traditional text only characters, or 70 characters if extended characters, like emoji, are used), the message is received by the GTI Networks Extend platform as a series of message fragments, with binary UDH information included that allows the platform to process the fragments in the correct order. Once all the fragments are received, the GTI Networks Extend platform combines them into a single message event. This single message event is then POST-ed by the GTI Messaging Gateway interface to the UCaaS server. No fragment identifcation information is included the POST-ed origination message.
Message Fragmentation during SMS Terminations
Like SMS originations, fragment identification information is not supported over the GTI Messaging Gateway interface during SMS terminations. A POST-ed message event from the UCaaS must contain the entire content for that message event. The GTI Messaging Gateway interface does not process fragment identification information, nor will it re-order fragments into sequential order during delivery, from the UCaaS server.
The GTI Networks Extend platform will automatically fragment a "long" message event and send all pieces to the mobile. The mobile device will re-assemble the pieces in the proper order and present the "long" message to mobile as a single SMS event.
Data-only Messaging Services
Some mobile messaging applications do not rely on SMS or MMS to transmit their messaging data. These are sometimes called data-only messaging services. A few examples of these types of data-only messaging services are:
-
Apple's iMessage service
-
Android's RCS service
-
WhatsApp
-
Facebook Messenger
These types of client application messaging services are not seen by the GTI Networks Extend platform's messaging infrastructure, and as such, are not supported by the GTI Messaging Gateway interface.
? Security
All messages sent to/received by the GTI Messaging Gateway use HTTPS, which are transmitted using TLS encryption. HTTPS requires that the customer provide a proper valid public SSL certificate, issued by CA, to GTI Networks support so it can be loaded onto the GTI Networks Extend platform servers.
The UC Partner must provide GTI Networks support with a complete list of IP addresses that UCaaS platform will use to communicate with GTI Messaging Gateway interface. GTI Networks support will add those IP addresses to the appropriate firewall ACL rules to enable successful network connectivity between the GTI Messaging Gateway and the UCaaS platform servers.
? Authentication
Bearer authentication is an HTTP authentication scheme that involves security tokens called bearer tokens. These tokens are to be included in every request as part of the Authentication Header. These tokens are data filled against the provisioning GTI Messaging Gateway. There is one token to be used when messages are sent to the UCaaS server and a separate token used when sent to the GTI Messaging Gateway.
Any message that is received for a subscriber that does not have a valid token receives a 401 Unauthorized response.
-
Missing Authorization Header
-
Received token Does not match the provisioned token
-
Header is in the incorrect format.
? Media Messages
Media images (an MMS message) are encoded as base64 and contained in the JSON message body with the following limitations.
-
1 MB Limit
-
Images, videos, audio, docs, and vcard are all supported by the API.
-
Supported MMS file types are:
-
Application: json, ogg, pdf, rtf, zip, x-tar, xml, gzip, x-bzip2, x-gzip, smil
-
Text: plain, javascript, css, csv, cal, html, vcard, x-vcard, vnd.wap.wml, rtf, xml
-
Audio: mp4, mpeg, ogg, flac, wav, amr, 3gpp
-
Image: bmp, gif, jpeg, png, svg+xml, tiff, webp, x-icon
-
Video: mp4, mpeg, ogg, quicktime, webm, x-ms-wmv, x-flv
NOTE: There may be limitations on how individual file types are rendered based on the handset.
-
-
? Transmission Rates
The API is restricted to 1 message per second.
⛔️ Restrictions and Limitations
-
GTI Networks Extend platform system messages and other binary SMS messages are not supported over the GTI Messaging Gateway interface. This includes the following types of messages:
-
Message Waiting Indication (MWI) messages,
-
Over-the-air SIM configuration messages
-
iMessage/FaceTime/iCloud activation messaging
-
other binary UDH messaging
-
-
API is restricted to 1 message per second.
-
DLR reports are not provided.
-
1MB limit for base64 encoding data.
-
There may be limitations as to how Emojis and media attachments (images, pdf, etc.) are rendered on any particular handset.
-
For Message Originations:
-
All numbers in the
From, andOwnermust be in the e.164 format. -
The
Tofield can be:-
e.164 format
-
SMS shortcode (5 or 6 digits)
-
-
-
For Message Terminations:
-
All numbers in the
ToandOwnermust be in the e.164 formart -
The
Fromfield can be:-
e.164 format
-
up to 11 alphanumeric characters (including the space character) and must start with an alpha character
-
SMS shortcode (5 or 6 digits)
-
-
POSTMessage Origination
This command documents examples of messages sent to the receive URL of your UCass server from the GTI Messaging Gateway when a GTI Networks Extend subscriber originates a message from their device.
JSON Field Definitions
Message JSON Object
Media JSON Object
Response Code handling
The GTI Networks Messaging Gateway will handle response codes from the delivery of message originations to the UCass platform as follows:
Handling of Status Codes
Bearer 123456
Contains the provisioned Security Token
application/json;charset=UTF-8
mobileuc/2.0
GTI Networks sends : mobileuc/v2.0
application/json
POSTMessage Termination
This command is used by a UCass server to send a request for message delivery to the GTI Messaging Gateway for delivery to the device of a GTI Networks Extend subscriber.
JSON Field Definitions
Message JSON Object
Media JSON Object
SMS/MMS Termination Processing
The GTI Messaging Gateway determines if the received message is invalid. The following validation checks are provided and the error response generated.
If the incoming request is rejected due to invalid data or invalid json. A json body may be added to the response to include a description as to why the message was not processed. This response body is optional and only included for certain error conditions. The response body has the following format.
Bearer Auth-Schema Token
Contains the provisioned Security Token
application/json;charset=UTF-8
<identity of the application>
GTI Networks sends : mobileuc/v2.0
application/json