How to get audio streams in PCM 8khz format [instead of ulaw]

We have created a snoopChannel and ExternalMedia channel to get the real time audio streams of a call. But the audio streams are getting in udp server as ulaw 8000 format. So, is it possible to get the audio streams in PCM 8/16khz format instead of ulaw.

Please help.

Do you mean signed linear? If so then no, not in currently released versions. A fix went in recently for it[1].

[1] resource_channels.c: Explicit codec request when creating UnicastRTP. by seanbright · Pull Request #416 · asterisk/asterisk · GitHub

Yes, Thanks for the details.

Is it possible to do this conversion explicitly. does it work ?

I don’t know what you mean by conversion. For having externalMedia send signed linear, you either need to include the linked fix or wait for a release that includes it.

1 Like

There are tools you can use to convert the audio to whatever other format you want, such as SoX or FFmpeg.

1 Like

Thanks for the inputs. @jcolp @ldo

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.