SIP Overview
SIP Overview
Priyanka Agarwal
Overview
SIP History
SIP Introduction
SIP Architecture
SIP Protocol
Basic Call Flows
SIP Headers
SIP Methods
Registration Process
Sample Call Flow
SIP History
Servers
Proxy server - stateful or stateless
Redirect server - a server that redirects a client to contact another server
to complete its request.
Registrar(location server) - a server that accepts REGISTER requests, and
then places that information into the location service.
Clients
user-agent client - Application programs sending SIP requests
user-agent server - Responds to clients’ requests
Gateways - Provide call control.
SESSION, DIALOG and TRANSACTION
*message-header
CRLF
[message-body]
Schemes: SIP/SIPS/TEL
Invite
200 OK
ACK
Media Session
BYE
200 OK
SIP Headers
Mandatory Headers
Frequently used Headers
SIP Headers
Mandatory SIP headers
Any valid SIP request must contain the following six mandatory SIP
Headers
TO
FROM
CSeq
Call-ID
Max-Forwards
Via
The TO Header
Indicates the logical identity of the initiator of the request, possibly the user’s
address-of-record.
Requests sent by the callee to the caller use the callee’s address in the FROM
header field.
Must be the same for all Requests and Responses sent by either UA in a
dialog.
Must be selected by the UAC as a globally unique identifier over space and
time.
No human interface is required for the selection of the Call-ID header field
value for a request.
THE CSeq Header
Serves to limit the number of hops a request can transit on its way to
destination.
Indicates the path taken by the request so far and indicates the path that
should be followed in routing responses.
Must contain a branch parameter (to identify the transaction created by that
request.
The Contact Header
The Contact header field value provides a URI whose meaning depends on
the type of request or response it is in.
SIP/2.0 200 OK
SIP/2.0 200 OK
……
……
Contact: <sip:[email protected]>
Contact: <sip:[email protected]>
……
……
SIP/2.0 200 OK
……
SIP/2.0 200 OK Contact: <sip:[email protected]>
SIP/2.0 200 OK ……
…… Record-Route: <sip:p2.biloxi.com;lr>
Contact: <sip:[email protected]> Record-Route: <sip:p1. atlanta.com;lr>
Contact: <sip:[email protected]> Record-Route: <sip:p2.biloxi.com;lr>
……
The CSeq number is never incremented for an ACK, but the CSeq
method is changed to ACK.
For 2xx responses, ACK is end-to-end, but for all other final responses,
it is done on a hop-by-hop basis.
A Discovery mechanism.
A client sends a REGISTER request to a special type of UAS known as REGISTRAR.
A registrar creates bindings in a location service for a particular domain that
associates an address-of-record URI with one or more contact addresses.
A registrar acts as the front-end to the location service for a domain, reading and
writing mappings based on the contents of the REGISTER requests.
A REGISTER request does not establish a dialog.
REGISTER request Example
REGISTER Bob -> Registrar
SIP/2.0 200 OK
Via: SIP/2.0/UDP
bobspc.biloxi.com:5060;branch=z9hG4bKnashds;received=192.
0.2.4
To: Bob <sip:[email protected]>;tag=2493k59kd
From: Bob <sip:[email protected]>;tag=456248
Call-ID: 843817637684230@998sdasdh09
CSeq: 1826 REGISTER
Contact: <sip:[email protected]>
Expires: 7200
Content-Length: 0
SIP in Networks
OSP 2.4
Service
Service
MRF 1
2
SIP Fep
NGN SS7
SIP
SIP,RTP
MGC &
MG
SS7, Vo ic e SPs
SS7, Vo ic e
PSTN PLMN
-
Sample Call Flow(INAP to SIP)
Fep
MGC MGC IN Service MRF
NGN
B A
INVITE
IDP
100 Trying
CTR (A)
INVITE
180 Ringing
180 Ringing
ACK
200 Ok
ACK
CTR Report
DFC(A)
BYE
200 OK
CONNECT
INVITE
200 OK
ACK
Re-INVITE
200 OK ERBCSM(O_A
nswer)
ACK
ACK
Media Session
BYE
200 OK
INVITE Example
F1 INVITE Alice -> atlanta.com proxy
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
Max-Forwards: 70
To: Bob <sip:[email protected]>
From: Alice <sip:[email protected]>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 142 TRYING
F2 100 Trying atlanta.com proxy -> Alice
SIP/2.0 200 OK
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
;received=192.0.2.1
To: Bob <sip:[email protected]>;tag=a6c85cf
From: Alice <sip:[email protected]>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 131
F11 200 OK atlanta.com proxy -> Alice
SIP/2.0 200 OK
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
;received=192.0.2.1
To: Bob <sip:[email protected]>;tag=a6c85cf
From: Alice <sip:[email protected]>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 131
F12 ACK Alice -> Bob
BYE
F12 ACK Alice -> Bob
BYE
F14 200 OK Alice -> Bob
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10
From: Bob <sip:[email protected]>;tag=a6c85cf
To: Alice <sip:[email protected]>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 231 BYE
Content-Length: 0