<

SIP VOIP

Published on
12,086 Points
3,486 Views
1 Endorsement
Last Modified:
Approved
How Sip Phone (User Agent) works and communicates with sip servers

1.  There is a sip server and a sip registrar.
 
The sip server and sip registrar can be one server or two different servers. The sip registrar is the server on which it is recorded that a phone number is on a certain ip address and port.

When someone wants to talk to that number he sends INVITE request to his SIP server with the phone number.

 Sip server through the registrar finds out what is the according ip, where to resend the INVITE request.

 According to RFC 3261 (http://tools.ietf.org/html/rfc3261 section 8.3): The "expires" parameter of a Contact header field value indicates how long the URI is valid.  The value of the parameter is a number indicating seconds.  If this parameter is not provided, the value of the Expires header field determines how long the URI is valid.

Then a 2xx response (200 OK) on REGISTER request is received.  It has Contact header expires or an Expires header, with the value in seconds when the Register is expiring. Before this value the device must send a new REGISTER request. Here there is an example of REGISTER and its response: http://wiki.snom.com/Networking/SIP/Registration.

2.  Next is the SDP(http://tools.ietf.org/html/rfc4566). SDP is sent with the INVITE request and a 200 OK response and ACK request. Through it the sip user agents are negotiating the media voice, video.

These are the codecs G711, G729, T38 and others. The user agents must have at least one common codec so as to be able to communicate.

Every user agent must support G711 G711A, G711U codec, as far as I can remember. There exists servers that supports two media for the two user agents that communicate like Asterisk sip server.

3. Dial plan - http://routerjockey.com/2009/09/08/cisco-voip-basics-cisco-dial-plans/.
 With dial plan usually user can dial one or another sip server if the configuration allows to configure more than one sip account, directly another line on the device, MGCP or H323.

4. Next the user should correctly configure FXS, E1 and T1 ports.

5. The next issue is when the device is behind NAT.
http://freshmeat.net/articles/nat-traversal-for-the-sip-protocol 
http://www.cisco.com/en/US/netsol/ns340/ns394/ns165/ns391/networking_solutions_design_guidance09186a00801f8e30.html#wp40549 .
http://tools.ietf.org/html/rfc6314

6. And last cisco call flow examples. You can monitor/sniff your device on uplink when you put the outgoing interface and a computer in the same network and use Wireshark with filter ether host mac, where mac is the mac address of the outgoing interface to see what in fact is going on. http://www.cisco.com/univercd/cc/td/doc/product/voice/sipsols/biggulp/bgsipcf.htm
User should be able to see the call flows for your sip traffic. You can use Wireshark->Statistics->SIP, Wireshark->Statistics->Voip Calls menus to analyse the traffic.

7. T38 codec is usually used for sending faxes;

8. Quality of service for good quality of speech http://www.voip-info.org/wiki/view/QoS

9.  DNS can give ips for servers supporting sip in the network http://www.voip-info.org/wiki/view/DNS+SRV (http://tools.ietf.org/html/rfc3263)

10. The Real-time Transport Protocol (RTP) defines a standardized packet format for delivering audio and video over IP networks. RTP is used extensively in communication and entertainment systems that involve streaming media, such as telephony, video teleconference applications, television services and web-based push-to-talk features.
RTP is used in conjunction with the RTP Control Protocol (RTCP). While RTP carries the media streams (e.g., audio and video), RTCP is used to monitor transmission statistics and quality of service (QoS) and aids synchronization of multiple streams. RTP is originated and received on even port numbers and the associated RTCP communication uses the next higher odd port number.

In VOIP the speech is first encoded through some codec and then carried through internet with RTP packets.

http://en.wikipedia.org/wiki/RTP_Control_Protocol
http://www.voip-info.org/wiki/view/RTP
1
Author:user_n
Ask questions about what you read
If you have a question about something within an article, you can receive help directly from the article author. Experts Exchange article authors are available to answer questions and further the discussion.
Get 7 days free