IMS Application Level Gateway Overview
IMS Application Level Gateway Overview
IMS used ITEF protocols wherever possible i.e. SIP (Session Initiation Protocols).
ITEF (Internet engineering taskforce) is a protocol factory for internet world. But it does not
define the ways that they are used especially in the mobile domain. 3GPP is the body that took SIP
as a control protocol for multimedia communication and 3GPP has built a finite architecture for SIP
based IP multimedia services machinery (the IMS).
LTE Architecture:
The UE
The UE is the terminal of the IMS architecture and resides with the user. In IMS, the UE
contains a Universal Integrated Circuit Card (UICC) and a
Session Initiation Protocol User Agent (SIP UA).
• If a multi-user game is offered and the user attempts to start the service, the PCRF will determine
whether that user is authorized for the service.
• A network operator may determine that third-party VoIP services are allowed to use Wi-Fi
connections but not cellular connections. When a VoIP application is launched, the PCRF will
determine whether the application may continue.
• If a user attempts to launch a VoLTE call (and is authorized to do so), the PCRF will initiate the
setup of the dedicated bearer.
SIP Compression
SIP is a client server text-based protocol used to create control and terminate the multimedia
session with two or more participants.
SIP includes message, headers, header parameters, extensions, security related information’s etc. So
it causes unexpected and unacceptable delay in setup due to which overall system performance
goes down.
So 3GPP mandate SIP compression for both UE and P-CSCF.
Sigcomp: It is a mechanism that application protocols used to compress message before sending
them across the network.
Sigcomp uses UDVM (Universal decompressor virtual machine) to decompress message.
UE Compressor P-CSCF
Dispatcher
In the first message, information will go, which P-CSCF will save by creating
state/compartment. So that for further SIP message decompression, some information can be used.
No need to share decompression information again and again.
If first 5 bits of message is 1, then it will be clear to decompressor dispatcher that message is
compressed. It will send this message to UDVM. UDVM request previously created states from state
header and use it. UDVM will send this message to application layer after decompression.
Application Layer
Compressor Decompressor
Dispatcher Dispatcher
Transport layer
IP Sec Security:
➔ Negotiation of security mechanism between UE and P-CSCF.
➔ Established a SA during initial registration
➔ In first registration, 401 responses will transport information and negotiate mechanism
which will be uses for SA’s.
➔ SA: - Logical connection between UE and P-CSCF that allow the secure exchange of SIP
message.
➔ SA’s will be created once IK key authentication is done.
UC Respons
Request PS
e
Request
US PC
Response
➔ So CK and IK will be sent from SCSCF TO PCSCF within www authentication header in 401
responses.
➔ IK and CK are removed from header and is stored by P-CSCF (rest will send to UE).
➔ IK: - shared key fir rest of SA’s.
➔ UE calculates the IK from the challenges received in 401 response and use it as shared
key.
➔ After verification of IK is done, SA will be created. SA will have expiry (temporary
lifetime)
➔ While sending 200 OK response to UE, P-CSCF will update the lifetime of set of SA’s.
UE will also update once it gets the 200 OK response.
Re Authentication:
Means new set of SA. So now (1) Old set of SA and (2) New set of SA, are available
➔ P-CSCF has no information about new set of SA, as it does not know whether 200 Ok
response has received by UE. So, P-CSCF will use old set of SA until UE sends any request
on new set of SA.
➔ P-CSCF will send all information in old set of SA and keep both set of SA active until one
of them expires. Same applies to UE.
➔ When UE sends request on new set of SA first time, then P-CSCF will come to know that
new set of SA can be used.
*Note- Old set on SA will nor dropped immediately because response on new set of SA is
not possible for the request which is sent on old set of SA because port number for the
response is defined in Via/Contact header.
➔ HSS is main data storage for all subscriber and service-related data of IMS.
Data: user identities, registration information, access parameters and service triggering
information.
Media Gateways
For detailed descriptions of the gateway interfacing between SIP-based networks and the
legacy PSTN, see RFC 33726.
➔ IMS Media gateway provides user plane link between CS and IMS.
➔ IMS media gateway provide tones and announcement to the CS users.
CASE 2: -
If the breakout is in different network:
When CSCF gets INVITE message and find some incompatibility between two phones that
wants to communicate each other, it passes that information to MRFC. Then MRFC adjusts SIP
message, so that the call flow through MRFP which perform transcode from one to another codec.
Because each of the party is just using its own codec. But still can communicate with the other party,
who use different codec.
S-CSCF
UE MRFC UE
G7
11
G729
MRFP
P-CSCF Discovery:
In order to communicate with the IMS, an item of UE must know at least one IP address of
the P-CSCF. The mechanism by which the UE retrieves these addresses is called “P-CSCF discovery”.
Two dynamic mechanisms for P-CSCF discovery have been standardized in 3GPP: the Dynamic Host
Configuration Protocol’s (DHCP) DNS procedure and the GPRS procedure.
DHCP/DNS Procedure:
In the DHCP DNS procedure, the UE sends a DHCP query to the IP connectivity
access network (e.g., GPRS), which relays the request to a DHCP server. According to [RFC3319] and
[RFC3315], the UE could request either a list of the SIP server domain names of the P CSCF(s) or a list
of the SIP server IPv6 addresses of the P-CSCF(s). When domain names are returned, the UE needs to
perform a DNS query (NAPTR/SRV) to find an IP address of the P-CSCF. The DHCP DNS mechanism is
an access-independent way of discovering the P-CSCF.
Discovering the P-CSCF via DHCP/DNS
Address of DHCP:
I-CSCF Discovery:
UE P-CSCF I-CSCF
IP of I-CSCF
DNS
HSS Assignment:
SLF
(Redirect to HSS 2)
LIA LIR
INVITE INVITE
I-CSCF
S-CSCF Assignment:
S-CSCF will be assign: -
➔ When a user registered with the network.
➔ When S-CSCF is needed to execute services on behalf of unregistered user.
➔ When a previously assigned S-CSCF is not responding.
In S-CSCF assignment sometimes may be user will deregister and customer requirement is,
when it will re-register, same S-CSCF should assign. When it will re-register, S-CSCF will store
its user profile (it tells HSS that user is deregistered, but I am keeping its user profile). This is
done to optimize Cx reference point.
Precondition: (Sec 12.6 page 373 in MIIKKA)
➔ It is a condition to be met before something begins.
➔ Resource reservation is mandatory before starting any session.
➔ Preconditions requires that participants reserve network resources before continuing
the session.
Why Precondition:
➔ Changes of session establishment failure are minimum.
➔ If resource reservation is not done for the session, call will not establish.
➔ To minimize ghost ringing.
PRACK: -
As SDP is shared in 183, PRACK is in picture to make 183 reliable.
UPDATE: -
a=curr: qos local sendrecv
a=curr: qos remote none
a=des: qos mandatory local sendrecv
a=des: qos mandatory remote sendrecv
200 OK: -
a=curr: qos local sendrecv
a=curr: qos remote sendrecv
a=des: qos mandatory local sendrecv
a=des: qos mandatory remote sendrecv
Service Provision: -
Strictly speaking the IMS is not a service in itself; on the contrary, it is a SIP-based
architecture for enabling an advanced IP service and application on top of the PS network. IMS
provides the necessary means for invoking services; this functionality is called ‘service provision’.
IMS service provisioning contains three fundamental steps:
1. Define possible service or service sets.
2. Create user-specific service data in the format of initial filter criteria when a user
orders/modifies a subscription.
3. Pass an incoming initial request to an AS (Application Sever).
APPLICATION SERVER: -
➔ Service provisioning in the IMS is achieved by ASs, which are contacted on the basis
of initial filter criteria.
➔ UE will send SIP request to S-CSCF. Then S-CSCF will go through all IFC (Initial filter
criteria) one by one and, if one or more of them matches, they will send the request
toward the indicated AS.
➔ Filter criteria is downloaded at the time of registration from HSS to S-CSCF in SAR/SAA
message.
Example:
we assume that there are three ASs that have set filter criteria for requests that
originate from Tobias. Tobias’s S-CSCF will check these filter criteria one by one against the
information received in the INVITE request:
Filter criterion #1 does not match, because the P-Asserted-Identity header, which is checked against
the Service Point Trigger (SPT) for the public user identity, does not include Tobias’s tel URL. Filter
criterion #2 does match, because:
➔ the INVITE request is received from the originating user – the S-CSCF knows this
from the user part it set in its Service-Route header entry and which is now returned in the Route
header.
➔ the P-Asserted-Identity is set to one of the public user identities that are
filtered(sip:tobias@[Link]).
➔ the SIP method is INVITE
Consequently, the S-CSCF now has to send the INVITE request to the AS.
When it receives the INVITE request again, the S-CSCF will then evaluate filter criterion #3;
this does not match, because the SIP method is not SUBSCRIBE (as indicated in the SPT).
Consequently, the S-CSCF will continue with its normal routing procedures, (i.e., it will send the
INVITE request to the I-CSCF of Theresa’s home network). Because service provisioning further
complicates the routing, no further attention is paid to it throughout this example; the Via, Route
and Record-Route headers added here will likewise not be shown in the rest of this example.
Whenever a user obtains an IMS subscription and their subscription contains some value-
added services or an operator is willing to utilize ASs as part of its IMS infrastructure, they need to
create service-specific data. These service-specific data are part of the user’s user profile. More
precisely, service-specific data are represented as initial filter criteria.
When constructing initial filter criteria an operator needs to consider these questions:
➔ What is a trigger point?
➔ What is the correct AS when the trigger point is met?
➔ What is the priority of an initial filter criterion?
➔ What should be done if the AS is not responding?
The trigger point is used to decide whether an AS is contacted. It contains one to multiple
instances of a Service Point Trigger.
The Service Point Trigger comprises the items shown in Figure:
Based on the above an operator could build, for example, initial filter criteria to handle
unregistered users, such as an IMS user who has not registered any of their public user identities.
The following initial filter criterion routes an incoming session to a voice mail server (sip:
vmail@[Link]) when the user is not registered. To make this happen the operator has to
set a SIP Method to match INVITE and a session case to match the value of Terminating Unregistered
(value 2). If the voice mail server cannot be contacted, then the default handling should be that the
session is terminated (value 1). Initial filter criteria are coded in XML.
Selection of AS
Initial filter criteria are downloaded to the S-CSCF on user registration or on a terminating
initial request for an unregistered user. After downloading the user profile from the HSS, the S-CSCF
assesses the filter criteria for the initial request alone, according to the following steps [3GPP TS
24.229]:
1. Check whether the public user identity is barred; if not, then proceed.
2. Check whether this request is an originating request or a terminating request.
3. Select the initial filter criteria for a session case (originating, terminating, or originating/
terminating for an unregistered end user).
4. Check whether this request matches the initial filter criterion that has the highest priority
for that user by comparing the service profile with the public user identity that was used to place
this request:
➔ if this request matches the initial filter criterion, then the S-CSCF will forward this
request to that AS, check to see whether it matches the next following filter criterion of
lower priority and apply the filter criteria on the SIP Method received from the
previously contacted AS.
➔ if this request does not match the highest priority initial filter criterion, then check to see
whether it matches the following filter criterion’s priorities until one does match.
➔ if no more (or none) of the initial filter criteria apply, then the S-CSCF will forward this
request based on the route decision.
There exists one clear difference in how the S-CSCF handles originating and terminating
initial filter criteria. When the S-CSCF realizes that an AS has changed the Request-URI in the case of
terminating initial filter criteria, it stops checking and routes the request based on the changed value
of the Request-URI. In an originating case the S-CSCF will continue to evaluate initial filter criteria
until all of them have been evaluated.
If the contacted AS does not respond, then the S-CSCF follows the default-handling
procedure associated with initial filter criteria: that is, either terminate the session or let the session
continue based on the information in the filter criteria. If the initial filter criteria do not contain
instructions to the S-CSCF regarding the failure to contact the AS, then the S-CSCF will let the call
continue as the default behavior [3GPP TS 24.229].
According to our initial filter criteria example, incoming INVITE requests will be routed to a
voice mail server, vmail@[Link], when Joe is not registered in the network. In
exceptional cases, when the voice mail server is not responding, the S-CSCF is instructed to release a
session attempt.
AS Behavior: -
After receiving the request, the AS initiates the actual service. To carry the service
out the AS may act in three different modes:
➔ Terminating User Agent (UA) – the AS acts as the UE. This mode could be used to
provide a voice mail service.
➔ Redirect server – the AS informs the originator about the user’s new location or about
alternative services that might be able to satisfy the session. This mode could be used
for redirecting the originator to a particular Web page.
➔ SIP proxy – the AS processes the request and then proxies the request back to the S-
CSCF. While processing, the AS may add, remove or modify the header contents
contained in the SIP request according to the proxy rules specified in [RFC3261].
➔ Third-party call control/back-to-back UA – the AS generates a new SIP request for a
different SIP dialog, which it sends to the S-CSCF.
Charging Architecture:
OFFLINE CHARGING:
➔ Each IMS entity having its own CTF (Charging trigger function)
➔ CTF is capable to take decision when it needs to be triggered.
EX: Session Initiation, Session Modification, Session Termination, sending message,
Subscribe to an event.
ONLINE CHARGING: -
Direct debiting
Unit reservation.
Direct Debiting: -
➔ IMS contact OCS and ask permission to grant its resources/Services.
➔ OCS use internal rating function to find appropriate tariff and the price.
➔ OCS checks whether user has enough credit in the account. If so, OCS deducts suitable
amount of money from user account and grant its permission to use IMS network.
➔ It is used when IMS entity knows it could deliver the request/services to the user.
Unit Reservation: -
➔ OCS receives a credit control request from IMS entity.
➔ OCS use internal rating function to find the price of the services.
➔ OCS reserve the resources including (time and money) according to services.
➔ When request complete, IMS entity informs OCS the number of resources consumes and
OCS deducts the amounts.
➔ IT is used when IMS entity is usable to determine whether the services could be
delivered or when the required number of resources are not known prior to the use of
specific services.
Charging Reference Point: -
Rf Interface:
Ro Interface: -
Rx Reference Point: -
P-CSCF PCRF
Rx
➔ P-CSCF AND PCRF passes charging identifire to each other through Rx Interface.
➔ Some events (trffic plane events)
Ex: Bearer release, Bearer lost and Bearer recovered.
PCRF will receive them from [Link] and send to P-CSCF.
➔ P-CSCF will perform additional operations from IMS charging entitires through Rf and Ro
interfaces.
Gx Reference Point: -
DIAMETER PROTOCOL:
Here we have noted some of the major points in DIAMETER protocol that would help you to
walk through the whole protocol in just few minutes.
2) Diameter Default port is 3868 for TCP/SCTP and 5868 for TLS/DTLS.