A method and apparatus for transmitting VoIP media parameters
By dynamically adjusting VoIP media parameters between the IAD and the SIP Server, the problem of not being able to dynamically adjust voice services in existing technologies is solved, improving the user's call experience and network transmission quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RAISECOM TECH
- Filing Date
- 2023-07-25
- Publication Date
- 2026-05-26
Smart Images

Figure CN116938894B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication, and more particularly to a method and apparatus for transmitting VoIP media parameters. Background Technology
[0002] VoIP (Voice over Internet Protocol) is a technology that transmits voice services over the Internet. This technology digitizes analog sound signals and transmits them in real time over IP data networks in the form of data packets.
[0003] Figure 1 This is a diagram illustrating VoIP application scenarios. (Example) Figure 1 As shown, the IAD (Integrated Access Device) is connected to the SIP (Session Initiation Protocol) voice server. The user's phone is connected to the IAD, and the user's number is registered with the SIP server. All call RTP (Real-time Transport Protocol) packets are exchanged between the IAD and the SIP server. During the call connection's voice session negotiation phase, the IAD and SIP server successfully negotiate the packet duration and voice codec rules for voice service transmission. During the call, the IAD and SIP server use the negotiated packet duration and voice codec rules to transmit RTP packets.
[0004] Due to the complexity of network services in existing networks, signal interference and network congestion are prone to occur. In order not to affect the user's call experience, it is often desirable to adjust the packet duration and voice codec rules of the voice service that have been successfully negotiated between the IAD and SIP Server in a timely manner according to the network conditions. However, once the IAD and SIP Server have established a call connection, they will no longer conduct a negotiation process. How to enable them to dynamically adjust the packet duration and voice codec rules of the voice service transmitted between them, especially when neither party is aware of the other's support for packet duration and voice codec rules, has become an urgent technical problem to be solved. Summary of the Invention
[0005] To address any of the aforementioned technical problems, embodiments of this application provide a method and apparatus for transmitting VoIP media parameters.
[0006] To achieve the objectives of this application's embodiments, this application provides a method for transmitting VoIP media parameters, characterized in that the method is applied to an initiating end, wherein the initiating end is one of an IAD and a SIP Server, and the corresponding receiving end is the other of the IAD and SIP Server, comprising:
[0007] After a normal VoIP call has been established between the IAD and the SIP Server, if it is detected that at least one of the current VoIP media parameters, namely packet duration and codec rules, needs to be updated, a notification message is sent to the receiving end, wherein the notification message includes the value to be updated for the parameter that needs to be updated.
[0008] Obtain the response message from the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated of the parameter that needs to be updated is supported;
[0009] Based on the judgment result in the response message, determine whether the parameter to be updated has been successfully updated;
[0010] After confirming that the current parameter to be updated has been successfully updated, the pending value of the current parameter to be updated is used to update the current VoIP media parameter.
[0011] A method for transmitting VoIP media parameters, the method being applied at a receiving end, wherein the receiving end is one of an IAD and a SIP server, and the corresponding initiating end is the other of the IAD and SIP server, comprising:
[0012] After a normal VoIP call has been established between the IAD and the SIP Server, a notification message sent by the initiating end is obtained. The notification message is used to update at least one of the current VoIP media parameters, namely packet duration and codec rules. The notification message includes the value to be updated for the parameter that needs to be updated.
[0013] Determine whether the value to be updated for the parameter that needs to be updated in the notification message is supported, and obtain the determination result;
[0014] The judgment result is sent to the initiating end, and if the judgment result supports the pending value of the parameter that needs to be updated in the notification message, the pending value of the parameter that needs to be updated is used to update the current VoIP media parameter.
[0015] A VoIP media parameter transmission device, the device being applied to an initiating end, wherein the initiating end is one of an IAD and a SIP server, and the corresponding receiving end is the other of the IAD and SIP server, comprising:
[0016] The first sending module is used to send a notification message to the receiving end after a normal VoIP call has been established between the IAD and the SIP Server. If it is detected that at least one of the current VoIP media parameters, namely packet duration and codec rules, needs to be updated, the notification message includes the value to be updated of the parameter that needs to be updated.
[0017] The first acquisition module is used to acquire the response message of the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated of the parameter to be updated is supported;
[0018] The determination module is used to determine whether the parameter to be updated has been successfully updated based on the judgment result in the response message;
[0019] The first update module is used to update the VoIP media parameters with the pending values of the current parameters after confirming that the current parameter to be updated has been successfully updated.
[0020] A VoIP media parameter transmission device, the device being applied to a receiving end, wherein the receiving end is one of an IAD and a SIP server, and the corresponding initiating end is the other of the IAD and SIP server, comprising:
[0021] The second acquisition module is used to acquire a notification message sent by the initiating end after a normal VoIP call has been established between the IAD and the SIP Server. The notification message is used to update at least one of the current VoIP media parameters, namely packet duration and encoding / decoding rules. The notification message includes the value to be updated for the parameter that needs to be updated.
[0022] The judgment module is used to determine whether the value to be updated of the parameter that needs to be updated in the notification message is supported, and to obtain the judgment result;
[0023] The second sending module is used to send the judgment result to the initiating end;
[0024] The second update module is used to update the VoIP media parameters with the pending update value of the current parameter to be updated when the judgment result supports the pending update value of the current parameter to be updated in the notification message.
[0025] One of the above technical solutions has the following advantages or beneficial effects:
[0026] By updating the values of VoIP media parameters, the updated VoIP media parameters can be made compatible with the current network transmission conditions, thereby ensuring the user's user experience during the call.
[0027] Other features and advantages of the embodiments of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the embodiments of this application. The objects and other advantages of the embodiments of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description
[0028] The accompanying drawings are used to provide a further understanding of the technical solutions of the embodiments of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0029] Figure 1 A schematic diagram illustrating VoIP application scenarios;
[0030] Figure 2 A flowchart illustrating a method for transmitting VoIP media parameters provided in an embodiment of this application;
[0031] Figure 3 A flowchart illustrating another method for transmitting VoIP media parameters provided in an embodiment of this application;
[0032] Figure 4 A flowchart illustrating the method for transmitting VoIP media parameters as provided in this application example;
[0033] Figure 5 A schematic diagram of a VoIP media parameter transmission device provided in an embodiment of this application;
[0034] Figure 6 This is a schematic diagram of another VoIP media parameter transmission device provided in an embodiment of this application. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.
[0036] Figure 2 This is a flowchart illustrating a method for transmitting VoIP media parameters provided in an embodiment of this application. Figure 2 As shown, the method is applied to the initiating end, wherein the initiating end is one of the Integrated Access Device (IAD) and the Session Initiation Protocol Server (SIP Server), and the corresponding receiving end is the other of the IAD and the SIP Server, including:
[0037] Step 21: After a normal VoIP call has been established between the IAD and the SIP Server, if it is detected that at least one of the current VoIP media parameters, namely packet duration and codec rules, needs to be updated, a notification message is sent to the receiving end, wherein the notification message includes the value to be updated of the parameter that needs to be updated.
[0038] Step 22: Obtain the response message from the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated of the parameter that needs to be updated is supported;
[0039] Step 23: Based on the judgment result in the response message, determine whether the parameter to be updated has been successfully updated;
[0040] Step 24: After confirming that the current parameter to be updated has been successfully updated, use the pending value of the current parameter to update it to the current VoIP media parameter.
[0041] The method provided in this application embodiment detects that at least one of the packet duration and encoding / decoding rules in the current VoIP media parameters needs to be updated. It then sends a notification message to the receiving end, wherein the notification message includes the value to be updated for the parameter to be updated. Next, it obtains a response message from the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated for the parameter to be updated is supported. Based on the judgment result in the response message, it determines whether the parameter to be updated has been successfully updated. After determining that the parameter to be updated has been successfully updated, the value to be updated for the parameter to be updated is used to update the current VoIP media parameters. By updating the values of the VoIP media parameters, the updated VoIP media parameters can be made to conform to the current network transmission conditions, thereby ensuring the user experience during the call.
[0042] Figure 3 This is a flowchart illustrating another method for transmitting VoIP media parameters provided in an embodiment of this application. Figure 3 As shown, the method is applied to a receiving end, wherein the receiving end is one of an IAD and a SIP Server, and the initiating end corresponding to the receiving end is the other of an IAD and a SIP Server, including:
[0043] Step 31: After a normal VoIP call has been established between the IAD and the SIP Server, obtain the notification message sent by the initiating end. The notification message is used to update at least one of the current VoIP media parameters, namely packet duration and encoding / decoding rules. The notification message includes the value to be updated for the parameter that needs to be updated.
[0044] Step 32: Determine whether the value to be updated for the parameter that needs to be updated in the notification message is supported, and obtain the determination result;
[0045] Step 33: Send the judgment result to the initiating end, and when the judgment result supports the pending value of the parameter to be updated in the notification message, update the VoIP media parameter to the pending value of the parameter to be updated.
[0046] The method provided in this application embodiment obtains a notification message sent by the initiating end. The notification message is used to update at least one of the packet duration and encoding / decoding rules in the current VoIP media parameters. The notification message includes the pending value of the parameter to be updated. The method determines whether the pending value of the parameter to be updated in the notification message is supported, obtains a determination result, and then sends the determination result to the initiating end. If the determination result is that the pending value of the parameter to be updated in the notification message is supported, the pending value of the parameter to be updated is used to update the current VoIP media parameters. By updating the value of the VoIP media parameters, the updated VoIP media parameters can be made to conform to the current network transmission conditions, thereby ensuring the user experience during the call.
[0047] The method provided in the embodiments of this application is described below:
[0048] This application provides a method for transmitting VoIP media parameters, which is applied to... Figure 1 The VoIP application scenario shown in this method involves, after a normal call has been established between the IAD and the SIP Server, if the IAD or the SIP Server determines that the current VoIP media parameters need to be updated, including the packet duration and encoding / decoding rules, the receiving end is notified to update the parameters to improve the user experience during the call.
[0049] refer to Figure 4 The diagram shown is a flowchart of the VoIP media parameter transmission method described in this application. In this method, the initiator of the service parameter update can be an IAD or a SIP server, pre-defined during system design. The counterpart of the initiator is the receiver. Specifically, the initiator is an IAD and the receiver is a SIP server; or, the initiator is a SIP server and the receiver is an IAD. The method includes:
[0050] Step S1: The initiating end determines that the current VoIP media parameters need to be updated, and determines the update value of the parameter to be updated; wherein, the parameter to be updated can be at least one of packet duration and encoding / decoding rules;
[0051] Step S2: The initiating end sends an UPDATE message, and the UPDATE message sent carries the value to be updated for the parameter that needs to be updated. Specifically:
[0052] Taking the current parameters that need to be updated as packaging duration and encoding / decoding rules as an example, add the fields Renew_media:Ptime=xx;Codec=xx to the header field of the UPDATE message;
[0053] Where: Ptime represents the value to be updated for the current packaging time, and Codec represents the value to be updated for the current encoding / decoding rule;
[0054] Step S3: The receiving end receives the UPDATE message and determines whether the local machine supports the value to be updated for the parameter that needs to be updated. If yes, proceed to step S4; otherwise, proceed to step S5.
[0055] Step S4: The receiving end takes the value to be updated of the parameter that needs to be updated as the current VoIP media parameter, replies with a success code to the initiating end, and executes step S6;
[0056] In this step, if a success code is sent back to the initiating end, the receiving end will send subsequent voice services to the initiating end using the updated VoIP media parameters.
[0057] Step S5: The receiving end sends a response error code to the initiating end and executes step S7;
[0058] In steps S4 and S5 above, the response success code and response error code can be carried in the UPDATE message. The SIP status code field has different status values. Typically, the response success code can be 200 OK. The response error code needs to represent specific parameters, so it is set to the status value of the currently undefined SIP status code. Response error code 497 indicates that the local end does not support the update value for the current packaging duration. Response error code 498 indicates that the local end does not support the update value for the current packaging duration. Response error code 499 indicates that the local end does not support the update value for the current packaging duration and does not support the update value for the current packaging duration.
[0059] Step S6: After receiving the response success code, the initiating end confirms that the receiving end supports the value to be updated for the current parameter, and uses the value to be updated for the current parameter as the current VoIP media parameter.
[0060] Step S7: After receiving the response error code, the initiating end determines that the receiving end does not support the updated value of the parameter to be updated according to the error response code, and then re-determines the updated value of the parameter to be updated according to the reselection strategy, and then returns to step S2.
[0061] Furthermore, in the above method, the IAD or SIP Server determines that the current VoIP media parameters need to be updated, and determines the update value of the current packet duration and the encoding / decoding rules, including:
[0062] A1: Set the sampling period and the number of times to count the data acquired within several consecutive sampling periods under the same RTP packet transmission conditions; if the RTP packet transmission conditions change, the counting of the number of times will start again; wherein, the same RTP packet transmission conditions refer to: the same packet duration and the same encoding and decoding rules.
[0063] Both the sampling period and the number of statistical counts can be set by those skilled in the art according to the actual scenario. For example, the sampling period can be set according to the time of the number of RTP message exchanges between the SIP Server and IAD when the application scenario is set; the number of statistical counts can be determined according to the actual scenario's requirements for improving the quality of voice service transmission. When the network is unstable, the smaller the number of statistical counts, the higher the frequency of changes to VoIP media parameters.
[0064] A2: Obtain the interval duration of all RTP packets received within the current sampling period, and calculate and record the average interval duration of all RTP packets within the current sampling period at the end of the current sampling period.
[0065] In real-world scenarios, although the sampling period is a set value, the number of RTP packets received in each sampling period may not be the same due to different network conditions, and the time interval between receiving adjacent RTP packets may also be different. For example, if a total of 20 RTP packets are collected in the current sampling period, there is an interval of 19 RTP packets. The average interval of all RTP packets in this sampling period is the average interval of 19 RTP packets.
[0066] A3: Determine whether the average interval duration of all RTP packets within the current collection period is greater than the current duration switching threshold, where the current duration switching threshold is the duration switching threshold determined in the previous statistical count, and is a set value when there is no previous complete statistical count; if yes, it indicates that the current RTP packet sending duration does not meet the current network transmission conditions, the network latency exceeds the preset requirements, and the current packet duration needs to be updated, and the update is to shorten the current packet duration according to the strategy; if no, it indicates that the current RTP packet sending duration meets the current network transmission conditions, and no switching is required, but preferably, determine whether the maximum interval duration of all RTP packets within the sampling period is less than the current duration switching threshold. If yes, it indicates that the current RTP packet sending time can be further optimized, and the current sending duration needs to be updated, and the update is to extend the current packet duration according to the strategy; otherwise, the current sending duration remains unchanged.
[0067] A4: Determine whether the number of sampling periods recorded under the current RTP message transmission conditions has reached the set number. If yes, execute A5; otherwise, return to execute A2.
[0068] The number of sampling periods recorded under the current RTP packet transmission conditions has not reached the set number, indicating that the current transmission condition has just been switched. This could be the initial establishment of the transmission state at startup or the state after the switch between different transmission conditions has just been completed. In other words, the existence time of the current RTP packet transmission conditions has not reached the expected stable time of the adjustable VoIP media parameters.
[0069] RTP message transmission conditions include: packet duration and encoding / decoding rules; the statistical count restarts each time the RTP message transmission conditions change; when the RTP message transmission conditions remain unchanged, although the number of sampling periods included in each set count is the same, the sampling periods are not the same, but are sequentially shifted; for example, if the set count is 50, when the RTP message transmission conditions remain unchanged, the 1st to 50th sampling periods constitute one statistical count; the 2nd to 51st sampling periods constitute the next statistical count, and so on...
[0070] A5: Calculate the arithmetic mean of the average interval duration of all RTP packets within each sampling period of the current statistical count. If the current encoding / decoding switching threshold is exceeded, it indicates that the current encoding / decoding rules need to be updated, and a lower-level encoding / decoding rule should be selected according to the strategy. If not, it indicates that the current encoding / decoding rules basically meet the current network transmission conditions and no switching is required. However, if it is better to check whether the maximum interval duration of all RTP packets in each sampling period of the current statistical count is less than the current encoding / decoding switching threshold, it indicates that the current encoding / decoding rules need to be updated, and a higher-level encoding / decoding rule should be selected according to the strategy. Otherwise, the current encoding / decoding rules remain unchanged.
[0071] In the above implementation process, the current duration threshold can be set to different fixed values for different RTP transmission conditions, but preferably, it is determined in the following way:
[0072] Determine the standard deviation S and arithmetic mean of the average interval duration of all RTP messages recorded in each sampling period within the set statistical count.
[0073] The product of the standard deviation S corresponding to the set number of times and the preset coefficient is used to obtain the calculation result;
[0074] Obtain the arithmetic mean of the calculation result and the set number of times. The sum of these values yields the current duration switching threshold.
[0075] Furthermore, the value of the coefficient is 1.96.
[0076] That is, the current duration switching threshold is determined as follows:
[0077] The current codec switching threshold can typically be set to 300ms; because according to ITU-T G.114, the acceptable latency for high-quality voice is 300ms. Therefore, this value can be used as the current codec switching threshold. Of course, those skilled in the art can also set the current codec switching threshold to other values according to the actual scenario.
[0078] An example of determining the current duration switching threshold is as follows:
[0079] The number of statistical counts is set to 50, and a maximum of 20 RTP packets are received in each sampling period. For simplicity, the following explanation uses 20 RTP packets received in each sampling period as an example:
[0080] For the first sampling period, the RTP message interval lengths are T11, T12, T13, ..., T120; the average interval length of the RTP messages within the first group is:
[0081] For the second sampling period, the RTP packet interval lengths are T21, T22, T23, ..., T220; the average interval length of the RTP packets within the second group is:
[0082] ...
[0083] For the 50th sampling period, the RTP message interval lengths are T501, T502, T503, ..., T5020. The average interval length of the RTP messages within the 50th group is:
[0084]
[0085] The arithmetic mean of the average interval duration of all RTP packets within 50 sampling periods for:
[0086]
[0087] The standard deviation S of the average interval duration of all RTP packets within 50 sampling periods is:
[0088]
[0089] Therefore, the current duration switching threshold is:
[0090] One point to note here: The current duration switching threshold is: It is obtained based on the calculation method of the confidence interval of the 95 interval of the normal distribution in statistics.
[0091] Specifically, when K51 is in the range When the data is not significantly different from other data, meaning that there are individual data points in the group that exhibit statistically significant differences, and because there is a lower limit to the packaging time (generally 20ms), the above implementation only considers K51 and... The size relationship is sufficient.
[0092] In the above implementation, the supported packetization duration and encoding / decoding rules are recorded in both the IAD and the SIP Server. The parameters supported by both can be identical or different, but each can determine the priority of the supported parameters locally. Typically, the packetization durations, ranked from highest to lowest priority, are 20ms, 10ms, and 5ms; the recorded encoding / decoding rules, ranked from highest to lowest priority according to the speech codec standard, are G711, G726, G729, and G723. Storage is selected in both the IAD and the SIP Server.
[0093] The strategy for shortening the current packaging time is as follows: update the current packaging time to the local supported packaging time that is one level lower than the current packaging time, and use it as the value to be updated for the current packaging time; if the current packaging time is the lowest level of packaging time supported locally, then do not update it.
[0094] The strategy for extending the current packaging time is as follows: update the current packaging time to the local supported packaging time that is one level higher than the current packaging time, and use this as the value to be updated for the current packaging time; if the current packaging time is the highest level of packaging time supported locally, then do not update it.
[0095] The strategy for selecting a lower-level encoding / decoding rule is as follows: update the current encoding / decoding rule to the value of a locally supported encoding / decoding rule that is one level lower than the current encoding / decoding rule, and use this value as the value to be updated for the current packaging duration; if the current encoding / decoding rule is the lowest level of encoding / decoding rule supported locally, then do not update it.
[0096] The strategy for selecting a higher-level encoding / decoding rule is as follows: update the current encoding / decoding rule to the value of a locally supported encoding / decoding rule that is one level higher than the current encoding / decoding rule, and use this value as the value to be updated for the current packaging duration; if the current encoding / decoding rule is the highest-level encoding / decoding rule supported locally, then do not update it.
[0097] Regarding step S7: According to the reselection strategy, the update values for the current packaging duration and the current encoding / decoding rules are redefined, including:
[0098] Determine the level of voice data parameters that are not supported by the receiver, obtain the level that needs to be removed, and determine the update value of the parameter that needs to be updated based on the value of the level that needs to be removed.
[0099] Specifically, when it is necessary to shorten the current packaging time, the packaging time value that is one level lower than the level to be eliminated will be used as the update value of the current packaging time.
[0100] When it is necessary to extend the current packaging time, the value of the packaging time that is one level higher than the level to be eliminated will be used as the value to be updated for the current packaging time.
[0101] When it is necessary to reduce the level of a codec rule, the codec rule that is one level lower than the level to be removed will be used as the update value of the current codec rule.
[0102] When it is necessary to increase the level of a codec rule, the value of the codec rule that is one level higher than the level to be eliminated is used as the value to be updated for the current codec rule.
[0103] In summary, the embodiments of this application also have the following advantages, including:
[0104] Based on real-time network statistics, the encoding / decoding and packetization duration are dynamically switched to ensure a good user experience.
[0105] By utilizing the UPDATE message in the SIP protocol, the switching of the encoding / decoding and packet duration protocol can be completed without the user's awareness, and without affecting the user's business.
[0106] Figure 5 This is a schematic diagram of the structure of a VoIP media parameter transmission device provided in an embodiment of this application. Figure 5 As shown, the device is applied to an initiating end, wherein the initiating end is one of an IAD and a SIP Server, and the corresponding receiving end is the other of an IAD and a SIP Server, including:
[0107] The first sending module 501 is used to send a notification message to the receiving end after a normal VoIP call has been established between the IAD and the SIP Server, if it is detected that at least one of the current VoIP media parameters, namely packet duration and encoding / decoding rules, needs to be updated. The notification message includes the value to be updated of the parameter that needs to be updated.
[0108] The first acquisition module 502 is used to acquire the response message of the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated of the parameter to be updated is supported.
[0109] The determination module 503 is used to determine whether the parameter to be updated has been successfully updated based on the judgment result in the response message;
[0110] The first update module 504 is used to update the VoIP media parameters with the pending value of the current parameter after it is determined that the current parameter to be updated has been successfully updated.
[0111] The apparatus provided in this application, if it detects that at least one of the packet duration and encoding / decoding rules in the current VoIP media parameters needs to be updated, sends a notification message to the receiving end. The notification message includes the value to be updated for the parameter currently requiring updating. Then, it obtains a response message from the receiving end to the notification message, wherein the response message carries a judgment result regarding whether the value to be updated for the parameter currently requiring updating is supported. Based on the judgment result in the response message, it determines whether the parameter currently requiring updating has been successfully updated. After determining that the parameter currently requiring updating has been successfully updated, it updates the VoIP media parameters using the value to be updated for updating the parameter currently requiring updating. On the one hand, this ensures that the updated VoIP media parameters are supported by the receiving end, thereby improving the negotiation efficiency of VoIP media parameters. On the other hand, it ensures that the value of the updated VoIP media parameters conforms to the current network transmission conditions, thereby guaranteeing the user experience during the call.
[0112] Figure 6 This is a schematic diagram of the structure of a VoIP media parameter transmission device provided in an embodiment of this application. Figure 6 As shown, the device is applied to a receiving end, wherein the receiving end is one of an IAD and a SIP server, and the corresponding initiating end is the other of an IAD and a SIP server, including:
[0113] The second acquisition module 601 is used to acquire a notification message sent by the initiating end after a normal VoIP call has been established between the IAD and the SIP Server. The notification message is used to update at least one of the current VoIP media parameters, namely packet duration and encoding / decoding rules. The notification message includes the value to be updated for the parameter that needs to be updated.
[0114] The judgment module 602 is used to determine whether the value to be updated of the parameter that needs to be updated in the notification message is supported, and to obtain the judgment result;
[0115] The second sending module 603 is used to send the judgment result to the initiating end;
[0116] The second update module 604 is used to update the VoIP media parameters to the current value of the parameter to be updated when the determination result supports the value to be updated of the parameter to be updated in the notification message.
[0117] The apparatus provided in this application embodiment acquires a notification message sent by an initiating end. This notification message is used to update at least one of the packet duration and encoding / decoding rules in the current VoIP media parameters. The notification message includes the pending update value of the currently updated parameter. The apparatus determines whether the pending update value of the currently updated parameter in the notification message is supported, obtains a determination result, and then sends the determination result to the initiating end. If the determination result indicates support for the pending update value of the currently updated parameter in the notification message, the pending update value of the currently updated parameter is used to update the current VoIP media parameters. This ensures, on the one hand, that the updated VoIP media parameters are supported by the receiving end, thereby improving the negotiation efficiency of VoIP media parameters. On the other hand, it ensures that the updated VoIP media parameter values conform to the current network transmission conditions, thereby guaranteeing the user experience during the call.
[0118] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
Claims
1. A method for transmitting VoIP media parameters, characterized in that, The method is applied to the initiating end, wherein the initiating end is one of the Integrated Access Device (IAD) and the Session Initiation Protocol Server (SIP Server), and the corresponding receiving end is the other of the IAD and the SIP Server, including: After a normal VoIP call has been established between the IAD and the SIP Server, if it is detected that at least one of the current VoIP media parameters, namely packet duration and codec rules, needs to be updated, a notification message is sent to the receiving end, wherein the notification message includes the value to be updated for the parameter that needs to be updated. Obtain the response message from the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated of the parameter that needs to be updated is supported; Based on the judgment result in the response message, determine whether the parameter to be updated has been successfully updated; After confirming that the current parameter to be updated has been successfully updated, the pending value of the current parameter to be updated is used to update the current VoIP media parameter; Specifically, under the current Real-Time Transport Protocol (RTP) packet transmission conditions determined by the current VoIP media parameters, the need to update the encoding / decoding rules in the current VoIP media parameters is detected in the following ways: The number of completed sampling periods is counted to obtain the current number of times. After the current number of times reaches the preset threshold, the interval value of the current number of times is obtained based on the reception interval of all RTP packets in each sampling period in the current number of times. Based on the interval value of the current number of times and the current codec switching threshold, it is determined whether the current codec rule needs to be updated. When it is determined that the current codec rule needs to be updated, the update direction of the current codec rule is determined. The interval value for the current statistical count includes at least one of the following values: The arithmetic mean of the average values for each sampling period in the current statistical count; The maximum value among the maximum values of the receiving interval in each sampling period of the current statistical count; The update operation of the current encoding / decoding rule is managed in the following ways: If the arithmetic mean of the current number of statistics is greater than the current codec switching threshold, then it is determined that the current codec rule should be updated and the update direction of the current codec rule is to reduce the level of the current codec rule; If the maximum value corresponding to the current number of statistics is less than the current codec switching threshold, then it is determined that the current codec rule should be updated and the update direction of the current codec rule is to increase the level of the current codec rule; If the arithmetic mean of the current number of statistics is not greater than the current duration switching threshold, or if the maximum value of the current number of statistics is not less than the current duration switching threshold, then it is determined that the current encoding and decoding rules will not be updated.
2. The method according to claim 1, characterized in that, The notification message is an UPDATE message, wherein the header field of the UPDATE message includes: indication information for updating VoIP media parameters, the name of the parameter to be updated, and the value to be updated for the parameter.
3. The method according to claim 2, characterized in that, The response message is an UPDATE message, wherein the SIP status code field in the UPDATE message carries a value, and different values correspond to different judgment results.
4. The method according to claim 3, characterized in that, The judgment results include: Supports values to be updated for parameters that need updating; Values that need to be updated are not supported; It supports updating values for packaging duration, but not for encoding / decoding rules. It does not support updating values for packaging duration, but it does support updating values for encoding / decoding rules.
5. The method according to claim 1, characterized in that, Under the current Real-Time Transport Protocol (RTP) packet transmission conditions determined by the current VoIP media parameters, the need to update the packet duration in the current VoIP media parameters is also detected through the following methods: Based on the reception interval of each RTP packet within the current sampling period, the interval value of the current sampling period is obtained. Based on the interval value of the current sampling period and the current duration switching threshold, it is determined whether the current packet duration needs to be updated. Furthermore, if it is determined that the current packet duration needs to be updated, the update direction of the current packet duration is determined.
6. The method according to claim 5, characterized in that: The interval value of the current sampling period includes at least one of the following: The average of the reception intervals of all RTP packets in the current sampling period; The maximum value of the reception interval for all RTP packets in the current sampling period; The update operation for the current packaging duration is managed in the following ways: If the average value corresponding to the current sampling period is greater than the current duration switching threshold, then it is determined that the current packaging duration will be updated and the update direction of the current packaging duration is to shorten the current packaging duration. If the maximum value corresponding to the current sampling period is less than the current duration switching threshold, then it is determined that the current packaging duration will be updated and the update direction of the current packaging duration is to extend the current packaging duration. If the average value corresponding to the current sampling period is not greater than the current duration switching threshold, or if the maximum value corresponding to the current sampling period is not less than the current duration switching threshold, then it is determined that the current packaging duration will not be updated.
7. The method according to claim 6, characterized in that, The current duration switching threshold is obtained through any method, including: Method 1: If the current count has a previous count, the current duration switching threshold is the duration switching threshold determined within the previous count; otherwise, the current duration switching threshold is the set value. Method 2: If the current number of statistics reaches the preset number of times, determine the standard deviation and arithmetic mean of the average interval duration of all RTP messages in each sampling period within the preset number of times, and calculate the product of the standard deviation corresponding to the preset number of times and the preset coefficient to obtain the calculation result. Then, obtain the sum of the calculation result and the arithmetic mean corresponding to the preset number of times to obtain the current duration switching threshold.
8. The method according to claim 7, characterized in that, The coefficient is 1.
96.
9. The method according to claim 1, characterized in that, The current encoding / decoding switching threshold is 300ms.
10. The method according to any one of claims 1 to 9, characterized in that, When there is a value supported by the initiator and belonging to the update direction within the current range of values for the parameter to be updated, the value to be updated for the current parameter is obtained in the following ways: If the last update of the current VoIP media parameters failed, the level of voice data parameters that the receiver does not support is determined, the level to be removed is obtained, and the value to be updated of the current parameter to be updated is determined according to the value of the level to be removed; otherwise, the value to be updated of the current parameter to be updated is determined according to the value of the current parameter to be updated.
11. The method according to claim 10, characterized in that, The step of determining the update value of the current parameter based on the value of the rejection level includes: When the update direction of the packaging time is to shorten the current packaging time, the value of the packaging time that is one level lower than the required elimination level is used as the value to be updated for the current packaging time; when the update direction of the packaging time is to extend the current packaging time, the value of the packaging time that is one level higher than the required elimination level is used as the value to be updated for the current packaging time. When the update direction of the encoding / decoding rule is to lower the level of the encoding / decoding rule, the encoding / decoding rule that is one level lower than the level to be eliminated is used as the value to be updated for the current encoding / decoding rule; when the update direction of the encoding / decoding rule is to raise the level of the encoding / decoding rule, the value of the encoding / decoding rule that is one level higher than the level to be eliminated is used as the value to be updated for the current encoding / decoding rule.
12. The method according to claim 10, characterized in that, The step of determining the value to be updated for the parameter to be updated based on its current value includes: When the update direction of the packaging time is to shorten the current packaging time, the value of the packaging time that is one level lower than the current packaging time will be used as the value to be updated for the current packaging time; when the update direction of the packaging time is to extend the current packaging time, the value of the packaging time that is one level higher than the current packaging time will be used as the value to be updated for the current packaging time. When the update direction of the encoding / decoding rule is to lower the level of the encoding / decoding rule, the encoding / decoding rule with a lower level than the current encoding / decoding rule will be used as the value to be updated for the current encoding / decoding rule; when the update direction of the encoding / decoding rule is to raise the level of the encoding / decoding rule, the value of the encoding / decoding rule with a higher level than the current encoding / decoding rule will be used as the value to be updated for the current encoding / decoding rule.
13. A device for transmitting VoIP media parameters, characterized in that, The device is applied to an initiating end, wherein the initiating end is one of an IAD and a SIP server, and the corresponding receiving end is the other of an IAD and a SIP server, including: The first sending module is used to send a notification message to the receiving end after a normal VoIP call has been established between the IAD and the SIP Server. If it is detected that at least one of the current VoIP media parameters, namely packet duration and codec rules, needs to be updated, the notification message includes the value to be updated of the parameter that needs to be updated. The first acquisition module is used to acquire the response message of the receiving end to the notification message, wherein the response message carries a judgment result on whether the value to be updated of the parameter to be updated is supported; The determination module is used to determine whether the parameter to be updated has been successfully updated based on the judgment result in the response message; The first update module is used to update the VoIP media parameters with the pending value of the current parameter after confirming that the current parameter to be updated has been successfully updated. Specifically, under the current Real-Time Transport Protocol (RTP) packet transmission conditions determined by the current VoIP media parameters, the need to update the encoding / decoding rules in the current VoIP media parameters is detected in the following ways: The number of completed sampling periods is counted to obtain the current number of times. After the current number of times reaches the preset threshold, the interval value of the current number of times is obtained based on the reception interval of all RTP packets in each sampling period in the current number of times. Based on the interval value of the current number of times and the current codec switching threshold, it is determined whether the current codec rule needs to be updated. When it is determined that the current codec rule needs to be updated, the update direction of the current codec rule is determined. The interval value for the current statistical count includes at least one of the following values: The arithmetic mean of the average values for each sampling period in the current statistical count; The maximum value among the maximum values of the receiving interval in each sampling period of the current statistical count; The update operation of the current encoding / decoding rule is managed in the following ways: If the arithmetic mean of the current number of statistics is greater than the current codec switching threshold, then it is determined that the current codec rule should be updated and the update direction of the current codec rule is to reduce the level of the current codec rule; If the maximum value corresponding to the current number of statistics is less than the current codec switching threshold, then it is determined that the current codec rule should be updated and the update direction of the current codec rule is to increase the level of the current codec rule; If the arithmetic mean of the current number of statistics is not greater than the current duration switching threshold, or if the maximum value of the current number of statistics is not less than the current duration switching threshold, then it is determined that the current encoding and decoding rules will not be updated.