Voice communication system and method based on switch multicast
By using a switch-based multicast voice communication system and leveraging IPv6 multicast addresses and critical protection commands, the system solves the problems of voice delay and data packet loss caused by too many devices accessing the same frequency, thereby improving the stability and reliability of wireless Wi-Fi walkie-talkie communication.
Patent Information
- Application Number
- CN202411397164.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-07
AI Technical Summary
The problem of voice delay and data packet loss caused by too many access devices on the same frequency is difficult to solve in wireless WiFi walkie-talkie communication.
A voice communication system based on switch multicast is adopted. Through a wireless multicast switch and a multicast gateway server, using IPv6 multicast addresses and critical protection commands, SIP signaling connections and SDP sessions are established to realize multimedia forwarding and mass transmission of voice data.
It effectively reduces voice delay and data packet loss, improving the stability and reliability of wireless Wi-Fi walkie-talkie communication.
Smart Images

Figure CN119276844A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of network multicast, and in particular relates to a voice communication system and method based on switch multicast. Background Art
[0002] The intercom voice communication based on wireless WiFi of the same-frequency intercom is based on local wireless network communication. When there are too many access devices at the same frequency, voice delay and data packet loss problems will occur due to the processing speed limitation of the wireless switch. Summary of the invention
[0003] The purpose of this embodiment is to provide a voice communication system and method based on switch multicast, which is used to solve the problem of voice delay and data packet loss caused by too many access devices at the same frequency point.
[0004] A voice communication system based on switch multicast, comprising:
[0005] Wireless multicast switch: used for the multicast gateway server to send global multicast messages in groups, wherein the global multicast messages are SIP signaling messages, and the SIP signaling messages include SDP media messages;
[0006] Multicast gateway server: used to respond to global terminal SIP calls and perform network-wide SIP signaling forwarding, including SIP module, multimedia forwarding module, SIP registration server module, wherein the SIP module is used to establish SIP signaling connection and create SDP session, wherein the SDP session includes setting the contact parameters in the SIP protocol as:
[0007] c=IN IP6 multicast parameter address / 64; wherein the multicast parameter address is an IP6 multicast address, and the IPV6 multicast address includes ff02::1; wherein / 64 is a link-local range;
[0008] The SIP registration server module is used to respond to the SIP user registration user service of the SIP module and the wireless terminal, execute the user call soft switch instruction, establish the INVITE call session and respond to the registration request; the SIP module also includes creating a special service number user, the special service number user is used for the wireless terminal user to establish a SIP signaling call, and the SIP signaling call includes an INVITE call;
[0009] A single-frequency wireless switch: used for the wireless multicast switch to establish a wireless network link, and also includes a voice message group for the single-frequency user of the wireless terminal for local access, wherein the single-frequency wireless switch and the wireless terminal are in a 1-to-N relationship, wherein N is greater than or equal to 1; wherein the multimedia forwarding module is used to forward the multimedia data of the SDP session, including voice data;
[0010] Wireless terminal: used to perform user wireless voice communication, multiple wireless terminals and one of the single-frequency wireless switches establish a single-frequency user network, wherein the single-frequency user network includes a WIFI wireless network, and the wireless terminal includes a local call module and a full-network call module, wherein the local call module is used to call all terminals in the single-frequency user network; wherein the full-network call module is used to call all access terminals under the wireless multicast switch;
[0011] The wireless multicast switch and the single-frequency wireless switch establish a global multicast network through the wireless frequency, the wireless multicast switch is a root node, the single-frequency wireless switch is a child node, and the wireless multicast switch and the single-frequency wireless switch are in a one-to-one P relationship, where P is greater than or equal to 1.
[0012] Furthermore, the wireless multicast switch and the single-frequency wireless switch also include an execution environment configuration script, wherein the execution environment configuration script includes “nc-ul <multicast address> <port number>”.
[0013] Furthermore, the multicast gateway server also includes a multicast setting instruction.
[0014] Furthermore, the multicast setting instruction includes executing the console instruction as follows:
[0015] ip-6addr add multicast range::1 / 128dev <interface>;
[0016] in <interface>It is the network card;
[0017] The multicast range includes ff01, ff02, ff05, and ff0e.
[0018] Furthermore, establishing the SIP signaling connection also includes executing a critical protection instruction when concurrently responding to INVITE calls from multiple wireless terminals.
[0019] Furthermore, the critical protection instruction includes returning a SIP success code if no INVITE call exists, and returning a SIP error code for subsequent calls if an INVITE call already exists.
[0020] Furthermore, the single-frequency wireless switch includes a WIFI device.
[0021] Furthermore, the local call module also includes creating a UDP connection and performing voice data sampling encoding and compression.
[0022] Furthermore, the whole network call module also includes responding to the terminal interface user dialing input and executing a SIP signaling call, wherein the SIP signaling call includes an INVITE call, and also includes establishing an SDP session and executing voice data transmission if the return code is 200.
[0023] A voice communication method based on switch multicast, comprising:
[0024] Terminal local call: create UDP connection, collect voice data, and execute local multicast sending instructions;
[0025] Terminal full network call: create an INVITE call, establish an SDP session, and set SDP session parameters. The SDP session parameters include setting the contact parameters in the SIP protocol as follows:
[0026] c=IN IP6 multicast parameter address / 64; wherein the multicast parameter address is an IP6 multicast address, and the IPV6 multicast address includes ff02::1; wherein / 64 is a link-local range;
[0027] The SIP registration server module responds to the SIP module to register and create a special service number user and returns a success code. If the special service number user already exists, an error code is returned;
[0028] The single-frequency wireless switch responds to the local call of the terminal and executes the local terminal UDP voice message group;
[0029] After the SIP module responds to the terminal's full network SIP call establishment, it executes voice group transmission through the multimedia forwarding module.
[0030] The present invention provides a switch multicast-based voice communication system and method, which solves the problem of voice delay and data packet loss caused by too many access devices at the same frequency point.
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 : A network topology diagram of a voice communication system and method based on switch multicast provided in an embodiment of the present invention;
[0033] Figure 2 : A sample diagram of a terminal local call interface of a voice communication system and method based on switch multicast provided in an embodiment of the present invention;
[0034] Figure 3 : A sample diagram of the terminal full-network call interface of the switch multicast-based voice communication system and method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0036] The present invention provides a voice communication system based on switch multicast, comprising:
[0037] Wireless multicast switch: used for multicast gateway server to send global multicast messages in groups, wherein the global multicast messages are SIP signaling messages, and the SIP signaling messages include SDP media messages; the wireless switch used in this embodiment is a WIFI device, and in order to increase the wireless coverage of the WIFI device, the device adds a radio frequency enhancement module to expand the wireless coverage; the wireless multicast switch needs to complete the networking settings when performing networking, which is used to perform multicast message sending, including configuring the PIM (Protocol Independent Multicast) protocol and enabling the IGMP (Internet Group Management Protocol) protocol; in this embodiment, in order to enable the wireless multicast switch to perform multicast message sending, a tool is used to execute the console command "nc-ul <multicast address><port number>" under Linux;
[0038] Multicast gateway server: used to respond to global terminal SIP calls and perform network-wide SIP signaling forwarding, including a SIP module, a multimedia forwarding module, and a SIP registration server module, wherein the SIP module is used to establish a SIP signaling connection and create an SDP session, wherein the SDP session includes setting the contact parameter in the SIP protocol to c=IN IP6 multicast parameter address / 64; wherein the multicast parameter address is an IP6 multicast address, and the IPV6 multicast address includes ff02::1; wherein / 64 is a link local range;
[0039] The SIP module also includes creating a special service number user, the special service number user is used by the wireless terminal user to establish a SIP signaling call, the SIP signaling call includes an INVITE call, and the method for creating a special service number user in the embodiment includes executing a special service number registration instruction to establish a special service number user in the registration server, and the special service number user is created by the SIP module initiating a REGISTER instruction to the SIP registration server module;
[0040] SIP registration server module: used to respond to the registration service of SIP users of multicast gateway servers and wireless terminals, and execute user call soft switch instructions, including INVITE call session establishment; in this embodiment, the session survival update time is 60 seconds; respond to the INVITE of multicast gateway servers and wireless terminals and execute SIP signaling instructions such as call ringing, call connection, call session establishment, etc.;
[0041] In this embodiment, the multicast gateway server also needs to execute the join multicast command through the console. The Linux environment of this embodiment uses ip-6addr add multicast range::1 / 128dev <interface>,in <interface>is the network card; the multicast range is the following value:
[0042] Interface-Local: ff01
[0043] Link-Local: ff02
[0044] Site-Local: ff05
[0045] Global: ff0e
[0046] The SIP signaling connection also includes executing a critical protection instruction when responding to multiple INVITE calls from the wireless terminals concurrently, which is used to prevent the establishment of multiple concurrent voice calls when responding to INVITE calls initiated by multiple terminals at the same time, resulting in confusion in the reception of user voice data and mutual interference of group voice data. The critical protection instruction is detected and executed in the SIP registration server module, and the implementation steps include detecting whether there is at least one incoming call session of a special service number user that has been established. If there is at least one INVITE call session, an error code is returned, where the error code returns 401. If there is no INVITE call session, a success code is returned, where the success code is returned 200. In this embodiment, the multimedia forwarding module creates a voice forwarding thread according to the SDP session protocol in the SIP protocol when the client initiates an INVITE call session, which is used to execute the forwarding of UDP voice data in the SDP protocol. In this embodiment, the SDP session protocol should set c=IN IP6 multicast parameter address / 64, otherwise the voice UDP data cannot be broadcasted on the entire network. Other parameter settings also include:
[0047] o=-2890844526 2890842807IN IP6 xx:xx:xx:xxx:xx:xx:xx
[0048] m=audio 49170RTP / AVP 0
[0049] a=rtpmap:0G721 / 8000
[0050] Wherein o is the address setting of the owner, which can be in IPV4 format or IPV6 format. In this embodiment, the format is IPV6; m is the audio transmission port setting; a is the preferred audio code. In this embodiment, G721 is selected. Commonly used codes also include G723, G711, GSM, and G729;
[0051] Single-frequency wireless switch: used for the wireless multicast switch to establish a wireless network link, and also includes a voice message group transmission for single-frequency users of the wireless terminal that performs local access. The single-frequency wireless switch and the wireless terminal are in a 1-to-N relationship, where N is greater than or equal to 1; wherein the multimedia forwarding module is used to forward multimedia data of the SDP session, including voice data; in this embodiment, the single-frequency wireless switch also needs to configure the PIM (Protocol Independent Multicast) protocol and enable the IGMP (Internet Group Management Protocol) protocol; use the tool under Linux to execute the command "nc-ul <multicast address><port number>"; to support multicast forwarding. In this embodiment, the single-frequency wireless switch is a WIFI wireless router. When multiple wireless terminals are connected, multicast message group transmission is allowed within the local area network of all access devices. Before the access system works, it is necessary to execute the IGMP protocol enable command through the configuration page to support multicast forwarding.
[0052] Wireless terminal: used to perform user wireless voice communication, multiple wireless terminals and a single-frequency wireless switch establish a single-frequency user network, wherein the single-frequency user network includes a WIFI wireless network, and the wireless terminal includes a local call module (see Figure 2 ), a full-network call module, wherein the local call module is used to call all terminals in the single-frequency user network; wherein the full-network call module is used to call all access terminals under the wireless multicast switch; in this embodiment, the wireless terminal is a SIP client and a voice communication client within the local area network. In the embodiment, the QT framework develops the terminal operation page, and the SIP call uses the eXosip2 library to complete the execution of the SIP protocol stack. The functions include SIP parameter settings, local terminal identification settings, dial-up panel, local calls, full-network calls, etc.; when the wireless terminal is turned on, it is necessary to initiate a registered user request to the SIP registration server module to establish a user online session; it is used to be discovered and called by wireless terminal users under other single-frequency wireless switches in the entire network, otherwise the call fails and returns a 40X error. When executing a local call, the wireless terminal constructs a UDP socket connection and binds a specific port. After the terminal MIC data is encoded, a local multicast broadcast is initiated. The initiation of the local multicast broadcast is implemented using the send function of the UDP object, and the destination address sent is the multicast address; the code in the embodiment is as follows:
[0053] struct sockaddr_in multicast_addr;
[0054] / / Create a UDP socket
[0055] sock=socket(AF_INET,SOCK_DGRAM,0);
[0056] if(sock<0){
[0057] perror("socket");
[0058] exit(EXIT_FAILURE);
[0059] }
[0060] / / Set the multicast time to live value (TTL)
[0061] if(setsockopt(sock,IPPROTO_IP,IP_MULTICAST_TTL,&ttl,sizeof(ttl))<0){
[0062] perror("setsockopt IP_MULTICAST_TTL");
[0063] close(sock);
[0064] exit(EXIT_FAILURE);
[0065] }
[0066] / / Configure multicast address
[0067] memset(&multicast_addr,0,sizeof(multicast_addr));
[0068] multicast_addr.sin_family=AF_INET;
[0069] multicast_addr.sin_addr.s_addr=inet_addr(MULTICAST_ADDR);
[0070] multicast_addr.sin_port=htons(PORT);
[0071] / / Send multicast message
[0072] if(sendto(sock,MESSAGE,strlen(MESSAGE),0,(struct sockaddr*)&multicast_addr,sizeof(multicast_addr))<0){
[0073] perror("sendto");
[0074] close(sock);
[0075] exit(EXIT_FAILURE);
[0076] }
[0077] In the embodiment, the whole network call function of the wireless terminal is executed by the SIP module in the terminal. The INVITE instruction for calling the special service number is initiated through the dialing interface. The dialing instruction in the embodiment is sip:10999@xx.xx.xx.xx:5060, where 10999 is the special service number in this embodiment, which is used to call all network users under the non-local single-frequency wireless switch (see Figure 3 ).
[0078] In the embodiment, the wireless multicast switch and the single-frequency wireless switch establish a global multicast network through the wireless frequency, the wireless multicast switch is the root node, the single-frequency wireless switch is the child node, and the wireless multicast switch and the single-frequency wireless switch are in a one-to-one P relationship, where P is greater than or equal to 1.
[0079] The present invention also provides a voice communication method based on switch multicast, comprising:
[0080] S01: The terminal makes a local call, creates a UDP connection, collects voice data, and executes a local multicast sending instruction; proceeds to step S02;
[0081] S02: The terminal makes a full network call, creates an INVITE call, establishes an SDP session, and sets SDP session parameters. The SDP session parameters include setting the contact parameters in the SIP protocol as follows:
[0082] c=IN IP6 multicast parameter address / 64; wherein the multicast parameter address is an IP6 multicast address, and the IPV6 multicast address includes ff02::1; wherein / 64 is a link local range; proceed to step S03;
[0083] S03: The SIP registration server module responds to the SIP module registration to create a special service number user and returns a success code 200. If the special service number user already exists, an error code is returned; proceed to step S04;
[0084] S04: The single-frequency wireless switch responds to the local call of the terminal and executes the local terminal UDP voice message group transmission; proceeds to step S05;
[0085] S05: After the SIP module responds to the terminal's full network SIP call establishment, it executes voice group transmission through the multimedia forwarding module;
[0086] The present invention provides a switch multicast-based voice communication system and method, which solves the problem of voice delay and data packet loss caused by too many access devices at the same frequency point.
[0087] The above description is only an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of protection of the present invention.< / interface> < / interface> < / interface> < / interface>
Claims
1. A voice communication system based on switch multicast, characterized in that: include: Wireless multicast switch: used for the multicast gateway server to send global multicast messages in groups, wherein the global multicast messages are SIP signaling messages, and the SIP signaling messages include SDP media messages; Multicast gateway server: used to respond to global terminal SIP calls and perform network-wide SIP signaling forwarding, including SIP module, multimedia forwarding module, SIP registration server module, wherein the SIP module is used to establish SIP signaling connection and create SDP session, wherein the SDP session includes setting the contact parameters in the SIP protocol as: c=INIP6 multicast parameter address / 64; wherein the multicast parameter address is an IP6 multicast address, and the IPV6 multicast address includes ff02::1; wherein / 64 is a link-local range; The SIP registration server module is used to respond to the SIP user registration user service of the SIP module and the wireless terminal, execute the user call soft switch instruction, establish the INVITE call session and respond to the registration request; the SIP module also includes creating a special service number user, the special service number user is used for the wireless terminal user to establish a SIP signaling call, and the SIP signaling call includes an INVITE call; A single-frequency wireless switch: used for the wireless multicast switch to establish a wireless network link, and also includes a voice message group for the single-frequency user of the wireless terminal for local access, wherein the single-frequency wireless switch and the wireless terminal are in a 1-to-N relationship, wherein N is greater than or equal to 1; wherein the multimedia forwarding module is used to forward the multimedia data of the SDP session, including voice data; Wireless terminal: used to perform user wireless voice communication, multiple wireless terminals and one of the single-frequency wireless switches establish a single-frequency user network, wherein the single-frequency user network includes a WIFI wireless network, and the wireless terminal includes a local call module and a full-network call module, wherein the local call module is used to call all terminals in the single-frequency user network; wherein the full-network call module is used to call all access terminals under the wireless multicast switch; The wireless multicast switch and the single-frequency wireless switch establish a global multicast network through the wireless frequency, the wireless multicast switch is a root node, the single-frequency wireless switch is a child node, and the wireless multicast switch and the single-frequency wireless switch are in a one-to-one P relationship, where P is greater than or equal to 1.
2. The voice communication system based on switch multicast according to claim 1, characterized in that: The wireless multicast switch and the single-frequency wireless switch also include an execution environment configuration script, wherein the execution environment configuration script includes "nc-ul <multicast address> <port number>".
3. The voice communication system based on switch multicast according to claim 1, characterized in that: The multicast gateway server also includes multicast setting instructions.
4. The voice communication system based on switch multicast according to claim 3, characterized in that: The multicast setting instruction includes executing the console instruction as follows: ip-6addr add multicast range::1 / 128dev <interface> ;< / interface> in <interface> It is the network card;< / interface> The multicast range includes ff01, ff02, ff05, and ff0e.
5. The voice communication system based on switch multicast according to claim 1, characterized in that: The establishing of the SIP signaling connection also includes executing a critical protection instruction when concurrently responding to multiple INVITE calls from the wireless terminals.
6. The voice communication system based on switch multicast according to claim 5, characterized in that: The critical protection instruction includes returning a SIP success code if there is no INVITE call, and returning a SIP error code for subsequent calls if there is already an INVITE call.
7. The voice communication system based on switch multicast according to claim 1, characterized in that: The single-frequency wireless switch includes a WIFI device.
8. The voice communication system based on switch multicast according to claim 1, characterized in that: The local call module also includes creating a UDP connection and performing voice data sampling encoding and compression.
9. The voice communication system based on switch multicast according to claim 1, characterized in that: The whole network call module also includes responding to the terminal interface user dialing input and executing SIP signaling call, the SIP signaling call includes INVITE call, and also includes establishing SDP session and executing voice data sending if the return code is 200.
10. A voice communication method based on switch multicast, characterized in that: include: Terminal local call: create UDP connection, collect voice data, and execute local multicast sending instructions; Terminal full network call: create an INVITE call, establish an SDP session, and set SDP session parameters. The SDP session parameters include setting the contact parameters in the SIP protocol as follows: c=INIP6 multicast parameter address / 64; wherein the multicast parameter address is an IP6 multicast address, and the IPV6 multicast address includes ff02::1; wherein / 64 is a link-local range; The SIP registration server module responds to the SIP module to register and create a special service number user and returns a success code. If the special service number user already exists, an error code is returned; The single-frequency wireless switch responds to the local call of the terminal and executes the local terminal UDP voice message group; After the SIP module responds to the terminal's full network SIP call establishment, it executes voice group transmission through the multimedia forwarding module.