Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/
1. Definition of VoIP: voice services with certain service quality transmitted over an IP network.
2. Key VoIP technologies:
Speech Processing Technology
- Minimize the bit rate (voice encoding technology, voice detection and suppression technology) while ensuring a certain speech quality)
- Ensure certain call quality in the IP environment (packet loss compensation, Echo offset, and dejitter)
Voice Communication Protocol
- Call Control Protocol
- Voice Data Transfer Protocol
- Real-time Control Protocol
Speech Codec Technology: Bit Rate, latency, complexity, and speech quality. g.723.1 and g.729a are good!
Others: QoS, security, management ,......
3. VoIP protocol structure
User data plane: Voice/RTP/udp/IP
Control Plane
- ITU-T: multi-media communication system based on grouping network-H.323
- IETF: Internet Multimedia conference structure-sip
H.323-based VoIP architecture vs SIP-based VoIP Architecture
4. IP Phone Technology Based on H.323
1) system structure:
An umbrella protocol family that specifies the composition, protocol, and process of multimedia communication over a group-based network.
- Terminal: client point that provides two-way multimedia communication
- Gateway: connect a heterogeneous network or terminal to an H.323 Network
- Network GUARD: Provides management capabilities for H.323 endpoints (gateways, network guard, terminals) and call control processes.
- Multi-point control unit: provides control and media processing support for meetings
Note: The concept of domain-a domain is a collection of all terminals, gateways, and multi-point control units. A domain contains at least one terminal and has only one GK (Network guard) for management, it is unrelated to the network topology, that is, it can be composed of multiple segments connected by routers or other devices.
2) protocol structure:
Call Control CHannel: transmits H.245 Connection Control messages between the endpoint and the network guard, and between the network guard and the network guard. The main functions are capability switching, opening/disabling logical channels, Master/Slave determination, traffic control, round-trip latency determination, loop maintenance, terminal capability set negotiation, meeting control, and session termination.
Call signaling channel: The H.225.0 call control message is sent between the endpoint and the network guard, and between the network guard and the network guard to establish and remove the call (similar to the Message q.931 ), h.225.0 the call signaling protocol only provides call control.
For Connection Control.
Ras signaling channel: transmits the H.225.0 Ras message between the endpoint and the network guard, and between the network guard and the network guard. The functions of Ras signaling are website discovery, endpoint registration, endpoint location, status query, resource indication, call acceptance, bandwidth management, call exit, and end point cancellation.
3) network structure:
Typical H.323 VOIP network instances
3) Call Model
Direct signaling:
Ingress:
4) call communication process
- Before call establishment (H.225.0 RAS): the terminal performs GK discovery through the RAS signaling, and the terminal registers with the GK and requests for call acceptance.
There are two ways to discover the Internet GUARD:
- Manual mode: complete through endpoint Configuration
- Automatic mode: the discovery process is completed through the network guard, for example:
The registration and request for call acceptance process is as follows:
- Phase 1: Call Control (H.225.0 call signaling)
The figure shows the simplest call signaling interaction process. The gateway Directly Interacts with each other without passing through the Keeper.
The entire call signaling establishment process can be simplified to two steps: "setup" and "Connect ". Of course, you can use "Release complete" to release call signals.
The interaction process shown in the figure also has optional steps, such as "Call proceeding", "progress", and "alerting ". These steps are mainly used to avoid timeout errors and provide in-band broadcast and other services.
- Phase 2: capability exchange and Master/Slave determination (H.245)
- Phase 3: Establish an AV channel (H.245)
- Phase 4: stable (RTP/RTCP, H.245): voice communication, bandwidth change, etc.
- Phase 5: Call release
Flowchart:
1)T1 sends an accesskey request (Admission request) to the Keeper ).
2)The Keeper confirms the ARQ of T1 and sends the ACF back to T1.
3)T1 sends the "setup" message to T2.
4)T2 sends a "Call proceeding" response to T1, indicating that the call is being established. At this time, if T2 has been registered with the Keeper, it is transferred to 6 ).
5)Register at keeper on T2.
6)T2 sends "alerting" information to T1, indicating that T2 is creating a call.
7, 8)T2 sends a "Connect" message to T1, indicating that a call connection has been established between T1 and t2.
9)-16)That is, T1 (T2) sends a request to t2 (T1), and T2 (T1) confirms the request to T1 (T2.
17)-20)Media transfer process. RTP is used to provide the end-to-end real-time transportation function, but does not guarantee the service quality. The supporting RTCP is used to ensure the service quality.
21)-25)Call release process. T1 and t2 send the "End session command" message H.245 to the other party to release the call connection. T2 sends the H.225 signaling message "Release complete" to T1 to release the call connection. T1 and t2 log out from the Keeper respectively.
6) problems:
- Complexity: The call control process is complex, and the H.225, H.245, and ASN.1 encoding methods are complex.
- Compatibility issues: H.323 V1, V2, V3, V4... Backward compatibility
- Scalability: H.323 is not conducive to supporting a large number of advanced system features, and is not conducive to the introduction of a large number of competitive businesses
5. SIP-based IP phone technology (see another article on this blog: SIP generic)
1) Basic Concept: SIP: Session Initiation Protocol (IETF rfc3261), developed by IETF, is an application layer signaling protocol used to add users to multimedia sessions. SIP is a lightweight universal signaling protocol that allows you to establish, modify, and terminate voice and multimedia sessions on IP networks.
2) differences with H.323 Systems
- Different Signaling Protocols: SIP is based on text and H.323 is based on ASN.1 (Abstract syntax definition ASN.1 is a standard method used to describe the Information Format transmitted over the network .)
- Different request negotiation processes: the SIP Session Request Process and media negotiation process are performed together. Therefore, the call establishment time is short, in H.323, the call establishment process and the signaling control process for media parameters negotiation are separated.
- The control plane has different network structures: H.323 is a peer-to-peer structure, and SIP is a customer/Server structure. H.323 for centralized and hierarchical control. Although centralized control is easy to manage (such as billing and bandwidth management), the multi-point control unit that implements the conference control function in H.323 may become a bottleneck when it is used to control large conference calls. Similar to other Internet protocols, SIP is designed to serve the distributed call model and has a distributed multicast function.
- Different extension ideas: H.323 defines specialized protocols for implementing supplementary services, such as h.2.1, h.2.2, and h.20..3. As long as sip fully utilizes the defined header domain, if necessary, simple extension of the origin domain can easily support complementary or intelligent services.
3) network structure: omitted
Appendix: proxy and redirect server comparison
4) SIP protocol stack structure
5) Basic sip Functions
- User Positioning
- User availability Determination
- User capability negotiation
- Session Creation
- Session management
6) sip Basic Call Control Process
General situation:
Direct signaling process:
Proxy signaling process:
Redirection signaling process:
7) Advantages of SIP
- Simple and scalable: lightweight, 7 methods, 44 header domains. The extension feature provides a framework for value-added services by adding new methods and new header domains.
- Good scalability
- Supports terminal mobility
- Transport Layer independence
- Easy to integrate with Web Applications
- SIP: Internet...
8) the advantages of SIP gradually replace H.323
- Protocol functional modules: in the SIP functional modules, the user agent is equivalent to an H.323 terminal (or a gateway on the group exchange network side), and the SIP server is equivalent to an H.323 network guard. In addition, SIP is similar to the RAS and q.931 protocols in H.323, while SDP is equivalent to H.254. In the IETF's sip architecture, media stream bearer adopts the RTP protocol, which is the same as H.323. Therefore, the main difference between H.323 and IETF/SIP lies in how call signaling and control are implemented.
- Basic Call Establishment and removal: the second version of H.323 call establishment is based on the transport protocol-TCP protocol, so call establishment requires two connection phases: TCP connection establishment and call connection establishment. TCP and UDP are supported in the third version of H.323, which simplifies the call establishment process. The call process of SIP is similar to that of the third edition of H.323. The invite information package is used. The call demolition process is opposite to the call establishment. Both the caller and the called can be disconnected. The H.323 protocol uses release complete, and the SIP protocol uses bye.
- Call Control Service: Both sip and H.323 support call persistence, call transfer, call forwarding, call waiting, teleconference, and other supplementary services. Call persistence is used as an example: H.323 defines two business scenarios: Near-point call persistence and long-point call persistence. The Network guard only transparently transmits SS-hold. SIP implements the same function by sending an invite command that has changed the SDP description to the party that needs the call persistence. The modified SDP description segment only changes the target address sent by the media to null <0.0. 0.0>, while other content remains unchanged. Receive the user's UA and keep the call up until a new invite arrives.
- Third-party control of SIP: third-party control refers to the third party that does not participate in the session to establish the call capability. Currently, this service feature is only available for sip. H.323 is also trying to add the same service function. Third-party control has many application scenarios, including secretarial dialing for managers, automatic dialing for telemarketing, call transfer for participants, and call center services. Third-party control is a service feature that is well-utilized by SIP. Because of this sip feature, ITU-T and IETF use the SIP protocol in implementing the pint (in and Internet intercommunication) business.
- Capability exchange: capability exchange is to exchange the processing capabilities of each media stream to determine the capabilities shared by both parties, so as to ensure that the multimedia signal is accepted by both parties. H.323 uses the H.245 protocol for capability exchange. All the capabilities of the terminal are described in a set of capability descriptor structures. Each of them is a simultaneouscapabilities structure and a capability decriptor number. By using this structure, precise information about each terminal capability is expressed in the relevant tightening structure.
- Service quality: the service quality includes many different indicators. A QoS parameter related to Multimedia Streams includes bandwidth, maximum latency, latency jitter, and packet loss rate. In addition, call establishment delay affects sensory QoS, which is largely dependent on the signaling protocol. Call latency also depends on the transport protocol used to carry the signaling information, especially when the signaling information is lost and needs to be re-transmitted. Therefore, for media streams, we first consider the support of the signaling protocol for QoS, and then examine the call establishment delay, because the call establishment delay is affected by the error detection and error correction mechanisms.
- QoS support for media streams: in H.323, network Guard provides a rich set of control and management functions, including address translation, Admission Control, bandwidth control, and Region management. The Network guard also provides call control signaling, call signature, bandwidth management, and call management functions. SIP itself does not support management and control functions, but relies on other protocols. In recent years, the new hierarchical service architecture has begun to attract attention. The third version of H.323 can provide some hierarchical services based on QoS negotiation parameters (bit rate, latency, jitter. During call initialization, the terminal can apply for a guaranteed service, a controlled service, or a non-specified service. Both the SIP and H.323 versions do not support similar services.
- Call Establishment latency: the first version of H.323 has a high latency when calling establishment. The second version has been improved, and the third version is better. When a call is established, the SIP is very similar to the third version of H.323. If a UDP call fails to be established, the third version of H.323 is better than that of SIP. The third version of H.323 establishes a UDP connection and a TCP connection at almost the same time. It provides an effective mechanism. If the UDP connection succeeds, the TCP connection is closed. Otherwise, TCP is enabled immediately. SIP operates UDP and TCP sequentially. If UDP fails, the call establishment delay is increased.
- Loop detection: to prevent loops, H.323 defines the pathvalue field to indicate the maximum number of signaling information that can be reached before discarding. The problem is critical to defining an applicable value. In addition, this value must be changed after the network changes. SIP uses the via header field to check its content. If the new endpoint is in the via list, it indicates a loop exists. The method of SIP is better than that of H.323.
- Interoperability: (1) interoperability between versions includes the full backward compatibility of H.323, enabling seamless integration for all different H.323 versions. In terms of SIP, the new version may prevent some old functions from being implemented. (2) interoperability with other Signaling Protocols: to support traditional telecommunication services, the VoIP signaling protocol must support the interfaces of ISDN and No. 7 signaling q.931 for the user-Network Interface (UNI ), ISUP is used for network-Network (NNI ). Because the establishment of H.323 calls is only a subset of NO. 7 signaling/ISUP, H.323 can only partially convert the information of NO. 7 signaling. The h.32x series defines other interoperability protocols such as H.320 for ISDN and B-ISDN, and H.324 for stststn. The current version of the SIP Protocol does not provide the translation of the No. 7 signaling, but many Internet Protocol drafts are working on this. With the introduction and development of the softswitch concept, SIP has also been paid attention to. It may be used as a signaling protocol between Softswitch devices and become a bond for various signaling interoperability.
- Implementation difficulty: H.323 signaling information conforms to asn.1per binary encoding and requires special codecs. SIP information is text-based and is coded in UTF-8 using iso000046. Text-based encoding can be easily implemented in Java, TCL, Perl, and other languages for convenient debugging.
Note: Questions
- What are the Protocol structures of the VoIP user plane and the control plane?
- What is the role of the H.323 protocol system in VoIP? And briefly describe its control mechanism.
- What is the role of the SIP protocol system in VoIP? What are the main methods? The following figure shows and briefly describes the call control model.
- Compare the similarities and differences between SIP and H.323.
FAQ: Why can't I see a separate H.245 package?
Why can't I see a single H.245 packet when I use Wireshark (Ethereal) to capture packets for net2phone VoIP communication?
By default, VoIP calls use fast connect ). In the fast connection, no separate H.245 control channel is established. All H.245 packets are transmitted in the "Tunnel" Mode in The H.225.0 call signaling channel. In fact, in many other cases, the H.245 package is also transmitted in the call signaling channel of H.225.0 in a "Tunnel" way.
Therefore, if you expand the H.225.0 packet layer by layer, you will find that the "h245tunneling" mark of some packets is set to "true", which indicates that the H.225.0 packets transmit H.245 information. In fact, you can find the "parallelh245control" field in these packages. The content of these fields is H.245 information.
References: http://blog.chinaunix.net/u/26185/showart_1386449.html
Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/