USSD HTTP API SPECIFICATION Version 1.0 Teletalk Bangladesh Limited

Similar documents
LINK Mobility SMS REST API MT and Delivery Reports Version 1.3; Last updated September 21, 2017

Forthnet Mobile Platform - groupsms http interface v1.0 1 / 9

Response: Note: Please define Dynamic Value in ##Field## The following are the parameters used: For Unicode Message:

SMS Submit Interface description HTTP Version 1.5

HLR Lookup Service (Release 1.1.0)

ERMES. Technical Specification for ex MPAY services integration. version /10/2018

Quick Answers. You may create any Sender ID for the transactional route, provided the Sender ID should be of 6 alpha characters only.

Way2mint SMS Mobile Terminate (MT) API Guide for HTTP HTTPS

Revision: 50 Revision Date: :43 Author: Oliver Zabel. GTX Mobile Messaging SMS Gateway Interface Simple HTTP API Manual

API Spec Sheet For HLR v1.4

3G TS V3.1.0 ( )

Cloud SMS API Guide. Version 5.1

Wired 2 Wireless Technology Solutions API Help Document Copyright Introduction. 2. Parameter list

Message parameter details

All requests must be authenticated using the login and password you use to access your account.

Way2mint SMS Mobile Terminate (MT) API Guide for HTTP / HTTPS

Bulk HTTP API Specification

Manual for Mailman List Administrators. Issued by Advanced Center for Computing and Communication, RIKEN

ETSI TS V5.2.0 ( )

Client-Server Protocol Transport Bindings

Instructions for Using New API. Instructions for Using New API

API Spec Sheet For Version 2.5

New Dashboard - Help Screens

Kestrel Series Radars. Remote Access Manual!

@Tracker Air Interface Firmware Update Protocol

User Guideline v 1.2. For assistance please contact Grapevine on or

Login management commands

Opaali Portal Quick guide

3GPP TS V7.6.0 ( )

Quriiri HTTP MT API. Quriiri HTTP MT API v , doc version This document describes the Quriiri HTTP MT API version 1 (v1).

SMS Pro/Billing Pro. Interface specification. Version 3.0.1

SMPP Gateway Manual. Route Mobile Limited. (Document version 1.5)

HTTP API-HELP DOCUMENT

Programming for the Web with PHP

Cisco Unity Express Windows and Menus

VIP-102B IP Solutions Setup Tool Reference Manual

Cisco Extension Mobility

SMS Outbound. HTTP interface - v1.1

API Integration Guide

Optus Wireless IP VPN Customer Management Interface (CMI)

Get Qualified User Manual

UC App for Android Mobile

Notification Services

PRE BID REPLIES FOR NPCI:RFP: /0020 DATED RFQ FOR SMS GATEWAY SERVICES FOR INTEGRATION WITH FRM SOLUTIONS

SMPP Gateway Manual. SMPP Gateway Manual Page 1

Plan Sponsor Security Quick Reference

Release Note for TG800

In order to create your proxy classes, we have provided a WSDL file. This can be located at the following URL:

GMM-SM Event Logging. Feature Description. Feature Overview. Events to be Logged

SMS API User Guide. Document Reference: October Version: 6

Pro Solutions Interface specification

Configuring Health Monitoring

Operation Manual AAA RADIUS HWTACACS H3C S5500-EI Series Ethernet Switches. Table of Contents

MOBILE SERVICES. Product Guide

Overview Introduction Messaging Error Codes Message parameter details Contact Details... 7

Contents About This Guide... 5 About Notifications... 5 Managing User Accounts... 6 Managing Companies Managing Password Policies...

RADIUS Vendor-Specific Attributes and RADIUS Disconnect-Cause Attribute Values

HTTP Specification Version 1.83

Amazon Web Services CSE 490H. This presentation incorporates content licensed under the Creative Commons Attribution 2.5 License.

Qualys SAML 2.0 Single Sign-On (SSO) Technical Brief

The Wifidog project is an open source captive portal solution It consists of two components:

April AT&T Collaborate SM. Customer Configuration Guide

Home center SMS integration

AT&T Core Mobility Integrated Dispatch Console User Guide. Installation Guide. AT&T Integrated Dispatch Console 3.0

RADIUS Vendor-Specific Attributes (VSA) and RADIUS Disconnect-Cause Attribute Values

3GPP TS V ( )

ETSI TS V8.0.0 ( ) Technical Specification

Release Note for TG200/400

This Readme describes the NetIQ Access Manager 3.1 SP5 release.

Logging in to the CLI

HTTP API Specification V2.7

Secure Web Appliance. Basic Usage Guide

CallPilot Multimedia Messaging

version 2.0 HTTPS SMSAPI Specification Version 1.0 It also contains Sample Codes for -.Net - PHP - Java

HTTP API - HELP DOCUMENT

Connection-oriented (virtual circuit) Reliable Transfer Buffered Transfer Unstructured Stream Full Duplex Point-to-point Connection End-to-end service

28 Deploying IN Services in a Mobile Environment

Cisco Unity Express Windows and Menus

GMM-SM Event Logging. Feature Description. Feature Overview. Events to be Logged

7. TCP 최양희서울대학교컴퓨터공학부

Architecture Design Document for PIMS

Administering Jive Mobile Apps for ios and Android

WAP over GSM USSD Version 15-July-1999

Table of Contents 1 AAA Overview AAA Configuration 2-1

SMS HTTP API DOCUMENTATION December 2012

Digital Telephone User Guide

3GPP TS V9.2.0 ( )

Intel NetStructure SS7 Protocols MAP Programmer s Manual. Document Reference: U14SSS

Administering Jive Mobile Apps

EUROPEAN ETS TELECOMMUNICATION June 1993 STANDARD

Grenada Co-operative Bank Limited. User Guide

VMware AirWatch Integration with F5 Guide Enabling secure connections between mobile applications and your backend resources

Release Note for MyPBX Enterprise X

SMS-Bulk Gateway HTTP interface

Cisco Unity Express 8.0 Voic System User s Guide for Advanced Features

Using the Cable Monitor Tool

HTTP Authentication API

Functional Programming in Haskell Prof. Madhavan Mukund and S. P. Suresh Chennai Mathematical Institute

msolutions Messenger Customization Options

FusionWorks: Fusion Communicator for iphone 2/24/2016 USER GUIDE

Transcription:

USSD HTTP API SPECIFICATION Version 1.0 Teletalk Bangladesh Limited Latest version of this document can be obtained from: http://www.nixtecsys.com/ussd/ugw- teletalk- http- api.pdf

2 This page has been left blank intentionally

Table of Contents Scope of the document:... 4 Information on USSD Gateway Core:... 4 Requirements:... 4 Type of USSD Sessions:... 6 HTTP API for USSD Sessions (Transactions) initiated by a Mobile User [MO]:... 6 Examples of API:... 8 Example 3 rd Party application:... 9 HTTP API for USSD Sessions (Transactions) initiated by a 3 rd Party Application [MT]:... 10 Basic differences between MO and MT USSD sessions:... 11 Possible Error cases for MT USSD API Call:... 11 Note on Length of Text:... 12 Various timeouts:... 12 Example MO USSD Session in the application point of view:... 13 Example MT USSD Session in the application point of view:... 14 Example MT USSD Notify User in the application point of view:... 14 3

Scope of the document: This document specifies HTTP API provided by USSD Gateway for communicating with third party application. Information on USSD Gateway Core: Vendor (Developer): Nixtec Systems (Bangladesh) Connection to Core Network: SIGTRAN (M3UA) Capacity: With single MAP license it can handle total 65536 active unique (MO and/or MT) sessions. With more license (say n ) it can handle n times of 65536 sessions in single hardware. TPS: Gateway core is capable to handle 4500+ TPS in current hardware (Single Quad core CPU with moderate RAM) [with more powerful hardware it can be more] Development Language: C Operating System: Linux HTTP API was developed in PHP with MySQL database backend Requirements: Third party client must have to be connected to Teletalk network to make communications with USSD Gateway. Usually a VPN connection through some ISP (Metronet, Telnet, etc.) will serve the purpose. Please contact with your Network Solutions Provider regarding connectivity. Third party client should have a working HTTP Server to receive USSD sessions initiated by Mobile Users. For initiating USSD Push (MT) targeted to Mobile Users from a third party application client will call a HTTP URL with properly filled up parameters given by Teletalk. Any HTTP URL call should produce some Response Header and Response Body according to the specification in this document. USSD Gateway will NOT store any 3 rd party transaction states (but may store CDR for billing/reporting purpose). Third party clients will be responsible to develop their applications based on the specification in this document. 4

5

Type of USSD Sessions: USSD Sessions (Transactions) can be created two ways: o Mobile User Initiated (e.g., when user starts the session by dialing *shortcode#) (Mobile Originated) [MO] o Application Initiated (e.g., when 3 rd party will start the session to Mobile User) (Mobile Terminated) [MT] HTTP API for USSD Sessions (Transactions) initiated by a Mobile User [MO]: Any user input, as well as the initiating dial of USSD shortcode will be sent to third party URL using GET/POST (as suggested by third party) HTTP method. Each USSD Session (Transaction) will be assigned a unique Transaction ID. The ID will remain same from start to end of the USSD session (Transaction). The ID will be passed to third party using tid parameter as in the following table (Table- 01). A USSD Session (Transaction) will have three states: 1. Begin, 2. Continue, 3. End. The state of the session will be passed using flow parameter as mentioned in following table (Table- 01). This document considers a USSD session from begin to end with zero or more continue states and hence it is considered Transaction similar to the concept of database transaction. Mobile User s MSISDN (Mobile Number) will be passed to third party using msisdn parameter as in the following table (Table- 01). Mobile User s input (including the number input at the start of dial) will be passed using text parameter as in the following table (Table- 01). Following parameters will be sent in each user input (including initial dial). Parameter Name tid Table- 01 Description Type of Value Transaction Numeric ID (Unique (base 10) among running Transactions or Sessions) Length of Value Up to 10 digits. Configurable to add prefix 0 s as padding to make it Example Value 65535 0000065535 6

msisdn Mobile Numeric Number of Digits User text User Input ASCII Characters (7bit GSM) flow State of Transaction momt user pass Mobile Originated (MO) or Mobile Terminated (MT/Push) Username given for teletalk (for security purpose) by 3 rd party Password assigned to the user configured above Alphabetic (English) fixed length if required by 3 rd party 13 digits 8801550155081 160 octets* (182 7- bit chars max) 3-8 chars *515# abcd 1234 begin continue end Alphabetic 2 chars mo mt (in case of Push) Alphanumeric 3-8 chars t3letalk teletalk teleuser Alphanumeric 4-8 chars t123p455 Knowing the above parameters 3 rd party will prepare their URL and share with Teletalk accordingly. The third party application will provide output to Response Body, which will be sent to user as it is. Currently 7- bit GSM alphabets are supported. If the application wants to carry on with user input then it would set Response HTTP header X- Flow to continue. This will tell the USSD Gateway to continue session by allowing user to provide input. In this way, the user will get the text (written in response body) and will be able to enter some input to continue the session with application. When the application wants to end session with user it will set HTTP header X- Flow to end which will send the application s output in 7

response body to user and end the session with user (user will not get any chance to enter anything to continue further). If the application doesn t set the X- Flow Response HTTP header to continue, USSD GW HTTP API will consider this end by default and end session with user. At any time of the running USSD session (transaction) the mobile user can end the session by Cancel or End button in mobile without giving an input, even when the 3 rd party was willing to have a reply. In such cases USSD gateway will call 3 rd party URL with flow set to end and text (will be empty) should be ignored (as user terminated without giving input). If USSD gateway detects interruption of the session (transaction) due to network or some unexpected reasons, it will generate an end of the session (transaction) and notify in 3 rd party URL as the previous clause. For whatever reasons, if USSD Gateway sends end to 3 rd party URL, the response HTTP header and response body from 3 rd party will be discarded (since there will be no way to continue the USSD session / transaction) and gateway doesn t store any 3 rd party information exchanged in the lifetime of a session. For some reason, if an end is lost due to network problem or some other reasons, and the transaction ID (tid) repeats with a begin (with a possibly different MSISDN), 3 rd party must consider it new session. It s the responsibility of the 3 rd party to make necessary cleanup in their application for the begin with a transaction ID (tid) used in previously processed USSD session. It will be guaranteed by USSD Gateway to not to have two same transaction IDs for two running USSD sessions. Examples of API: 1. Mobile User dials *515# 2. Gateway invokes the 3 rd Party URL with given parameters with flow set to begin 3. 3 rd party application processes the information and replies with some output for user. It further sets X- Flow HTTP header to continue if the user needs to provide some input. Otherwise it sets the HTTP header X- Flow to end. 4. If user provides no input and cancels/quits the USSD session, Gateway will invoke the URL with flow set to end and no further USSD communication on the same session is possible. 5. If user provides input it is sent to application in text parameter and flow is set to continue. 8

Example 3 rd Party application: Following is a sample PHP code for communicating with HTTP GET/POST API. 3 rd party will get some basic idea on how they will communicate with USSD Gateway through HTTP API. For simplicity user and pass parameters are not mentioned (since it is not, by any means, part of the USSD session). For other programming languages it would work in the similar logic: The code will keep taking input from the user until he/she puts a 0 as input or ends the call by pressing End button in mobile. For example, third party will save the code as ussd.php and put to some place in their HTTP Server (Web Server) and share the URL with Teletalk (e.g., : http://192.168.99.99/teletalk/ussd.php). Here 192.168.99.99 is IP address of the HTTP Server that is reachable from Teletalk USSD Gateway. <?php # Get Transaction ID for USSD Session $tid = $_REQUEST['tid']; # MSISDN of the user $msisdn = $_REQUEST['msisdn']; # Number dialed or Input from user $text = $_REQUEST['text']; # Session Status {begin,continue,end} $flow = $_REQUEST['flow']; # Application Logic will work here if ($text == "0") { $flow = "end"; } else { $flow = "continue"; } # Set header, so that Gateway knows that application wants to carry on the session with user header("x-flow: $flow"); if ($text == "0") { echo "Thank You."; } else { echo "USSD Demo\nText: $text\nenter something to continue, 0 to quit"; } die();?> 9

HTTP API for USSD Sessions (Transactions) initiated by a 3 rd Party Application [MT]: The MT/Push USSD Sessions are initiated by 3 rd party the same way USSD Gateway does a begin of session. Here Teletalk will give a URL for 3 rd party which they will call the same way as MO data sent to third party. One exception is that the tid (Transaction ID) field will be generated by USSD gateway as Response Body instead of clients passing it in the URL. For clarification the following table (Table- 02) shows the list of parameters to be passed to the MT URL: Parameter Name msisdn text Table- 02 Description Type of Value Mobile Numeric Number of Digits User Text data to ASCII send to Characters mobile user (7bit GSM) to initiate USSD MT session Length of Example Value Value 13 digits 8801550155081 160 chars* (182 7- bit chars max) Welcome to Mobile Banking: 1. Check Balance 2. Send Money 0. Exit flow State of Transaction Alphabetic (English) 3-8 chars begin end user pass Username given by teletalk (for security purpose) Password assigned to the user mentioned above Alphanumeric 3-15 chars 3rdparty Alphanumeric 4-15 chars 3rdpartypass The HTTP URL call issued by 3 rd party to Teletalk will produce Response Body that will contain the transaction id (tid) for the session being initiated. Thus it can be considered that the Teletalk s URL invocation is just to get the Transaction ID (tid) to begin a USSD session. Subsequent 10

user inputs will be transferred to 3 rd party the same way as MO USSD session. When there will be user input (in case client set flow to begin ), the 3 rd party will be notified in the same way like MO USSD sessions with those parameters in the MO USSD API. Just in this case momt parameter will have mt value. If third party wants just to notify the Mobile User with some message and no user input is expected, the value of flow parameter in MT USSD invocation should be set to end. Basic differences between MO and MT USSD sessions: Table- 03 Operation USSD MO Session USSD MT Session 1. Initiation Initiated by Mobile User Initiated by 3 rd party application 2. URL Invocation to begin transaction Teletalk invokes 3 rd party URL with given parameters 3. momt Parameter Value of momt parameter will be always mo 3 rd party application invokes Teletalk URL with given parameters Value of momt parameter will be always mt 4. Session Cleanup Third party should clean session when they get a flow=end from gateway or when they send the X- Flow header set to end Third party should clean session when they get a flow=end from gateway. Because USSD Gateway will acknowledge the application when the user gets the final text. Possible Error cases for MT USSD API Call: In case of successful calling of a USST MT request, Gateway will reply with a numeric transaction ID in HTTP 200 response body, which will be used by application for further communications on the USSD session. Error cases in calling a MT session request are as follows: Serial Error Response from API Error Description 1 ERROR [PARAMETER] Required parameter missing 2 ERROR [AUTH] Username and/or password not matched 11

3 ERROR [MSISDN] Invalid MSISDN passed 4 ERROR [TEXT] Empty text passed 5 ERROR [TEMPORARY] Temporary error from gateway, try later NB: All error messages start with ERROR. Note on Length of Text: In GSM 09.02 (MAP) 160 octets is stated as the maximum length for the USSD string. Due to underlying signaling layers the maximum length of the USSD string depending on the message is as following. Table- 04 If we consider 7- bit GSM Alphabet (that is used in most handsets) it can fit in 7- bit. Hence maximum 182 ((160x8)/7) such characters can be transferred using USSD. System currently supports only 7- bit GSM Alphabet. It may support Unicode in near future. Various timeouts: A whole running session continues as long as Core Mobile Network holds it with subscriber. USSD Gateway doesn t by- itself imposes any time limit in taking user input to application. USSD Gateway has to detect a time- out from Application side when waiting for a response text to be delivered to subscriber. In case the Core Network applies time- out to some session, USSD gateway will receive the signal about the timeout and will clean up accordingly. In case USSD Gateway receives a Session End (or aborted) signal from core network, it will perform a cleanup and invoke third party URL with text set to blank (empty) and flow set to end. Third party may perform a cleanup upon receiving an end, because no more communication is 12

possible on an ended session. Gateway will ignore any type of response from application when invoking third party URL with flow=end. In case there is a timeout in anywhere in communication (Mobile Handset/Core Network/USSD Gateway/3 rd Party Application), it should be considered as interruption to that particular session SL Description Timeout by Core Network Timeout by USSD Gateway 01 Whole lifetime of Configured by Operator (usually No timeout a session no timeout unless there is timeout due to being idle in one dialogue) 02 User input to send Configured by Operator (usually No timeout to network 03 Response from 3 rd party application 04 Other sort of timeout 90-120 seconds) Configured by Operator. Also handset may have some time- out mechanism waiting for response from core network Depends on the type of ongoing transaction 15 seconds defined in the HTTP API by default. If 3 rd party needs more time (up to 60) to process a request to make a response they must request operator explicitly to configure it in API. No timeout Example MO USSD Session in the application point of view: 1. Mobile User (having MSISDN 8801550155081) dials *515#. Gateway invokes (Note that * and # are hex- encoded, same applies to any character that needs to be encoded in a URL: http://3rdparty.ip/teletalk/ussd.php?user=teletalk&pass=telepass&tid=6 5535&msisdn=8801550155081&text=%2A515%23&flow=begin&momt =mo 2. 3 rd party application responses with Response Header X- Flow: continue and Response Body Please enter some input. Gateway transfers this 13

message to mobile user. User gets it in his/her mobile screen with option to enter something as input. 3. Mobile user inputs 1234. Gateway invokes: http://3rdparty.ip/teletalk/ussd.php?user=teletalk&pass=telepass&tid=6 5535&msisdn=8801550155081&text=1234&flow=continue&momt=mo 4. 3 rd party application responses with Response Header X- Flow: end and Response Body Thank you for your feedback. Gateway transfers this message to mobile user. User gets it in his/her mobile option but can t provide any input to carry on the session. 5. If Mobile User doesn t provide any input in 3 rd point above and ends the session by pressing End button in handset, Gateway invokes: http://3rdparty.ip/teletalk/ussd.php?user=teletalk&pass=telepass&tid=6 5535&msisdn=8801550155081&text=&flow=end&momt=mo Example MT USSD Session in the application point of view: 1. 3 rd party wants to start a USSD session with user. 3 rd party invokes: http://teletalk.ip/ussd/mt.php?user=3rdparty&pass=3rdpartypass& msisdn=8801550155081&text=please%20enter%20something&flow=be gin 2. Teletalk generates a transaction ID (tid) (e.g., 65535) for this operation and gives it in the HTTP Response Body. 3 rd party will store it to keep track of the USSD Session (transaction) states. 3. Teletalk sends a USSD push to user with the text. Since it was a begin in flow parameter, user will get provision for putting input. 4. When user gives input (e.g., 1234) and click Send in mobile, Teletalk invokes the USSD MO URL accordingly (similar way as MO, except that the momt parameter set to mt ): http://3rdparty.ip/teletalk/ussd.php?user=teletalk&pass=telepass&tid=1 2345678&msisdn=8801550155081&text=1234&flow=continue&momt= mt 5. 3 rd party will continue session with user similar way like MO session. Example MT USSD Notify User in the application point of view: 1. 3 rd party wants just to notify user with some message and doesn t expect any input back. 3 rd party invokes: 14

15 http://teletalk.ip/ussd/mt.php?user=3rdparty&pass=3rdpartypass& msisdn=8801550155081&text=your%20month%20end%20balance%20 is%201234.50%20taka.&flow=end 2. Teletalk generates a transaction ID (tid) (e.g., 65535) for this operation and gives it in the HTTP Response Body. 3 rd party should store it for cleanup purpose. 3. Teletalk sends a USSD push to user with the text. Since it was an end in flow parameter, user will get no provision for putting input. 4. When the notification text reaches user s handset, the USSD Gateway will acknowledge the 3 rd party about the receiving by calling URL the same way as a MO USSD session ends if user closes without giving input. Just in this case momt parameter will have value mt : http://3rdparty.ip/teletalk/ussd.php?user=teletalk&pass=telepass&tid=6 5535&msisdn=8801550155081&text=&flow=end&momt=mt. 5. Third party application will clean up the session upon receiving the end flow from gateway.