VOIP connection interaction method based on SIP protocol ONU equipment
By adopting the pre-connection interaction method in the ONU device, the problem that the SIP registration message cannot adapt to servers of different specifications is solved, the VOIP function of the ONU device is efficiently adapted to the customer service provider, and the development efficiency is improved.
Patent Information
- Application Number
- CN202411871666.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In the existing technology, the SIP registration message can only be used for one-time server adaptation and cannot adapt to servers of different specifications, resulting in low development efficiency of ONU equipment in harsh customer environments.
The pre-connection interaction method is adopted. By preparing the pre-connection message content, including Request-Line and Header, in the ONU device, a pre-connection request is sent to the SIP server, the response message is received and parsed, and the normal SIP request message is reconstructed to perform registration and call transactions. The request is resent after timeout.
It realizes the convenient, stable and efficient adaptation of the VOIP voice function of the ONU equipment and the customer service provider, and improves the development efficiency.
Smart Images

Figure CN119652874B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical network unit management, in particular to a VOIP connection interaction method based on SIP protocol ONU equipment. Background Art
[0002] An optical network unit (ONU) is an access network device that typically includes voice over IP (VoIP) functionality. Phones connect to the ONU via FXS interfaces. SIP, a VoIP control channel protocol, enables control of phone behavior. It provides interactive control over phone registration, calling, call waiting, call forwarding, and other functions.
[0003] However, according to current market standards, SIP registration messages can only be used for one server adaptation. After adaptation, normal message registration interaction cannot be performed again for servers of different specifications. Therefore, in the ONU field, some harsh customer environments will bring considerable work challenges to ONU manufacturers, resulting in a continuous decrease in ONU development efficiency. Summary of the Invention
[0004] The purpose of the present invention is to provide a VOIP connection interaction method for an ONU device based on the SIP protocol, which is based on the SIP protocol and is used to adapt the VOIP voice function of the ONU device, provides a pre-connection method for the SIP registration function and subsequent other operations of the ONU device, and provides a more convenient, stable and efficient way for the adaptation of VOIP and customer service providers.
[0005] In order to achieve the above objectives, the following technical solutions are adopted:
[0006] A VOIP connection interaction method for an ONU device based on the SIP protocol includes the following steps:
[0007] S1: Prepare the pre-connection message content in the ONU device, where the message content includes the Request-Line content and the Header content;
[0008] S2: The ONU device sends a pre-connection request message to the SIP server according to the message content prepared in S1;
[0009] S3: After receiving the pre-connection request message, the SIP server adds the field information supported by the server into the response message according to the field and type values in the message, and sends the response message to the ONU device;
[0010] S4: After receiving the response message, the ONU device parses the field information and determines the specific format of each field;
[0011] S5: The ONU device reconstructs the normal SIP request message to perform registration and subsequent dialing and call transactions.
[0012] Furthermore, in S1, the specific format of the Request-Line content is: PERLINK <uri>SIP / 2.0 / CUSTOM, among which,
[0013] URI: Keep consistent with the URI in the Request-Line of the original SIP message;
[0014] CUSTOM: Indicates that this message is a SIP custom extended message;
[0015] The specific format of the Header content is: <paramname> : <paramtype>,in,
[0016] ParamName: represents the field name that needs to be carried in the ONU device;
[0017] ParamType: represents the type of the field;
[0018] The field types include the following two types:
[0019] Fixed Value Type 0x1 Custom Value Type 0x2 .
[0020] Furthermore, in S3, the response message includes Status-Line content and Header content; wherein the specific format of Status-Line content is: SIP / 2.0 200OK; the specific format of Header content is: <paramname> : <paramexpvalue>,in,
[0021] ParamName: represents the field name required in the ONU device;
[0022] ParamExpValue: represents the field value specified by the server or the example value in a fixed format.
[0023] Furthermore, in S5, the specific format of a normal SIP request message is as follows:
[0024] Request-Line:PERLINK sip:192.168.20.22SIP / 2.0 / CUSTOM;
[0025] Message Header:
[0026] Via:0x2;
[0027] From:0x2;
[0028] To:0x2;
[0029] Call-ID:0x2;
[0030] CSeq:0x2;
[0031] Contact: 0x2;
[0032] Allow:0x1;
[0033] Max-Forwards: 0x2;
[0034] User-Agent:0x1;
[0035] Session-Expires:0x2;
[0036] Supported: 0x1;
[0037] Allow-Events:0x1;
[0038] Content-Length: 0x2.
[0039] Furthermore, in S5, after the SIP server receives a normal SIP request message, the specific format of the response message is as follows:
[0040] Status-Line:SIP / 2.0 / CUSTOM 200OK;
[0041] Message Header:
[0042] Via:SIP / 2.0 / UDP 192.168.91.32:5060;rport;branch=z9hG4bK970502782;
[0043] From:"1003"<sip:1003@192.168.20.22> ;tag=1362293532;
[0044] To:<sip:1001@192.168.20.22> ;
[0045] Call-ID:692833458;
[0046] CSeq:20INVITE;
[0047] Contact: "1003"<sip:1003@192.168.91.32:5060> ;
[0048] Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,SUBSCRIBER,NOTIFY,MESSAGE,PRACK,REFER;
[0049] Max-Forwards:1;
[0050] User-Agent:eXosip / 3.6.0;
[0051] Session-Expires:1800;
[0052] Supported:eventlist,replaces,tdialog,timer,100rel;
[0053] Allow-Events:dialog,message-summary,refer,reg,ua-profile;
[0054] Content-Length: 0.
[0055] Furthermore, in S2, a timeout threshold is also set. If no response is received within the timeout threshold, the pre-connection request message is resent.
[0056] Furthermore, the time interval for resending the pre-connection request message does not exceed 60s and is not less than 10s.
[0057] By adopting the above scheme, the beneficial effects of the present invention are:
[0058] The present invention is based on the SIP protocol and is used to adapt the VOIP voice function of the ONU device. It provides a pre-connection method for the SIP registration function and subsequent other operations of the ONU device, and provides a more convenient, stable and efficient way for the adaptation of VOIP and customer service providers. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of the present invention;
[0060] Figure 2 It is a schematic diagram of the principle of the present invention. DETAILED DESCRIPTION
[0061] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] Reference Figures 1 to 2 As shown, the present invention provides a VOIP connection interaction method for an ONU device based on the SIP protocol. On the basis of the traditional SIP protocol, a pre-connection interaction operation is added. The field content that must comply with the operator specification for SIP registration is obtained through pre-connection. In order to reduce the impact of the pre-connection on the original SIP protocol, this interaction is only one time, and the UDP protocol is used as the transport protocol. There is no need for the ONU device to confirm the reply after receiving the message (at the same time, the ONU needs to have a specific waiting timeout before waiting for the specific server reply message to arrive). In the SIP specification, the messages for operations such as registration and calling have a total of Request-Line, Header and Body data content. The Header is carried by all SIP messages, and the Body is only used to transmit specific media stream information. The pre-connection does not involve the content negotiation of the Body (the content negotiation of the Body has been defined in the SIP specification). Among them, the commonly used authentication fields in the Header are:
[0063] Via, From, To, Call-ID, CSeq, Contact, Content-Type, Allow, Max-Forwards, User-Agent, Session-Expires, Min-SE, Supported, Content-Length, etc.
[0064] According to the above, it mainly includes two types of fields: one is the device custom field (variable), and the other is the fixed field (immutable). The specific field information that needs to be negotiated includes the content of the fixed field and the format of the custom field. The specific message and interaction details are as follows:
[0065] S1: Prepare the pre-connection message content in the ONU device, where the message content includes the Request-Line content and the Header content.
[0066] The pre-connection interaction occurs before the client initiates registration with the server. A pre-connection is required before each registration to determine the correct capability set. In the present invention, the ONU, as a SIP client, needs to prepare the content of the SIP PRELINK message (pre-connection message) in advance. The PRELINK message cannot carry the Message Body, that is, the SDP negotiation information, which needs to be used in normal SIP services. After determining the type of each field, the relevant information ONU needs to globally save as a list of capability sets that need to be negotiated before each registration.
[0067] S2: The ONU device sends a pre-connection request message to the SIP server according to the message content prepared in S1.
[0068] In S2, a timeout threshold is also set. If no response is received within the timeout threshold, the pre-connection request message is resent; the time interval for resending the pre-connection request message does not exceed 60s and is not less than 10s.
[0069] The pre-connection request message continues the normal SIP message structure and has two parts: Request-Line and Header. The specific format of the Request-Line content is: PERLINK <uri>SIP / 2.0 / CUSTOM, where the URI is the same as the URI in the Request-Line of the original SIP message.
[0070] CUSTOM: Indicates that this message is a SIP custom extended message;
[0071] The specific format of the Header content is: <paramname> : <paramtype>,in,
[0072] ParamName: represents the field name that needs to be carried in the ONU device;
[0073] ParamType: represents the type of the field;
[0074] The field types include the following two types:
[0075] Fixed Value Type 0x1 Custom Value Type 0x2 .
[0076] In this step, the ONU sends packets based on the SIP message format specification and in accordance with the above message format. The ONU needs to wait for the SIP server to reply with a 200OK message and parse the correct format of the negotiation field before it can perform subsequent SIP registration message interaction. After the ONU sends the pre-connection request message, a specified timeout waiting time is required. If the timeout has expired, the pre-connection request message needs to be resent. The re-sending interval can be customized, but it shall not exceed 60s and shall not be less than 10s.
[0077] S3: After receiving the pre-connection request message, the SIP server puts the field information supported by the server into the response message according to the field and type value in the message, and sends the response message to the ONU device.
[0078] In S3, the response message includes Status-Line content and Header content; wherein the specific format of Status-Line content is: SIP / 2.0 200OK; the specific format of Header content is: <paramname> : <paramexpvalue>,in,
[0079] ParamName: represents the field name required in the ONU device;
[0080] ParamExpValue: represents the field value specified by the server or the example value in a fixed format;
[0081] Among them, all fixed formats need to comply with the standard format specified by SIP, such as URI.
[0082] After receiving the pre-connection request message from the client, the SIP server will put the field information supported by the server into the response message according to the fields and type values in the message. The specific information is filled in the key:value format. The response field information here should be filled in according to the SIP protocol format specified in the RFC; the fields that determine the format, such as the URI in the FROM field, need to be filled in according to the specified URI format. If it does not comply with the specification, it will not be used by the subsequent ONU; the fields that determine the content should be filled in according to the specific fixed content in the SIP server; at the same time, SIP needs to assemble the message according to the above message format, and finally send a 200OK response message to the ONU.
[0083] S4: After receiving the response message, the ONU device parses the field information and determines the specific format of each field.
[0084] After receiving the 200OK response message, the ONU uses the field information in the response message for processing. The fields with determined formats need to be parsed into format content to determine the specific format of each field. The formats of the fields need to comply with the protocol specifications. If they do not comply, they are confirmed as the default format. The fields with determined fixed contents can be directly used as the field content of subsequent messages.
[0085] S5: The ONU device reconstructs the normal SIP request message to perform registration and subsequent dialing and call transactions.
[0086] After the pre-connection response message is received and processed by the ONU, it is reconstructed into a normal signaling message according to the negotiated field format to perform registration and subsequent dialing and call transactions. The specific format of a normal SIP request message is as follows:
[0087] Request-Line:PERLINK sip:192.168.20.22SIP / 2.0 / CUSTOM;
[0088] Message Header:
[0089] Via:0x2;
[0090] From:0x2;
[0091] To:0x2;
[0092] Call-ID:0x2;
[0093] CSeq:0x2;
[0094] Contact: 0x2;
[0095] Allow:0x1;
[0096] Max-Forwards: 0x2;
[0097] User-Agent:0x1;
[0098] Session-Expires:0x2;
[0099] Supported: 0x1;
[0100] Allow-Events:0x1;
[0101] Content-Length: 0x2.
[0102] After the SIP server receives a normal SIP request message, the specific format of the response message is as follows: Status-Line: SIP / 2.0 / CUSTOM 200OK;
[0103] Message Header:
[0104] Via:SIP / 2.0 / UDP 192.168.91.32:5060;rport;branch=z9hG4bK970502782;
[0105] From:"1003"<sip:1003@192.168.20.22> ;tag=1362293532;
[0106] To:<sip:1001@192.168.20.22> ;
[0107] Call-ID:692833458;
[0108] CSeq:20INVITE;
[0109] Contact: "1003"<sip:1003@192.168.91.32:5060> ;
[0110] Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,SUBSCRIBER,NOTIFY,MESSAGE,PRACK,REFER;
[0111] Max-Forwards:1;
[0112] User-Agent:eXosip / 3.6.0;
[0113] Session-Expires:1800;
[0114] Supported:eventlist,replaces,tdialog,timer,100rel;
[0115] Allow-Events:dialog,message-summary,refer,reg,ua-profile;
[0116] Content-Length: 0.
[0117] If the ONU cannot receive the pre-connection response message, or the SIP server cannot communicate normally, the above pre-connection operation can be used as a detection method for online detection of the SIP server. If the response message can be received normally using the above pre-connection method, it can be considered that the SIP server is online and available.
[0118] The above are only preferred embodiments of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.< / paramexpvalue> < / paramname> < / paramtype> < / paramname> < / uri> < / paramexpvalue> < / paramname> < / paramtype> < / paramname> < / uri>
Claims
1. A VOIP connection interaction method based on SIP protocol ONU equipment, characterized in that: The steps include: S1: Prepare the pre-connection message content in the ONU device, where the message content includes the Request-Line content and the Header content; S2: The ONU device sends a pre-connection request message to the SIP server according to the message content prepared in S1; S3: After receiving the pre-connection request message, the SIP server adds the field information supported by the server into the response message according to the field and type values in the message, and sends the response message to the ONU device; S4: After receiving the response message, the ONU device parses the field information and determines the specific format of each field; S5: The ONU device reconstructs the normal SIP request message to perform registration and subsequent dialing and call transactions; in S1, the specific format of the Request-Line content is: PERLINK <uri> SIP / 2.0 / CUSTOM, where the URI is the same as the URI in the Request-Line of the original SIP message.< / uri> CUSTOM: Indicates that this message is a SIP custom extended message; The specific format of the Header content is: <paramname> : <paramtype> ,in,< / paramtype> < / paramname> ParamName: represents the field name that needs to be carried in the ONU device; ParamType: represents the type of the field; The field types include the following two types: ; In S3, the response message includes Status-Line content and Header content; wherein the specific format of Status-Line content is: SIP / 2.0 200OK; the specific format of Header content is: <paramname> : <paramexpvalue> ,in,< / paramexpvalue> < / paramname> ParamName: represents the field name required in the ONU device; ParamExpValue: represents the field value specified by the server or the example value in a fixed format.
2. The VOIP connection interaction method based on the SIP protocol ONU device according to claim 1 is characterized in that: In S5, the specific format of a normal SIP request message is as follows: Request-Line:PERLINK sip:192.168.20.22SIP / 2.0 / CUSTOM; Message Header: Via:0x2; From:0x2; To:0x2; Call-ID:0x2; CSeq:0x2; Contact: 0x2; Allow:0x1; Max-Forwards: 0x2; User-Agent:0x1; Session-Expires:0x2; Supported: 0x1; Allow-Events:0x1; Content-Length: 0x2.
3. The VOIP connection interaction method based on the SIP protocol ONU device according to claim 1 is characterized in that: In S5, after the SIP server receives a normal SIP request message, the specific format of the response message is as follows: Status-Line:SIP / 2.0 / CUSTOM 200OK; Message Header: Via:SIP / 2.0 / UDP 192.168.91.32:5060;rport;branch=z9hG4bK970502782; From:"1003"<sip:1003@192.168.20.22> ;tag=1362293532; To:<sip:1001@192.168.20.22> ; Call-ID:692833458; CSeq:20INVITE; Contact: "1003"<sip:1003@192.168.91.32:5060> ; Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,UPDATE,INFO,SUBSCRIBER,NOTIFY,MESSAGE,PRACK,REFER; Max-Forwards:1; User-Agent:eXosip / 3.6.0; Session-Expires:1800; Supported:eventlist,replaces,tdialog,timer,100rel; Allow-Events:dialog,message-summary,refer,reg,ua-profile; Content-Length:
0.
4. The VOIP connection interaction method based on the SIP protocol ONU device according to claim 1, characterized in that: In S2, a timeout threshold is also set. If no response is received within the timeout threshold, the pre-connection request message is resent.
5. The VOIP connection interaction method based on the SIP protocol ONU device according to claim 4 is characterized in that: The interval for resending pre-connection request messages shall not exceed 60s and shall not be less than 10s.
Citation Information
Patent Citations
Method for supporting query server ability at session initial protocol terminal
CN1984136A