A two-way outbound call voice stream acquisition method applied to a call center
By acquiring two-way outbound voice streams from call centers through network mirroring and proactive streaming, the problem of universality and device dependence in existing recording solutions is solved. This enables adaptability to multiple voice systems and real-time data parsing, and supports intelligent voice quality inspection.
Patent Information
- Application Number
- CN202310181875.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-02-27
AI Technical Summary
Existing two-way outbound call recording technology solutions have low versatility, cannot adapt to different trunk access schemes, rely on external devices, are prone to recording abnormalities, and cannot analyze key information in real time.
By using network mirroring and active streaming, the system acquires the two-way outbound voice streams from the call center. It then uses a media server to capture and filter packets, extracting SIP signaling messages and RTP data to achieve independent recording.
It achieves adaptability to various two-way outbound voice systems and trunk line types, reduces dependence on external devices, can parse and annotate key information in real time, and supports applications such as intelligent voice quality inspection.
Smart Images

Figure CN116170420B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method for acquiring two-way outbound voice streams for use in call centers. Background Technology
[0002] Two-way outbound calling mode in call centers is a new method for agents to establish communication connections with customers. It allows agents to quickly contact customers using their mobile terminals, while also having two-way number hiding capabilities, which protects customer privacy and prevents the leakage of core platform information and bypassing of agents.
[0003] For call recording in two-way outbound calling mode, there are currently several main implementation methods:
[0004] 1. Using relay parallel connection
[0005] On the trunk access gateway side of the voice communication network, an additional T-junction converter interface for trunk paralleling is added. A trunk recording card is added to the recording server. The T-junction converter interface for trunk paralleling is connected to the trunk recording card on the recording server via a coaxial cable. During two-way outbound calls, the voice stream is copied to the recording server and recorded via the T-junction and coaxial cable. The biggest drawback of this recording method is the added hardware, creating more potential points of failure, and it is not suitable for SIP (Session Initiation Protocol) trunk lines.
[0006] 2. Via SBC SIPREC
[0007] On the SBC (Session Border Controller) gateway side of the voice communication network, enable the SIPREC function module and configure the recording server address to the SIPREC target address. During two-way outbound calls, the call's RTP stream is copied to the recording server via SIPREC and recorded. The biggest drawback of this recording method is its strong dependence on an SBC with SIPREC capabilities and its unsuitability for digital trunk lines.
[0008] Existing two-way outbound call recording technology solutions have the following problems:
[0009] 1. The solution has low versatility and cannot meet the needs of different customer trunk access solutions, such as digital trunks, SIP trunks, and hybrid digital and SIP trunks.
[0010] 2. Recording is heavily reliant on external equipment and cannot provide a complete recording method independently. Changes in external equipment can easily increase the risk of recording abnormalities.
[0011] 3. Without the ability to analyze recording data in real time, it is difficult to guarantee the accuracy of key information such as the caller, the called party, the actual caller, and the actual called party in the recorded conversation. Summary of the Invention
[0012] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method for acquiring two-way outbound voice streams in call centers. This method replicates the call signaling and media streams of two-way outbound calls using two different methods: network mirroring and active streaming. Through packet capture and filtering on a media server, it extracts the SIP signaling messages and voice RTP (Real-time Transport Protocol) data required for recording. This method is adaptable to various two-way outbound voice systems and trunk line types.
[0013] The objective of this invention can be achieved through the following technical solutions:
[0014] This invention provides a method for acquiring two-way outbound voice streams in a call center, comprising the following steps:
[0015] Upon receiving a two-way outbound call request and initiating a call, the SIP signaling messages in the two-way outbound call are continuously synchronized through network packet capture using network mirroring or active push streaming.
[0016] By parsing the SIP signaling messages, the SIP sessions of the calling agent and the calling customer are obtained and merged to obtain the target SIP session.
[0017] Once the call is successfully initiated, the corresponding RTP voice stream is obtained based on the target SIP session. The RTP voice stream is then post-processed and stored to achieve voice stream acquisition.
[0018] As a preferred technical solution, the process of synchronizing SIP signaling messages in two-way outbound calls using network mirroring includes the following steps:
[0019] By configuring the mirroring policy of the network switch, SIP signaling messages in the mirrored two-way outbound calls can be obtained when the media server and / or SIP server receive / send data streams.
[0020] As a preferred technical solution, the process of synchronizing SIP signaling messages in two-way outbound calls using active push streaming includes the following steps:
[0021] Configure an active push streaming strategy based on the network interface card name and IP address of the media server and / or SIP server, and obtain SIP signaling messages in the mirrored two-way outbound calls by actively pushing data streams.
[0022] As a preferred technical solution, the process of determining whether a call initiation was successful includes the following steps:
[0023] The target SIP session is parsed to determine whether it includes SIP invite information and / or 200 OK information. If so, it indicates that the call was successfully initiated.
[0024] As a preferred technical solution, after obtaining and merging the SIP sessions of the calling agent and the calling customer, the solution further includes:
[0025] The merged RTP voice streams are labeled, with the RTP voice stream from the trunk gateway or SBC to the media server labeled as the agent-side voice stream, and the RTP voice stream from the media server to the trunk gateway or SBC labeled as the client-side voice stream.
[0026] As a preferred technical solution, the post-processing and storage based on the RTP voice stream includes the following steps:
[0027] Multiple RTP packets are combined into a temporary recording file, and the client-side recording file, agent-side recording file, and dual-side recording file are obtained based on the temporary recording file.
[0028] As a preferred technical solution, in the dual-sided recording file, the recordings on the customer side and the agent side are respectively set in the left and right channels.
[0029] As a preferred technical solution, the following steps are also included:
[0030] Determine whether the target SIP session includes a SIP bye message; if so, end the recording.
[0031] As a preferred technical solution, the voice stream is converted by GSM encoding or PCMU encoding, named according to preset naming rules, and stored in preset paths according to different recording file types.
[0032] As a preferred technical solution, after post-processing and storing the RTP voice stream, the method further includes:
[0033] The start time, end time, calling number, called number, customer answer time, and unique recording ID of the two-way outbound call are obtained and written into a pre-set database.
[0034] Compared with the prior art, the present invention has the following advantages:
[0035] (1) Wide range of applications: This method first copies the call signaling and media stream of two-way outbound calls. Through packet capture and filtering of the media server, it extracts the SIP signaling messages and voice RTP data required for recording. Finally, it uses the acquired RTP data to achieve the acquisition of traffic. Since the method adopts network mirroring and active push streaming to copy the call signaling and media stream of two-way outbound calls, it has strong versatility and can adapt to a variety of different two-way outbound voice systems and trunk line types, including: digital trunk lines, SIP trunk lines and hybrid trunk lines.
[0036] (2) Low coupling: It does not rely on third-party equipment or third-party system functions. The method of the present invention can independently complete the recording of two-way outbound call mode.
[0037] (3) Highly organized recorded data: This method can analyze call data in a two-way outbound calling mode in real time, obtain accurate caller ID, called number, and other information, and can annotate SIP signaling messages and voice RTP messages, as well as standard agent-side messages and customer-side messages, to achieve adaptation to AI applications such as intelligent voice quality inspection. The method and system of this invention, through the parsing of SIP messages and the analysis of message source and destination addresses, achieve real-time parsing of call data in a two-way outbound calling mode, and annotate agents and customers. Attached Figure Description
[0038] Figure 1 This is a schematic diagram illustrating the acquisition of two-way outbound voice streams used in call centers.
[0039] Figure 2 This is a call diagram illustrating a two-way outbound calling mode in a call center.
[0040] Figure 3 This is a schematic diagram of a two-way outbound voice stream acquisition system. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0042] Example 1
[0043] like Figure 1 This embodiment provides a method for obtaining two-way outbound voice streams in a call center, including the following steps:
[0044] Step S1: The media server receives the two-way callback request initiated by the application and starts the call.
[0045] In step S1, while the media server initiates the call, it copies the SIP signaling messages and RTP voice stream of the two-way callback call to the recording control system. There are two methods for copying.
[0046] Method 1: Network Mirroring. Connect the independent network interface cards (NICs) of the media server, SIP server, and recording control system server in the two-way outbound voice system to the same network port on a network switch. Configure a port mirroring policy within the network switch's configuration management, using the network switch port number connected to the media server and SIP server as the source address for port mirroring, and the network switch port number connected to the recording control system server as the target address. When the network switch ports connected to the media server and SIP server receive and send data streams, the port mirroring policy mirrors all their data streams to the network switch port connected to the recording control system server. The recording control system then extracts the necessary SIP signaling messages and RTP voice streams from the received data streams.
[0047] Method 2: Active Streaming. Install and deploy the streaming management module provided by the recording control system within the media server and SIP server of the two-way outbound voice system. Configure the streaming strategy through the streaming management module, using the network interface name and IP address of the media server and SIP server (responsible for processing data streams) as the streaming source; and the network interface name and IP address of the recording control system server (responsible for receiving data streams) as the streaming target. When the media server and SIP server receive and send data streams, they actively push all data streams to the recording control system server according to the streaming configuration strategy. The recording control system receives the data streams and extracts the necessary SIP signaling messages and RTP voice streams.
[0048] In step S3, the recording control system uses the network packet capture module to collect SIP signaling messages from the received data stream, and parses and obtains the SIP messages for two-way outbound calls.
[0049] Step S4: Parse the SIP header data of the SIP message. According to the principle of two-way outbound call mode, in a two-way outbound call, two SIP calls initiated by the media server can be parsed, namely SIP Call 1 and SIP Call 2.
[0050] In step S5, under the default two-way outbound calling business application scenario, the first call SIP Call 1 is defined as the calling agent, and the second call SIP Call 2 is defined as the calling customer. When the two-way outbound call is connected, SIP Call 1 and SIP Call 2 are merged into SIP Call 1, so the recording control system starts recording SIP Call 1.
[0051] Step S6: The recording control system parses the SIP message of SIP Call 1. When it receives the SIP invite and 200 OK messages, it means that the call was successfully initiated and recording begins.
[0052] Step S7: The recording control system continues to parse the SIP message of SIP Call 1, determine the IP address and port of the RTP voice stream used by SIP Call 1, and obtain the RTP voice stream corresponding to SIP Call 1.
[0053] Furthermore, the recording control system marks the RTP voice stream of SIP Call 1 after the call is merged. The RTP voice stream from the trunk gateway / SBC to the media server is marked as the agent-side voice stream; the RTP voice stream from the media server to the trunk gateway / SBC is marked as the client-side voice stream.
[0054] In step S8, the recording control system synthesizes the received SIP Call 1 RTP voice stream into a temporary recording file in real time. Typically, an average of 50 RTP packets are generated per second, with each RTP packet being 160 bytes in size. An 8KB buffer is set, therefore, the temporary recording file is incrementally written once per second on average.
[0055] Furthermore, when synthesizing temporary recording files, they are split into two independent recording files based on the agent and the client. One recording file contains only the voice RTP stream from the agent's side, while the other recording file contains only the voice RTP stream from the client's side, thus achieving speaker-separated recording.
[0056] Furthermore, based on the speaker separation, a temporary recording file is synthesized, which contains all the RTP voice streams from both the agent and the customer.
[0057] Furthermore, when synthesizing temporary recording files, the recording control system fixes the voice RTP stream from the agent side and the voice RTP stream from the client side into the left and right channels respectively. This way, when playing back the recordings later, one channel is the agent's voice and the other channel is the client's voice.
[0058] Step S9: The recording control system parses the SIP message of SIP Call 1. When a SIP bye message is received, it indicates that the call has ended and recording stops.
[0059] In step S10, the recording control system compresses the temporary recording file according to GSM encoding rules, converts it into a standard WAV format recording file, and saves it in a preset storage path. The recording file storage path is grouped according to year / month / day / hour, such as: 2022 / 12 / 15 / 11.
[0060] Furthermore, the recording control system can convert temporary recording files according to PCM encoding rules into 8k16bit WAV format recording files, which can be used by third-party intelligent voice quality inspection systems.
[0061] Furthermore, the recording control system can convert temporary recording files according to PCMU encoding rules into 8k8bit WAV format recording files, which can be used by third-party intelligent voice quality inspection systems.
[0062] Furthermore, the recording control system can determine the type of recording file and store different types of recording files in different storage paths, making it easier for third-party intelligent voice quality inspection systems to access them. For example, for recording files with separate speaker input, the agent-side recording file and the client-side recording file can be stored in two different storage paths.
[0063] In step S11, the recording control system collects the start time, end time, calling number, called number, customer answer time, and unique recording ID of the two-way outbound call by parsing the SIP message of SIP Call 1 and the SIP header data. The collected data is then written into the recording details database.
[0064] Furthermore, the recording control system associates the unique ID of each recording with the unique ID of the call in the two-way outbound voice system, ensuring that each recording corresponds to a two-way outbound call. Simultaneously, through data association queries, business information fields such as agent name and customer name can be retrieved and written into the detailed data fields of the corresponding recording.
[0065] The above method enables call recording in the two-way outbound calling mode of a call center.
[0066] like Figure 2 The above is a call diagram illustrating a two-way outbound calling mode in a call center, including the following steps:
[0067] Step 1: The media receives a call request from the application, queries the number table, and identifies the agent's mobile phone number and the customer's mobile phone number in the request.
[0068] Step 2: The media server initiates the first call, calling the agent's mobile phone number.
[0069] Step 3: After the agent's mobile phone number is connected, the media server initiates a second call to the customer's mobile phone number.
[0070] Step 4: After the customer's mobile phone number is connected, the media server merges the two calls.
[0071] Step 5: The agent's mobile phone and the customer's mobile phone establish a call.
[0072] Compared to existing methods, the method provided in this application has the following advantages:
[0073] 1. This method and system are universal and adaptable to various two-way outbound voice systems and trunk line types, including digital trunk lines, SIP trunk lines, and hybrid trunk lines. It replicates the call signaling and media stream of two-way outbound calls using two different methods: network mirroring and active streaming. Through packet capture and filtering on a media server, it extracts the SIP signaling messages and voice RTP data required for recording.
[0074] 2. This method has low coupling with other systems and does not rely on third-party devices or system functions. The method and system of this invention independently record calls in a two-way outbound calling mode.
[0075] 3. This method can parse call-in-the-path data in a two-way outbound calling mode in real time, obtain accurate calling and called numbers, and annotate SIP signaling messages and voice RTP messages, as well as standard agent-side and customer-side messages, enabling adaptation to AI applications such as intelligent voice quality inspection. This invention's method and system, through the parsing of SIP messages and the analysis of message source and destination addresses, achieves real-time parsing of call-in-the-path data in a two-way outbound calling mode, and annotates agent and customer information.
[0076] Example 2
[0077] like Figure 3 This embodiment provides a voice stream acquisition device, including a recording control server, a recording server, a recording management server, a recording query server, and a controller. The controller is pre-loaded with instructions to implement the two-way outbound voice stream acquisition method as described in Embodiment 1.
[0078] The recording control server parses the SIP messages of two-way outbound calls, identifying the key invite, bye, and corresponding 200 OK messages for each call. Based on the invite message and the corresponding 200 OK, recording for that call begins; based on the bye message and the corresponding 200 OK, recording for that call ends.
[0079] Furthermore, the recording control server parses the SIP header of the SIP message to obtain the initiator and target information of the two-way outbound call mode, sets the agent's mobile phone number as the caller, and sets the customer's mobile phone number as the called party.
[0080] Furthermore, the recording control server parses the source and destination addresses of the SIP messages, marking messages from the trunk gateway / SBC to the media server as agent-side messages, and messages from the media server to the trunk gateway / SBC as client-side messages.
[0081] The recording control server is also used for parsing recording data and writing it into the recording details database. By parsing the SIP messages of two-way outbound calls, the recording control server collects the call start time, call end time, caller ID, called number, customer answer time, and unique recording ID, and then stores this data in the database.
[0082] The audio recording server is used for data packet capture. By using the packet capture tool integrated into the audio recording server, packets are captured from the network card of the audio recording server, and the data stream copied to the audio recording server in the form of network mirroring or active push streaming is collected and recorded.
[0083] Further improvements to the recording server include filtering capabilities during packet capture. Filtering can be performed by IP address, directly discarding data streams from unwanted targets or those intended for recording. Targeted filtering before packet capture can significantly improve system performance.
[0084] The recording server is also used to generate recording files. It converts the captured two-way outbound voice RTP data stream into WAV recording files according to voice encoding rules (GSM encoding, PCM encoding, PCMU encoding).
[0085] Further, based on the agent-side and customer-side messages marked by the recording control server, the recording server converts a two-way outbound call into a mixed recording file containing agent-side, customer-side, and agent-customer information. Alternatively, it converts a two-way outbound call into a dual-track recording file containing the right-side agent and right-side customer information.
[0086] The recording management server is used to configure various operating parameters of the recording control system, including: target information for recording file storage, recording encoding format, speaker separation type, and recording filtering conditions. The recording control server and recording server access the recording management server to obtain the set operating parameters when starting up and recording.
[0087] The recording management server is also used for recording permission control. By controlling the number of simultaneous recordings, it manages the concurrent recording capability of two-way outbound calls.
[0088] The recording query server is used for querying recording results and data. It can query and display detailed recording data entered into the database by the recording control server, and perform conditional queries based on fields, such as by name or by time range. By managing, querying, and transforming information such as caller and called party details in the original records, it creates more convenient and readable data displays, such as agent name and customer name.
[0089] Example 3
[0090] This embodiment provides an electronic device, including: one or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the two-way outbound voice stream acquisition method as described in Embodiment 1.
[0091] Example 4
[0092] This embodiment provides a computer-readable storage medium including one or more programs executable by one or more processors of an electronic device, the one or more programs including instructions for performing the two-way outbound voice stream acquisition method as described in Embodiment 1.
[0093] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for acquiring two-way outbound voice streams in a call center, characterized in that, Includes the following steps: Upon receiving a two-way outbound call request and initiating a call, the SIP signaling messages in the two-way outbound call are continuously synchronized through network packet capture using network mirroring or active push streaming. By parsing the SIP signaling messages, the SIP sessions of the calling agent and the calling customer are obtained and merged to obtain the target SIP session. Once the call is successfully initiated, the corresponding RTP voice stream is obtained based on the target SIP session. This RTP voice stream is then post-processed and stored, thus achieving the acquisition of the voice stream. After obtaining and merging the SIP sessions of the calling agent and the calling customer, it also includes: The merged RTP voice streams are labeled as follows: the RTP voice stream from the trunk gateway or SBC to the media server is labeled as the agent-side voice stream, and the RTP voice stream from the media server to the trunk gateway or SBC is labeled as the client-side voice stream. The process of parsing the SIP signaling messages to obtain the SIP session of the calling agent and the SIP session of the calling customer, merging them, and obtaining the target SIP session includes the following steps: The recording control system uses a network packet capture module to collect SIP signaling messages from the received data stream, and parses and obtains the SIP messages for two-way outbound calls. Parse the SIP header data of the SIP message. Based on the principle of two-way outbound call mode, in a two-way outbound call, parse out two SIP calls initiated by the media server, namely SIP Call 1 and SIP Call 2. In the default two-way outbound calling business application scenario, the first call SIP Call 1 is defined as the calling agent, and the second call SIP Call 2 is the calling customer. When the two-way outbound call is connected, SIP Call 1 and SIP Call 2 are merged into SIP Call 1, and the recording control system starts recording SIP Call 1. The recording control system parses the SIP message of SIP Call 1, and starts recording when it receives the SIP invite and 200 OK messages; The recording control system continues to parse the SIP message of SIP Call 1, determine the IP address and port of the RTP voice stream used by SIP Call 1, and obtain the RTP voice stream corresponding to SIP Call 1.
2. The method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, The process of synchronizing SIP signaling messages in a two-way outbound call using network mirroring includes the following steps: By configuring the mirroring policy of the network switch, SIP signaling messages in the mirrored two-way outbound calls can be obtained when the media server and / or SIP server receive / send data streams.
3. The method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, The process of synchronizing SIP signaling messages in a two-way outbound call using active push streaming includes the following steps: Configure an active push streaming strategy based on the network interface card name and IP address of the media server and / or SIP server, and obtain SIP signaling messages in the mirrored two-way outbound calls by actively pushing data streams.
4. The method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, The process of determining whether a call was successfully initiated includes the following steps: The target SIP session is parsed to determine whether it includes SIP invite information and / or 200 OK information. If so, it indicates that the call was successfully initiated.
5. The method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, The post-processing and storage based on the RTP voice stream includes the following steps: Multiple RTP packets are combined into a temporary recording file, and the client-side recording file, agent-side recording file, and dual-side recording file are obtained based on the temporary recording file.
6. A method for acquiring two-way outbound voice streams in a call center according to claim 5, characterized in that, In the aforementioned dual-sided recording files, the recordings from the customer side and the agent side are respectively set in the left and right channels.
7. The method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, It also includes the following steps: Determine whether the target SIP session includes a SIP bye message; if so, end the recording.
8. A method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, The audio stream is converted using GSM or PCMU encoding and named according to preset naming rules, and stored in preset paths depending on the type of recording file.
9. A method for acquiring two-way outbound voice streams in a call center according to claim 1, characterized in that, After post-processing and storing the RTP voice stream, the method further includes: The start time, end time, calling number, called number, customer answer time, and unique recording ID of the two-way outbound call are obtained and written into a pre-set database.
Citation Information
Patent Citations
Method, device and system for call recording in call center
CN102137199A
Recording control method, and SIP server and recording server
CN104883338A
Method for controlling telephone state of seat end in bidirectional outbound mode
CN112738349A
AMR-WB coding-based capability platform sound recording file generation method and device
CN115460186A