This simple application is an example of a websocket server that parses incoming media streamed from Infobip. Received media is filtered using a bandpass Butterworth filter from 300 to 3400Hz.
ngrok
, just run: ngrok tcp [portNumber]
.media-stream configuration
created. The configuration should point
to the address exposed by ngrok
.{
"callId": "d8d84155-3831-43fb-91c9-bb897149a79d",
"sampleRate": 48000,
"packetizationTime": 20
}
Packetization time is expressed in milliseconds, sampling rate in Hz. The remaining incoming messages will be bytes.
media-stream configuration
, any media sent to Infobip will be ignored.
This means you can use media-streaming to log data for processing later.This application implements a bandpass filter from 300-3400Hz. Specifically, the Butterworth filter is implemented, as it is one of the simplest filters that can achieve good results in the bandpass. The filter will significantly attenuate frequencies outside the bandpass. The 300-3400Hz range was very commonly used in old telephony systems and is referred to as the voice frequency, so you can expect to hear lower quality audio than what you normally get from Infobip and a nostalgic reminder of old telephony calls.
If you want to use a different filter or algorithm for modifying the media, all you have to do is change the filtering method from this application. The rest of the code can remain as is.