ACCESS VoIP CALL AUDIO PCM

  Need Assistance? Contact us
Logo Mobile   Empowering

Please select a VOIP SDK of your interest
Audio Data PCM of VoIP Call

The VaxVoIP Server library DLL enables real-time access to PCM audio data, making it ideal for AI model training, speech processing, and machine learning applications.

By providing methods and events during VoIP calls, it supports the integration of AI-driven features, such as speech recognition, natural language processing, and sentiment analysis, enhancing the development of AI-enhanced VoIP communication systems.

TWO APPROACHES FOR ACCESSING AUDIO PCM DATA

VaxVoIP offers two distinct methods for accessing the PCM (Pulse Code Modulation) audio data:

Event-Driven Access:

VaxVoIP can trigger events during a call session, providing real-time PCM audio data. This method is particularly useful for scenarios where immediate processing or monitoring of audio is required, such as in AI-driven VoIP communication systems.

Named-Pipe Based Access:

VaxVoIP also supports accessing PCM audio data through a name-pipe-based method. This approach allows for continuous, real-time streaming of audio data to external applications, enabling seamless integration with AI models and other processing tools that require direct, uninterrupted access to the audio stream.

EVENT DRIVEN ACCESS TO AUDIO DATA PCM

The event-driven method offers a straightforward way to access audio PCM data. By enabling event-driven audio access for a specific channel of a SessionId, VaxVoIP triggers the OnCallSessionAccessAudioPCM() event, delivering the PCM audio data to the application via the main thread.

However, extensive processing on the main thread can cause delays and impact the responsiveness of other events. Therefore, this method is best suited for scenarios involving a smaller number of calls and minimal audio processing.

This method is simple and does not require advanced programming skills. For more detailed information about the exported events and methods, please refer to the TECHNICAL MANUAL and SAMPLE SOURCE CODES. Here is the workflow:

INCOMING SIP CALL REQUEST
Event: OnCallSessionCreated()
Event: OnIncomingCall()
Method: AccessAudioPCM()
Method: AcceptCallSession()
Event: OnCallSessionConnecting()
On SIP client-B side incoming call appears.
SIP client-B accepts the incoming call.
A call session is established between SIP client-A and SIP client-B.
Event: OnCallSessionConnected()
Voice streaming begins between SIP client-A and SIP client-B.
Event: OnCallSessionAccessAudioPCM()
SIP client-A disconnects the Call.

Event: OnCallSessionHangUp()

ChannelId = Channel-ZERO (if SIP client-A hangs up)

ChannelId = Channel-ONE (if SIP client-B hangs up)

Event: OnCallSessionClosed()

 

NAMED PIPE BASED ACCESS TO AUDIO DATA PCM

A named pipe enables data transfer between a pipe server and a pipe client. Named pipes can facilitate data transfer both between processes on the same computer and across different computers over a network. For more details, refer to the named pipe documentation available on the Microsoft MSDN website.

In this method, VaxVoIP internally creates a pipe server using the name provided in the PipeName parameter. The application then sets up a pipe client-And connects it to the pipe server. Once the connection is established, the pipe server begins transferring PCM audio data to the pipe client.

This method is recommended for large-scale audio processing in multi-threaded environments, such as IP-PBX systems and SIP servers handling a high volume of VoIP calls.

For further details about exported events and methods, please see the TECHNICAL MANUAL and SAMPLE SOURCE CODES.

INCOMING SIP CALL REQUEST
Event: OnCallSessionCreated()
Event: OnIncomingCall()
Method: AccessAudioPCM() (PipeNameServer)
Create and connect the PipeClient to the PipeNameServer.
Method: AcceptCallSession()
Event: OnCallSessionConnecting()
On SIP client-B side incoming call appears.
SIP client-B accepts the incoming call.
A call session is established between SIP client A and SIP client-B.
Event: OnCallSessionConnected()
Voice streaming starts between SIP client A and SIP client B.
The PipeClient starts to receive PCM audio data.
SIP client-A disconnects the Call.

Event: OnCallSessionHangUp()

ChannelId = Channel-ZERO (if SIP client-A hangs up)

ChannelId = Channel-ONE (if SIP client-B hangs up)

Event: OnCallSessionClosed()
Disconnect and close the PipeClient.