What is SIP?
SIP or Session Initiation Protocol is in an application layer protocol used to initiate, manage, terminate and control multimedia communication sessions such as voice and video calls across a network. It typically uses TCP or UDP port 5060 for non-encrypted sessions and port 5061 for encrypted ones.
Like HTTP, SIP uses the client-server architecture. A SIP User Agent Client sends the SIP request by initiating a call and the SIP User Agent Server receives the request by answering it and sending a response.
Voice and Video stream in SIP application is commonly carried over RTP (Real-time Transport Protocol) while parameter such as port number, protocols and codecs to use are defined using the SDP (Session Description Protocol)
Common SIP Requests:
- Invite - used to initiate session
- Ack - used to confirm an established session
- Bye - used to terminate session
- Options - SIP capability inquiry
- Register - used for account to IP address binding
- Cancel - used to cancel a pending invite
- Refer - used in call transfers
- Message - used for sending information
- Info/Update - used in DTMF or update configuration
- Subscribe/Notify - used in Busy Lamp Fields and MWI
- Prack - used for provisional acknowledgement
Common SIP Response Codes:
- 100 - Information
- 200 - OK
- 300 - for Call Redirection
- 400 - Client Error
- 404 - Not Found
- 500 - Server Failure
- 600 - Global Failure
Sample SIP Log
SIP REQUEST
REGISTER sip:192.168.1.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.101:2051;branch=z9hG4bK-xq7i85k7bx0k;rport
From: sip:1001@192.168.1.1;tag=sin8ipdsx9
To: sip:1001@192.168.1.1
Call-ID: 3c26700d77a1-8u2cyoo4l3jh@snom360-000413237D2E
CSeq: 132639 REGISTER
Max-Forwards: 70
Contact: ;flow-id=1;q=1.0;+sip.instance="";audio;mobility="fixed";duplex="full";description="snom360";actor="principal";events="dialog";
methods="INVITE,ACK,CANCEL,BYE,REFER,OPTIONS,NOTIFY,SUBSCRIBE,PRACK,MESSAGE,INFO"
User-Agent: snom360/6.5.20
Supported: gruu
Allow-Events: dialog
X-Real-IP: 192.168.1.101
Expires: 3600
Content-Length: 0
SIP RESPONSE:
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.1.101:2051;branch=z9hG4bK-xq7i85k7bx0k;rport=2051
From: sip:1001@192.168.1.1;tag=sin8ipdsx9
To: sip:1001@192.168.1.1;tag=c3d011ad45
Call-ID: 3c26700d77a1-8u2cyoo4l3jh@snom360-000413237D2E
CSeq: 132639 REGISTER
Contact: ;expires=31
Content-Length: 0
SOURCES: Wikipedia and RFC3261
NOTE TO TECH WRITER:
please do add the image found on the link below
http://10.1.0.70/wiki/index.php/Image:Sip-flow.JPG




