Showing posts with label SMS. Show all posts
Showing posts with label SMS. Show all posts

Wednesday, December 1

MMS Architecture

The MMS Architecture is the set of standards used by the Multimedia Messaging Service in mobile networks. The standards are prepared by 3GPP.

Overview



MMSC Reference Architecture
The standard consists of a number of interfaces between components found in the mobile network:
MM1: the interface between MMS User Agent and MMS Center
MM2: the interface between MMS Relay and MMS Server
MM3: the interface between MMS Center and external servers
MM4: the interface between MMS Centers
MM5: the interface between MMS Center and HLR
MM6: the interface between MMS Center and user databases
MM7: the interface between MMS VAS applications and MMS Center
MM8: the interface between MMS Center and the billing systems
MM9: the interface between MMS Center and an online charging system
MM10: the interface between MMS Center and a message service control function
MM11: the interface between MMS Center and an external transcoder

]MM1

MM1 is the interface between a Mobile Station (MS) and an MMSC.
MM1 is used in the following actions:
The sender subscriber sends an MMS to the MMSC
The MMSC notifies the recipient subscriber that he/she has an MMS waiting for retrieval
The recipient subscriber retrieves the MMS from the MMSC
The MMSC notifies the sender that the recipient has retrieved the message
The recipient subscriber manages his/her mailbox in the MMSC (uploads MMS, deletes MMS, ...)
The MM1 interface is based on the WAP protocol. It includes the PAP notifications that are transformed to SMS's by the WAP gateway for the notifications.

MM2

MM2 is an interface between a MMS Relay (MMS-R) and an MMS storage database, two components of an MMSC platform.

MM3

MM3 is the interface between MMSC and external servers such as Email server or SMS Centers SMSC. This interface typically uses TCP/IP based protocols for e.g. Simple Mail Transfer Protocol ( SMTP )
Generally, it is the responsibility of MMSC to do the transformation of MMS multi-part binary data to MIME format of email in both the direction
MM3 is used in the following actions:
To exchange messages with external servers such as Email Server or SMS Centers

MM4

MM4 is the interface used to exchange messages between two different MMSCs. These MMSCs are generally located in two distinct Mobile Networks
This interface is also known as the MMSR interface in the Wireless Application Protocol (WAP) and the Open Mobile Alliance (OMA) standards.

MM5

MM5 is the interface between MMSC and other network elements like HLR or Domain Name Server. The communication over MM5 Interface is generally to fetch the routing information. MM5 has been defined by the 3GPP in TS 23.140 as a simple reference to Mobile Application Part.

]MM7

MM7 is the interface between MMSC and a value-added service provider (VASP).
The MM7 interface is used to send MMS from 3rd party providers (e.g., a bank sending a statement or an advertiser sending publicity). It is based on SOAP with attachments, using HTTP as the transport protocol. HTTP request shall be a POST.
The message is a MIME which encapsulates the SOAP envelope and the encoded attachments. The SOAP envelope is an XML where tags are the MM7 protocol data.

See also

ID-MM7

(source:wikipedia)

Multimedia Messaging Service

A multimedia message on a mobile phone,.
Multimedia Messaging Service, or MMS, is a standard way to send messages that include multimedia content to and from mobile phones. It extends the core SMS (Short Message Service) capability that allowed exchange of text messages only up to 160 characters in length.
The most popular use is to send photographs from camera-equipped handsets, although it is also popular as a method of delivering news and entertainment content including videos, pictures, text pages and ringtones.
The standard is developed by the Open Mobile Alliance (OMA), although during development it was part of the 3GPP and WAP groups.

History

The immediate predecessor to the MMS is the Japanese picture messaging system Sha-Mail introduced by J-Phone in 2001. It validated the concept of camera phone users willing to send picture messages from one phone to another.
Early MMS deployments were plagued by technical issues and frequent consumer disappointments, such as having sent an MMS message, receiving a confirmation it had been sent, being billed for the MMS message, to find that it had not been delivered to the intended recipient. Pictures would often arrive in the wrong formats, and other media elements might be removed such as a video clip arriving without its sound.
At the MMS World Congress in 2004 in Vienna, all European mobile operator representatives who had launched MMS, admitted their MMS services were not making money for their networks. Also on all networks at the time, the most common uses were various adult oriented services that had been deployed using MMS.
China was one of the early markets to make MMS a major commercial success partly as the penetration rate of personal computers was modest but MMS-capable cameraphones spread rapidly. The chairman and CEO of China Mobile said at the GSM Association Mobile Asia Congress in 2009 that MMS in China is now a mature service on par with SMS text messaging.
Europe's most advanced MMS market has been Norway and in 2008 the Norwegian MMS usage level had passed 84% of all mobile phone subscribers. Norwegian mobile subscribers average one MMS sent per week.
By 2008 worldwide MMS usage level had passed 1.3 billion active users who generated 50 billion MMS messages and produced annual revenues of 26 billion dollars.

Technical description

MMS messages are delivered in a completely different way from SMS. The first step is for the sending device to encode the multimedia content in a fashion similar to sending a MIME e-mail (MIME content formats are defined in the MMS Message Encapsulation specification). The message is then forwarded to the carrier's MMS store and forward server, known as the MMSC. If the receiver is on another carrier, the relay forwards the message to the recipient's carrier using the Internet.
Once the MMSC has received a message, it first determines whether the receiver's handset is "MMS capable", that is it supports the standards for receiving MMS. If so, the content is extracted and sent to a temporary storage server with an HTTP front-end. An SMS "control message" containing the URL of the content is then sent to the recipient's handset to trigger the receiver's WAP browser to open and receive the content from the embedded URL. Several other messages are exchanged to indicate status of the delivery attempt. Before delivering content, some MMSCs also include a conversion service that will attempt to modify the multimedia content into a format suitable for the receiver. This is known as "content adaptation".
If the receiver's handset is not MMS capable, the message is usually delivered to a web based service from where the content can be viewed from a normal internet browser. The URL for the content is usually sent to the receiver's phone in a normal text message. This behaviour is usually known as the "legacy experience" since content can still be received by a phone number, even if the phone itself does not support MMS.
The method for determining whether a handset is MMS capable is not specified by the standards. A database is usually maintained by the operator, and in it each mobile phone number is marked as being associated with a legacy handset or not. It can be a bit hit and miss since customers can change their handset at will and this database is not usually updated dynamically.
E-mail and web-based gateways to the MMS (and SMS) system are common. On the reception side, the content servers can typically receive service requests both from WAP and normal HTTP browsers, so delivery via the web is simple. For sending from external sources to handsets, most carriers allow MIME encoded message to be sent to the receiver's phone number with a special domain. An example of this would be PTN@messaging.carrier.com, where PTN is the public telephone number. Typically the special domain name is carrier specific.

Challenges

There are some interesting challenges with MMS that do not exist with SMS:


Handset configuration can cause problems sending and receiving MMS messages.
Content adaptation: Multimedia content created by one brand of MMS phone may not be entirely compatible with the capabilities of the recipient's MMS phone. In the MMS architecture, the recipient MMSC is responsible for providing for content adaptation (e.g., image resizing, audio codec transcoding, etc.), if this feature is enabled by the mobile network operator. When content adaptation is supported by a network operator, its MMS subscribers enjoy compatibility with a larger network of MMS users than would otherwise be available.
Distribution lists: Current MMS specifications do not include distribution lists nor methods by which large numbers of recipients can be conveniently addressed, particularly by content providers, called Value-added service providers (VASPs) in 3GPP. Since most SMSC vendors have adopted FTP as an ad-hoc method by which large distribution lists are transferred to the SMSC prior to being used in a bulk-messaging SMS submission, it is expected that MMSC vendors will also adopt FTP.
Bulk messaging: The flow of peer-to-peer MMS messaging involves several over-the-air transactions that become inefficient when MMS is used to send messages to large numbers of subscribers, as is typically the case for VASPs. For example, when one MMS message is submitted to a very large number of recipients, it is possible to receive a delivery report and read-reply report for each and every recipient. Future MMS specification work is likely to optimize and reduce the transactional overhead for the bulk-messaging case.
Handset Configuration: Unlike SMS, MMS requires a number of handset parameters to be set. Poor handset configuration is often blamed as the first point of failure for many users. Service settings are sometimes preconfigured on the handset, but mobile operators are now looking at new device management technologies as a means of delivering the necessary settings for data services (MMS, WAP, etc.) via over-the-air programming (OTA).
WAP Push: Few mobile network operators offer direct connectivity to their MMSCs for content providers. This has resulted in many content providers using WAP push as the only method available to deliver 'rich content' to mobile handsets. WAP push enables 'rich content' to be delivered to a handset by specifying the URL (via binary SMS) of a pre-compiled MMS, hosted on a content provider's web server. A consequence is that the receiver who pays WAP per kb or minute (as opposed to a flat monthly fee) pays for receiving the MMS, as opposed to only paying for sending one, and also paying a different rate.
Although the standard does not specify a maximum size for a message, 300 kB is the current recommended size used by networks due to some limitations on the WAP gateway side.

Interfaces

Main article: MMS Architecture


MMSC Reference Architecture
MM1: the 3GPP interface between MMS User Agent and MMS Center
MM2: the 3GPP interface between MMS Relay and MMS Server
MM3: the 3GPP interface between MMS Center and external servers
MM4: the 3GPP interface between MMS Centers
MM5: the 3GPP interface between MMS Center and HLR
MM6: the 3GPP interface between MMS Center and user databases
MM7: the 3GPP interface between MMS VAS applications and MMS Center
MM8: the 3GPP interface between MMS Center and the billing systems
MM9: the 3GPP interface between MMS Center and an online charging system
MM10: the 3GPP interface between MMS Center and a message service control function
MM11: the 3GPP interface between MMS Center and an external transcoder

See also

Short code


(source:wikpedia)

Short code

Short codes (also known as short numbers) are special telephone numbers, significantly shorter than full telephone numbers, that can be used to address SMS and MMS messages from mobile phones or fixed phones. There are two types of short codes: dialing and messaging.
Short codes are designed to be easier to read and remember than normal telephone numbers. Like telephone numbers, short codes are unique to each operator at the technological level. Even so, providers generally have agreements to avoid overlaps. In some countries, such as the United States, some classes of numbers are inter-operator (U.S. inter-operator numbers are called common short codes).
Short codes are widely used for value-added services such as television program voting, ordering ringtones, charity donations and mobile services. Messages sent to short code can be billed at a higher rate than a standard SMS and may even subscribe a customer to a recurring monthly service that will be added to their mobile phone bill until they text, for example, the word "STOP" to terminate the service.


Technology

Normal telephone numbers (following the E.164 standard) may be of any length, and so when dialed from landline telephones, the network must apply heuristics to determine when dialing is complete — in the US, for example, dialed numbers are generally seven or ten digits long, with an optional prefix of "1" (the country code for the US and Canada). On mobile phones, numbers are terminated with the "Send" or "Call" key and sent all at once over the network, so the network knows the end of the dialed number, and thus one can use short numbers without clashing with longer numbers.
For instance, on a land-line phone, one could not use the short code 12345, since then one could not dial the phone number 1-234-555-4626 (or any other number that shared the prefix 12345), but on a mobile phone there is no such ambiguity.

Short codes and service identifiers (prefix)

Short codes are often associated with automated services. An automated program can handle the response and typically requires the sender to start the message with a command word or prefix. The service then responds to the command appropriately.
In ads or in other printed material where a provider has to inform about both the prefix and the short code number, the advertisement will typically follow this format:
Example 1 - Long version: Text Football to 72404 for latest football news. Example 2 - Short version: football@72404

Short Code Directory

United States
888777 - Nixle

Regional differences

European Union
Common EU-wide codes are six digit long and start with 11. Examples include: 118xxx - directory services, 116xxx - emergency helplines. This is in addition to the EU-wide emergency number 112.

Australia
Short codes are six or eight digits in length, starting with the prefix "19" followed by an additional four or six digits and two. Communications Alliance Ltd and WMC Global are responsible for governing premium and standard rate short codes in Australia.Transactional and Subscription services require a double sms MO opt-in or Web based opt-in with an MO reply.
Belgium
Codes are four digits in length. You can have a look at the different categories here.
Canada
Canadian Common Short Codes can be five or six digits long. Common Short Codes beginning with a leading '4' are reserved for private use by wireless carriers. Four-digit Common Short Codes are not permitted due to handset incompatibilities. Short code-based messages vary between zero-rated (paid for by campaign), standard rate (user is responsible for standard carrier charges), and premium rate (varies, C$1-10). Canadian Short codes are governed by the Canadian Wireless Telecommunications Association.

Chile
Codes are three and four digits in length.

Czech Republic
Messages sent to/from these short codes are known as Premium Rate SMS. Codes are seven digits in length for MO and five (not billed) or eight (billed) for MT direction, starting with nine, while two or three (depending on billing type=MO/MT) trailing digits express the price, e.g. SMS sent to 9090930 is billed for Kč30. Leading three digits are purpose type prefixes (908 for micropayments, 909 for adult content and 900 for everything else), digits at position four and five determines the service provider registered by a network operator. There are also other four digit shortcodes, used by a network operators for service only purposes (operator dependent)

Denmark
Codes are four digits in length.

Dominican Republic
Codes are four or five digits in length.

Finland
Codes are five or more digits in length, usually five or six.

France
Codes are five digits in length. Starting digits define the cost of the service.

Germany
Codes are four or five digits in length.

Greece
Codes are five digits in length.

Hungary
Codes are four or five digits in length.

India
There are many companies in the Indian market who rent keywords,on a monthly basis, whose characters, on a typical mobile phone keypad, represent short codes. Short codes are five digits in length and have to start with the digit '5'. The five digits can be extended by three digits further representing three additional characters. Texts sent to these Short Codes are commonly referred to as Premium Rate SMS Messages and cost around Rs0.10 to Rs5 per text depending on the operator as well as the service. Any length of full message can be sent, ranging from 100–500 (some providers only support).

Indonesia
Codes are four digits in length with Rp2000 premium price.

Republic of Ireland
Short codes are five digits in length, and start with 5. The second digit generally indicates the maximum price, with 0 = completely free, 1 = standard text rate only, 3 = €0.60, and 7 having no maximum. Codes beginning 59 are ostensibly intended for adult services, but few if any of these codes are used.

Italy
In Italy short codes have no fixed length, starting from three digits up to five. They all start by the digit "4", which is designated by a local telecommunications law for "network services". Widely-known short codes are in the 48xxx range, commercial ringtones and mobile stuff download.

Lithuania
In Lithuania short codes also have no fixed length, starting from three digits up to five. They all start by the digit "1", which is designated by a local telecommunications law for "network services".

Malaysia
Codes are five digits in length, start with "2" or "3", premium pricing from RM0.30 up to 10.00. Codes are MT billed so subscription services are allowed. Upon service description approval by mobile operators, dedicated codes are generally live in 4 weeks, and shared codes after 1 week.
Morocco
Code are four keys digits in length.
The Netherlands
Codes are four digits in length.
Nigeria
Codes are four to five digits in length.
Norway
Codes are four and five digits in length.
New Zealand
Codes are three and four digits in length.
Panama
Codes are four digits in length.
Poland
Commercial codes are five digit long (1xxxx) and are reachable from both mobile and fixed networks. Calls to short codes - from any type of network - are routed based on the location of the number originating the call; hence, if wishing to reach a particular geographical area, the subscriber might need to prefix the short code with an appropriate area code.
Russia
Codes are four digits in length. The cost of the call or SMS to the short number varies from 1.2 to 300 rubles, depending on the number and the carrier.
Serbia
Codes are four digits in length.
Singapore
Codes are five digits in length.

South Africa
Codes are five digits in length. Short codes will start with either a "3" or "4". For example, 34001 or 42001. Each short code or short code range (a range will generally be 34000 to 34009) are assigned specific tariffs or end user prices (EUP). The tariff charges can range from R0.50 to R30.00 on mobile originated billing and from R0.50 to R50.00 using mobile terminated billing.
Spain
Codes are four digits in length.
Sweden
Codes are five digits in length.
Taiwan
Codes are usually four digits in length, starting with digits "19".
Turkey
Codes are four digits in length.
United Kingdom
Codes are five digits in length, starting with 6 or 8. The range of codes may be expanded in time to use other leading digits such as 7 and 4. Adult related mobile services must use codes starting with 69 or 89. Mobile operators sometimes use proprietary codes (either with a different leading digit or shorter in length for their own use). SMS shortcodes are often owned by holding companies who then lease them out to service providers and advertisers to promote SMS services, charitable fundraising and marketing promotions such as news alerts, voting and quizzes. Shortcodes can also be used to deliver additional content or a mobile URL link that when prompted opens the mobile web browser linking the user to a mobile web page. Premium services use codes that can be set to deliver a charge to a participant’s mobile phone (in accordance with the service provider’s terms of service). Other codes (typically used by advertisers) can be free to receive “your standard rate applies” or free to send and receive. UK Premium rated SMS services are regulated by PhonepayPlus. All charges and associated terms linked to a premium code should be transparent to the consumer. To stop a subscription based shortcode service text the word 'STOP' to the shortcode number.
United States of America
As of May 31, 2006, the standard lengths for interoperable short codes are five and six digits. Carriers use short codes with fewer digits for carrier-specific programs - e.g., "Text 611 to see how many minutes you have remaining on your plan." Codes starting with 1 are not permitted. Common short codes in the U.S. are administered by NeuStar, under a deal with Common Short Code Administration - CTIA. Short codes can be leased at the rate of $1000 a month for a selected code or $500 for a random code. Some carriers assign a subset of their carrier-specific codes to third parties. For example, 4 digit codes on T-Mobile's network are reserved for a "Beta test service" or "Free to end user" marketing campaigns.

Alternatives to short codes for SMS reception

An alternative to inbound SMS is based on long numbers (international number format, e.g. +44 7624 805000), which can be used in place of short codes or premium-rated short messages for SMS reception in several applications, such as television voting, product promotions and campaigns. Long numbers are internationally available, as well as enabling businesses to have their own number, rather than short codes which are usually shared across a number of brands. Additionally, long numbers are non-premium inbound numbers.


(source:wikpedia)

Reverse SMS billing

Reverse SMS billing or premium SMS service means that the user of the recipient phone rather than the message sender is charged for the cost of the SMS message received. It is also called MT (Mobile Terminated) Billing. Reverse-billed SMS messages are only sent if specifically requested by the phone user, however many unscrupulous operators will send reverse charged messages without prior consent of the recipient, which often go un-noticed by users on Pay As You Go plans without itemised billing. A daily weather alert is an example of a service where regular reverse-billed messages are received.
In some countries, providers are required by law or regulation to provide a means of opting out of a service once it has been commenced. Most typically, this is achieved by sending a stop message (most typically, simply STOP) to the same number as the service itself.

See also



(source:wikipedia)

SMS spoofing

SMS spoofing is a relatively new technology which uses the short message service (SMS), available on most mobile phones and personal digital assistants, to set who the message appears to come from by replacing the originating mobile number (Sender ID) with alphanumeric text. Spoofing has both legitimate uses (setting the company name from which the message is being sent, setting your own mobile number, or a product name) and illegitimate uses (such as impersonating another person, company, product).

How SMS spoofing is carried out

SMS Spoofing occurs when a sender manipulates address information. Often it is done in order to impersonate a user that has roamed onto a foreign network and is submitting messages to the home network. Frequently, these messages are addressed to destinations outside the home network – with the home SMSC essentially being “hijacked” to send messages into other networks.
The impact of this activity is threefold:
The home network can incur termination charges caused by the delivery of these messages to interconnect partners. This is a quantifiable revenue leakage.
These messages can be of concern to interconnect partners. Their customers may complain about being spammed, or the content of the messages may be politically sensitive. Interconnect partners may threaten to cut off the home network unless a remedy is implemented. Home subscribers will be unable to send messages into these networks.
While fraudsters normally used spoofed-identities to send messages, there is a risk that these identities may match those of real home subscribers. The risk therefore emerges, that genuine subscribers may be billed for roaming messages they did not send. If this situation occurs, the integrity of the home operator’s billing process may be compromised, with potentially huge impact on the brand. This is a major churn risk.
The legitimate use cases for SMS spoofing include:
A sender transmits an SMS message from an online computer network for lower more competitive pricing, and for the ease of data entry from a full size console. They must spoof their own number in order to properly identify themselves.
A sender does not have a mobile phone, and they need to send an SMS from a number that they have provided the receiver in advance as a means to activate an account.
An SMS Spoofing attack is often first detected by an increase in the number of SMS errors encountered during a bill-run. These errors are caused by the spoofed subscriber identities. Operators can respond by blocking different source addresses in their Gateway-MSCs, but fraudsters can change addresses easily to by-pass these measures. If fraudsters move to using source addresses at a major interconnect partner, it may become unfeasible to block these addresses, due to the potential impact on normal interconnect services.

Legality

In 2007, The UK premium rate regulator, PhonepayPlus (formerly ICSTIS) concluded a public consultation on anonymous SMS, in which they stated they were not averse to the operation of such services. However, from 2008 PhonePayPlus are introducing new regulation covering anonymous SMS which will require anonymous SMS service providers to send a follow-up message to the recipient stating that a spoofed SMS has been sent to them, and operate a complaints helpline. It is illegal in Australia.

Protecting users from SMS spoofing

If a user can prove that their SMS sessions have been spoofed, they should contact both law enforcement and their cellular provider, who should be able to track where the SMS messages were actually sent from. A user may also modify the phone's settings so that only messages from authorized numbers are allowed. This is not always effective since hackers could be impersonating the user's friends as well.

Examples of SMS spoofing

Messages sent from Google are sent with the Sender ID "Google".
Skype sends messages from its users with the mobile number they registered with. Note that when a user attempts to "reply" to the SMS, the local system may or may not allow the replying message to be sent through to the spoofed "origin."
A user who does not have a mobile phone attempts to sign up for a Foxytag account, which requires an SMS from a phone number that the user registers with. A dynamically assigned number from an anonymous SMS service will not work because the user is not given the dynamic number in advance to register with.
The Asian School of Cyber Laws (Pune) recently conducted experiments in SMS spoofing at the national and international level. They were able to successfully spoof SMS messages and make them appear to come from other people's cellular phones. These people were using GSM based cellular phone services in various parts of India and other Asian as well as African countries.
Nitesh Dhanjani discovered a security vulnerability when sending a spoofed SMS message to Twitter. Twitter used the SMS originator to authenticate the user. Nitesh used hoaxMail to spoof the SMS message and therefore could trick Twitter to post the message on the victims Twitter page.



(source:wikipedia)

Mobile Application Part

The Mobile Application Part (MAP) is an SS7 protocol which provides an application layer for the various nodes in GSM and UMTS mobile core networks and GPRS core networks to communicate with each other in order to provide services to mobile phone users. The Mobile Application Part is the application-layer protocol used to access the Home Location Register, Visitor Location Register, Mobile Switching Center, Equipment Identity Register, Authentication Centre, Short message service center and Serving GPRS Support Node (SGSN).

Facilities provided

The primary facilities provided by MAP are:
Mobility Services: location management (roaming), authentication, managing service subscription information, fault recovery,
Operation and Maintenance: subscriber tracing, retrieving a subscriber's IMSI
Call Handling: routing, managing calls whilst roaming, checking that a subscriber is available to receive calls
Supplementary Services
Short Message Service
Packet Data Protocol (PDP) services for GPRS: providing routing information for GPRS connections
Location Service Management Services: obtaining the location of subscribers
[edit]Published specification

The Mobile Application Part specifications were originally defined by the GSM Association, but are now controlled by ETSI/3GPP. MAP is defined by two different standards, depending upon the mobile network type:
MAP for GSM (prior to Release 4) is specified by 3GPP TS 09.02
MAP for UMTS ("3G") and GSM (Release 99 and later) is specified by 3GPP TS 29.002
[edit]Implementation

MAP is a Transaction Capabilities Application Part (TCAP) user, and as such can be transported using 'traditional' SS7 protocols or over IP using Transport Independent Signalling Connection Control Part (TI-SCCP);[1] or using SIGTRAN.
[edit]MAP Signaling

In mobile cellular telephony networks like GSM and UMTS the SS7 application MAP is used. Voice connections are Circuit Switched (CS) and data connections are Packet Switched (PS) applications.
Some of the GSM/UMTS Core Switched interfaces in the Mobile Switching Center (MSC) transported over SS7 include the following:
B -> VLR (uses MAP/B). Most MSCs are associated with a Visitor Location Register (VLR), making the B interface "internal".
C -> HLR (uses MAP/C) Messages between MSC to HLR handled by C Interface
D -> HLR (uses MAP/D) for attaching to the CS network and location update
E -> MSC (uses MAP/E) for inter-MSC handover
F -> EIR (uses MAP/F) for equipment identity check
H -> SMS-G (uses MAP/H) for Short Message Service (SMS) over CS

There are also several GSM/UMTS PS interfaces in the Serving GPRS Support Node (SGSN) transported over SS7:
Gr -> HLR for attaching to the PS network and location update
Gd -> SMS-C for SMS over PS
Gs -> MSC for combined CS+PS signaling over PS
Ge -> Charging for Customised Applications for Mobile networks Enhanced Logic (CAMEL) prepaid charging
Gf -> EIR for equipment identity check


(source:wikipedia)

Short message service technical realisation (GSM)

The Short Message Service is realised by the use of the Mobile Application Part (MAP) of the SS#7 protocol, with Short Message protocol elements being transported across the network as fields within the MAP messages. These MAP messages may be transported using 'traditional' TDM based signalling, or over IP using SIGTRAN and an appropriate adaptation layer. The Short Message protocol itself is defined by 3GPP TS 23.040 for the Short Message Service - Point to Point (SMS-PP), and 3GPP TS 23.041 for the Cell Broadcast Service (CBS).
Four MAP procedures are defined for the control of the Short Message Service:
Mobile Originated (MO) short message service transfer;
Mobile Terminated (MT) short message service transfer;
Short message alert procedure;
Short message waiting data set procedure.

MO short message service transfer



Call flow for the Mobile Originated short message service
The diagram to the right depicts a simplified call flow for a successful submission of a mobile originated short message.
When the subscriber sends a short message, the handset sends the text message over the air interface to the VMSC/SGSN. Along with the actual text of the short message, the destination address of the SM and the address of the Short Message Service Centre (SMSC) are included, the latter taken from the handset's configuration stored on the SIM card.
Regardless of the air interface technology, the VMSC/SGSN invokes the MAP service package MAP_MO_FORWARD_SHORT_MESSAGE to send the text to the Interworking MSC of the Service Centre whose address was provided by the handset. This service sends the mo-ForwardSMa[›] MAP operation to the SMSC identified in the SM Submission from the handset, embedded within a Transaction Capabilities Application Part (TCAP) message, and transported over the core network using the Signalling Connection Control Part (SCCP).
The Interworking MSC of the SMSC, on receipt of the MAP mo-ForwardSM message, passes the SMS-PP Application Protocol Data Unit (APDU) containing the text message to the actual Service Centre (SC) of the SMSC for storing, and subsequent 'forwarding' (delivery) to the destination address and the SC returns an acknowledgement indicating success or failure. On receipt of this submission status from the Service Centre, the Interworking MSC will send an appropriate indication back to the VMSC/SGSN of the sending subscriber. The message submission status is then forwarded, over the air interface, to the subscriber's handset.


MT short message service transfer



Call flow for the Mobile Terminated short message service
The figure to the right depicts a call flow for Mobile Terminated short message delivery.For the sake of simplicity, some of the interactions between the VMSC and VLR, and VMSC and Handset, have been omitted.
When the SMSC determines it needs to attempt to deliver a short message to its destination, it will send the SMS-PP APDU containing the text message, the 'B-Party' (destination phone number) and other details to the Gateway MSC (GMSC) logical component on the SMSC. The GMSC, on receipt of this short message, needs to discover the location of the B-Party in order to be able to correctly deliver the text to the recipient (the term Gateway MSC, in this context, indicating an MSC that is obtaining routing information from the Home Location Register (HLR)). To do this, the GMSC invokes the MAP service package MAP_SEND_ROUTING_INFO_FOR_SM, which sends a sendRoutingInfoForSM (SRI-for-SM) MAP message to the destination number's HLR, requesting their present location. This SRI-for-SM message may be sent to an HLR in the same network as the SMSC, or via an interconnect to an HLR in a foreign PLMN, depending on which network the destination subscriber belongs to.
The HLR performs a database lookup to retrieve the B-Party's current location, and returns it in an acknowledgement message to the SMSC's GMSC entity. The current location may be the MSC address the subscriber is currently roaming on, the SGSN address, or both. The HLR may also return a failure, if it considers the destination to be unavailable for short messaging; see the Failed short message delivery section below.
Having obtained the routing information from the HLR, the GMSC will attempt to deliver the short message to its recipient. This is done by invoking the MAP_MT_FORWARD_SHORT_MESSAGE service, which sends a MAP mt-ForwardSMc message to the address returned by the HLR, regardless of whether it is an MSC (Circuit Switched SMS delivery) or an SGSN (Packet Switched SMS delivery).
The VMSC will request the information needed for it to deliver the Short Message to its recipient by sending a Send_Info_for_MT_SMS message to the VLR. The VLR will then instigate a page request, or subscriber search, for the destination subscriber's Mobile Subscriber ISDN Number (MSISDN), and return the result to the VMSC. Since a typical deployment sees the VLR being co-located with the MSC, this message flow is usually internal to the platform.d[›] Should the page or search for the subscriber fail, the VLR will indicate the failure cause to the VMSC which will abort the Short Message delivery procedure and return the failure to the SMSC (see the Failed short message delivery section below). If the page of the handset was successful, the VMSC will then send to the SMSC indicating successful delivery. The GMSC component of the SMSC passes the result of the delivery attempt to the Service Centre. In the case of successful delivery, the delivered text message will be removed from the Store and Forward Engine (SFE) and, if requested, a delivery report sent to the text originator. If the delivery failed, the SMSC invokes a retry procedure to periodically make further attempts at delivery; additionally, it may register with the HLR to receive a notification when the B-Party becomes available for short message delivery in the future (see the Failed short message delivery section below).

Failed short message delivery

When the VMSC/SGSN indicates a short message delivery failure, the SMSC may send a message to the HLR, using the MAP_REPORT_SM_DELIVERY_STATUS procedure, indicating the reason for the delivery failure and requesting that the SMSC be put on a list of service centres wanting to be notified when the destination party becomes available again. The HLR will set a flag against the destination account, indicating that it is unavailable for short message delivery, and store the SMSC's address in the Message Waiting Data (MWD) list for the destination party. Valid flags are Mobile Not Reachable Flag (MNRF), Memory Capacity Exceeded Flag (MCEF) and Mobile Not Reachable for GPRS (MNRG). The HLR will now start responding to SRI-for-SM requests with a failure, indicating the failure reason, and will automatically add the requesting SMSC's address to the MWD list for the destination party. (However if the SRI-for-SM message has priority flag set then the HLR will reply with VLR address if available)
The HLR may be informed of a subscriber becoming available for short message delivery in several ways:
Where the subscriber has been detached from the network, a reattach will trigger a Location Update to the HLR.
Where the subscriber has been out of coverage, but not fully detached from the network, on coming back into coverage it will respond to page requests from the Visitor Location Register (VLR). The VLR will then send a Ready-for-SM (mobile present) message to the HLR.
Where the MS has had its memory full, and the subscriber deletes some texts, a Ready-for-SM (memory available) message is sent from the VMSC/VLR to the HLR.
Upon receipt of an indication that the destination party is now ready to receive short messages, the HLR sends an AlertSC MAP message to each of the SMSCs registered in the MWD list for the subscriber, causing the SMSC to start the Short Message delivery process again, from the beginning.
Additionally, the SMSC will go into a retry schedule, attempting to periodically deliver the SM without getting an alert. The retry schedule interval will depend on the original failure cause - transient network failures will result in short retry schedule, whereas out of coverage will typically result in a longer schedule.-

MAP Transport Protocols

While the MAP 3GPP specifications make some effort to divorce MAP from the layer that transports it, the typical transport is via TCAP which in turn is via SCCP/MTP[1-3] and/or SIGTRAN protocols (SUA, M3UA etc).
A MAP_OPEN construct therefore is directly related to a TCAP_BEGIN with a MAP application context, a MAP_CLOSE is a TCAP_END.
If a message is being delivered using MAP phase 2 or higher, and over MTP rather than SIGTRAN then the maximum MTP PDU size may cause the sender to instigate segmented message sending. This process is not related to concatenation, but simply means that the transaction with the MSC/SMSC/SGSN involves more steps than usual. The recommended way is an empty TCAP_BEGIN, followed by the MAP content within a TCAP_CONTINUE, and completing with a TCAP_END. The TCAP_BEGIN has TCAP related information that would otherwise cause the limit to be exceeded due to the additional fields added by MAP phase 2. The exact point that segmentation is required is dependent on factors such as the length of the addresses but is mainly dependent on the message length itself. 7 bit alphabet messages that are 140 characters or greater are typically subject to the MAP segmentation procedure.
This segmentation procedure is also increasingly followed, and optionally enforced, by carriers to avoid SMS spoofing impacting their customers. This works because the sending party must receive the responses in order to send a message and so their originating address must be correct.

Notes

^ a: In MAP Phase 1, there was no segregation of operation code for Mobile Originated and Mobile Terminated SMS messages, just a generic ForwardSM operation.
^ b: A success indication in these contexts is only a notification that the SM has been submitted to the Service Centre, and does not mean successful delivery to the ultimate destination of the text message.
^ c: Although MAP (phase 2 onwards) specifies a separate operation for mobile terminated short message delivery, often the mo-ForwardSM operation is used instead. Where this is the case, mobile originated and terminated messages are distinguished by the inclusion, in the TCAP dialogue portion, of an appropriate Application Context (AC). The relevant ACs are shortMessageMO-RelayContext and shortMessageMT-RelayContext. This use of a single operation code enables simple backwards compatibility with MAP phase 1 networks, which do not have separate operations for MO and MT short messages.
^ d: These messages are not used by an SGSN.


(source:wikipdia)