Session Initiation Protocol (SIP) is a signaling protocol used for initiating, maintaining, and terminating communication sessions that include voice, video and messaging applications. It operates on the OSI application layer.
The secure version of SIP is SIPS, and adds TLS encryption.
SIP Elements
SIP has elements or entities.
SIP elements:
- User agent
- User agent client
- User agent server
- Back to back user agent
- Presence agent
- SIP gateway
- Proxy server
- Stateful
- Staless
- Redirection server
- Registrar
A user agent (UA) is an entity that interacts with the user through an interfaces. It has an user agent client (UAC) to make requests and a user agent server (UAS) to reply to requests.
A back to back user agent (B2BUA) takes a request, transforms it and send it forward as a new request. It does the same with replies.
B2BUA may be used for anonymization of replies and for Application layer gateway (ALG).
A presence agent receives subscription requests and send notifications.
A SIP gateway connects a SIP network to other types of networks.
Examples of SIP gateways: SIP-H.323 and SIP-RTC.
A proxy server may provide authentication, routing and security.
A redirection server provides an alternative route to a UA.
A registrar is a SIP endpoint that provides a location service and processes registry requests from UA.
A registrar contains the relationship between a URI and IP addresses.
It accepts REGISTER requests, recording the address and other parameters from the user agent. For subsequent requests, it provides an essential means to locate possible communication peers on the network.
SIP Protocols
Protocols used in SIP:
- RTP
- RTCP
- RTSP
- H.248 / MEGACO
- SDP
Bypassing Firewalls and NAT in SIP
Solutions to bypass firewalls and NAT in SIP:
- VPN
- ICE STUN+TURN
- ICE UPnP-IGD
- NAT-PMP
Interactive Connectivity Establishment (ICE) is based on STUN and TURN.
Simple Traversal of UDP through NATs (STUN) is a client-server protocol allows a terminal behind a NAT to know its public address and port.
STUN is defined on standard RFC 3489.
Traversal Using Relay NAT (TURN) is a protocol that allows a terminal behind a firewall to receive inbound data through TCP or UDP connections.
An alternative to STUN and TURN is using UPnP.
UPnP is a protocol that allow terminals to communicate to firewall/NET through the Internet Gateway Protocol (IGD).
NAT-PMP (Port Mapping Protocol) allows automatize the process of sending forward the port translation.
You might also be interested in…
External References
- Wikipedia community; “Session Initiation Protocol“; Wikipedia