The realization of MGCP's ALG function

Source: Internet
Author: User

Just ate a bowl of authentic Chaozhou beef tendon pills and a braised egg, is to give their own birthday gift.

This week's work revolves around only one theme, "MGCP's ALG function implementation."

1. Application Scenario:

A terminal device running MGCP Voice protocol, through a router to reach the public network, registered to the MGCP server;

2. Question:

Through the router's MGCP signaling packet, RTP/RTCP stream needs to be snat, because the Snat IP and port can not be determined, so that "out of the MGCP signaling contained in the SDP information (IP and Port)" and "the actual RTP/RTCP stream IP and port" does not match, This makes it possible for the two sides to hear each other during a telephone call.

3. Resolution:

A. Add a pat on the router that corresponds to its original snat, which is a two-way Nat. The IP of the SDP that configures the terminal device at the same time is the WAN port IP of the router. This method is simple and effective, but requires the user to modify the configuration.

B. Add the MGCP alg function on the router, which automatically modifies the IP and port inside the SDP information in the MGCP signaling. This method requires the kernel module code to be changed, but it is not necessary for the user to modify the configuration.

4. The idea of Solution B:

Reference SIP's ALG function code: NF_CONNTRACK_SIP.C, NF_NAT_SIP.C, add nf_conntrack_mgcp.c, nf_nat_mgcp.c, compile Nf_conntrack_mgcp.ko, NF _nat_mgcp.ko, and then insmod go in before the router runs the app. Since MGCP's ALG is a lot simpler, it is almost easy to modify a small portion of the code just by cutting most of the code on the SIP.

The realization of MGCP's ALG function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.