Sip Basic SyVe
Sip Basic SyVe
Budapest
Laszlo Juhasz 05/05/2014
For internal use only
1 © Nokia Siemens Networks
Agenda
I-CSCF
S-CSCF P-CSCF
S-CSCF
P-CSCF
PS Network
PS Network
UE
eNb UE
4G/3G/2G I-CSCF
eNb
4G/3G/2G
• MMUSIC WG: develop protocols to support Internet teleconferencing sessions (SDP, SAP)
• impp WG (Instant Messaging and Presence Protocol): common profile (protocol independent)
for presence and messaging -> SIP based solution in SIMPLE WG
HTTP look-alike
Hierarchically organized three digit codes: status code - text
associated with the code
Provisional and final responses divided into 6 response classes:
• 1xx responses are informational messages e.g., 180 Ringing
• 2xx response shows a successful transaction e.g., 200 OK
• 3xx responses are redirect messages e.g., 301 Moved
Permanently
• 4xx responses indicate errors in requests e.g., 400 Bad Request
• 5xx responses indicate server errors e.g., 500 Version not
supported
• 6xx responses indicate global failures e.g., 600 Busy everywhere
For most codes, software only has to know the class of the status
code
For internal use only
16 © Nokia Siemens Networks
SIP Addressing
SIP is about communication between users at hosts, identified by
SIP/SIPS URIs, which take the form sip:user@host[parameters]
[headers]
• user is a user name or a telephone number
• host is a domain name or numeric network address
• parameters define the specific parameters of URL: transport, time to live
• headers is another, rarely used form, to pass extra information
Examples of SIP URLs
• sip:[email protected]?subject=callme
• sip:[email protected];transport=tcp;user=phone
• sip:[email protected];method=MESSAGE
SIPS URI
• Secure URI, TLS is used end-to-end
Other schemes: tel, im, pres …
Types of addresses
• AOR: Address of Record -> identifies a use
– e.g. sip:[email protected]
– Need DNS NAPTR/SRV record to resolve it
– Tutorial for DNS NAPTR/SRV:
http://anders.com/cms/264/SIP/DNS/NAPTR/SRV/dnscache/tinydns
v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com
s=-
c=IN IP4 192.0.2.101
t=0 0
m=audio 49172 RTP/AVP 0
a=rtpmap:0 PCMU/8000
Contact
Max-Forwards
Common headers
To: It specifies the logical call destination, (usually AoRs), It has no use in SIP,
target is defined by RURI
From: It specifies the logical call source, (usually AoRs)
This headers must be present in all SIP messages
The value of these fields in responses are copied from the request
UA1 UA2
INVITE
From: Name1 <sip: [email protected]>
To: Name2 <sip:[email protected]>;user= phone
200 OK
From: Name1 <sip: [email protected]>
To: Name2 <sip:[email protected]>;user= phone
Proxy
UA1 UA2
INVITE INVITE
Via: SIP/2.0/UDP host.com:5060; Via: SIP/2.0/UDP proxy.com:5060; branch=
branch= Via: SIP/2.0/UDP host.com:5060; branch=
200 OK
Via: SIP/2.0/UDP proxy.com:5060; branch=
200 OK
Via: SIP/2.0/UDP host.com:5060; branch=
Via: SIP/2.0/UDP host.com:5060;
branch=
Call-ID: [email protected]
CSeq: 1 INVITE
UA1 UA2
INVITE Call-ID: 123@UA1host CSeq: 1 INVITE
200 OK Call-ID: 123@UA1host CSeq: 1 INVITE
ACK Call-ID: 123@UA1host CSeq: 1 ACK
Contact: <sip:[email protected];transport=tcp>
Contact indicates location of redirection
• used in INVITE, ACK and REGISTER requests and 1xx, 2xx, 3xx and 485 (Ambiguous)
responses
• indicates addresses where user can be located; allows bypassing proxies
Can be any suitable location where caller can be reached: not limited to SIP URLs
• e.g., phone, pager, mailto, http, ...
Fields
• q location preference
• service service provided by terminal: IP, PSTN, pager, ...
• media media supported by terminal: audio, video, ...
• description display to caller
• class business, residence
• expires expiration time
• features other features of this address
• language languages spoken by answering party
• priority “only in case of emergency”
Max-Forwards: 70
Mandatory header
Max-Forwards value is decremented by every proxy
If reaches 0 the request is responded with a 483 Too Many Hops
responses.
Used for loop detection
Content-Type: application/sdp
Content-Length: 151
Content-Type: It describes the media type of the message
body
Content-Length: The number of octets in the message body
• It is mandatory in SIP messages sent over stream based
protocols (e.g. TCP)
183 183
183 Record-Route: <proxy1>
Record-Route: <proxy1> Record-Route: <proxy1>
Prack
Route: <proxy1> Prack
Stateless
• A proxy that forwards every request it receives
downstream and every response it receives upstream
• No states are maintained
For internal use only
36 © Nokia Siemens Networks
SIP Registration
home.com
Location
server
2. [email protected]
at 172.22.21.22
example.hu 1. REGISTER sip:home.com
From: <sip:[email protected]>
To: <sip:[email protected]>
Contact: <sip:172.22.21.22>
Expires:3600
SIP
3. 200 OK
Registrar
home.com
Location
server
SIP
Ws-sbdy
2. somebody
example.hu
3. 172.22.21.23
[email protected] 1. INVITE
[email protected] 4. INVITE
172.22.21.23
SIP
6. 200 OK
5. 200 OK
8. ACK
7. ACK
172.22.21.23
[email protected]
example.hu 2. somebody
1. INVITE
[email protected] [email protected]
3. etsi.org
Location
SIP
4. 302 Moved temporarily server
Contact: [email protected]
5. ACK home.com
[email protected]
etsi.org
6. INVITE [email protected]
7. 200 OK SIP
8. ACK [email protected]
DNS
SIP
Outbound Inbound Proxy
Proxy Server Server
SIP
SIP
SIP
Media (RTP)
C r i S
l 180 v e 200 Ok e
i e n 200 Ok r
e r t v
n 200 Ok e
t r
ACK
BYE
200 Ok
UAC UAS
180 Ringing (Answer SDP 2)
180 Ringing
ACK
180 Ringing
200OK 200OK
200OK
ACK ACK
ACK
Note:
- PRACK does not require these sequences
- Simple RFC3261 exchanges still apply
UAC UAS
200OK
ACK
MESSAGE MESSAGE
200 OK 200 OK
7. 200 OK
1. MESSAGE
<Can you 5. MESSAGE
talk now?> 8. 200 OK <Can you
talk now?> 6. 200 OK
9. 200 OK
7. MESSAGE
<Sure.> 8. 200 OK
1. MESSAGE 10. 200 OK
<Sure.>
Can be performed
• In the Session setup
• During the Session
<character>=<value>
• There are no spaces allowed on either side of the ‘=’
sign.
Value= parameter1 parameter2 … parameterN
• There is exactly one space between each parameter
Always set to 0
v=0
v=0
o=bob 289084526 28904529 IN IP4 labpc1.nokia.com
s=-
c=IN IP4 123.123.14.2
t=0 0
m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=recvonly
The client MUST NOT generate a new offer if it has received an offer which it
has not yet answered or rejected
UA 1 UA 2
offer
offer
UA 1 UA 2
offer
offer
UA 1 UA 2
Offer
m=audio 49170 RTP/AVP 0 8 97
m=Video 49172 RTP/AVP 31 32
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 97 m=audio 49170 RTP/AVP 0 8 97
m=Video 49172 RTP/AVP 31 32 m=Video 49172 RTP/AVP 31 32
Answer Answer
m=audio 55220 RTP/AVP 0 8 97 m=audio 55220 RTP/AVP 0 8 97
m=Video 55222 RTP/AVP 31 32
UA 1 UA 2
Offer
m=audio 49170 RTP/AVP 0 8 97
m=Video 49172 RTP/AVP 31 32
Answer
m=audio 55220 RTP/AVP 0 8 97
m=Video 0 RTP/AVP
UA 1 UA 2
Offer
m=audio 49170 RTP/AVP 0
m=audio 49172 RTP/AVP 8
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP 31 32 m=Video 49172 RTP/AVP 31 32
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 55222 RTP/AVP 31 32 m=Video 55222 RTP/AVP 31 32
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP 31 32 m=Video 49172 RTP/AVP 31 32
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 55222 RTP/AVP 31 32 m=Video 55222 RTP/AVP 31 32
Audio format 0 Audio format 0
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP 31 32
The i-th media stream in the previous SDP, counting from the top, matches
the i-th media stream in the new SDP, counting from the top.
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP 31 32 m=Video 49172 RTP/AVP 31 32
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 55222 RTP/AVP 31 32 m=Video 55222 RTP/AVP 31 32
Audio format 0 Audio format 0
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=Video 49172 RTP/AVP 31 32
m=Video 49172 RTP/AVP 31 32 m=audio 49170 RTP/AVP 0 8
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP 31 32 m=Video 49172 RTP/AVP 31 32
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 55222 RTP/AVP 31 32 m=Video 55222 RTP/AVP 31 32
Audio format 0 Audio format 0
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=Video 49172 RTP/AVP 31 32
m=Video 49172 RTP/AVP 31 32
m=game 49172 udp text
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP m=Video 49172 RTP/AVP 31 32
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 55222 RTP/AVP m=Video 55222 RTP/AVP 31 32
Audio format 0 Audio format 0
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 0 RTP/AVP
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 0 RTP/AVP m=Video 0 RTP/AVP
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 0 RTP/AVP m=Video 0 RTP/AVP
Audio format 0 Audio format 0
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 0 RTP/AVP m=game 49172 udp text
m=game 49172 udp text
UA 1 UA 2 UA 1 UA 2
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP a=recvonly
Answer Answer
m=audio 55220 RTP/AVP 0 8 m=audio 55220 RTP/AVP 0 8
m=Video 55222 RTP/AVP a=sendonly
Audio format 0 Audio format 0
Offer Offer
m=audio 49170 RTP/AVP 0 8 m=audio 49170 RTP/AVP 0 8
m=Video 49172 RTP/AVP a=inactive
a=sendonly m=Video 49172 RTP/AVP
a=sendonly