Using Asterisk codec in 3rd party applications

Hi,

I inherited a small voice recorder application implemented in C a lot of years ago. This application used Asterisk codecs (a-law, u-law) from v 1.2 and 1.4.
I want to update the software for modern linux distributions that’s the reason I’ve tried to integrate codecs from Asterisk v18.

I load codec .so libraries into executable dynamically, using dlopen().

When I try to load codec_ulaw.so with dlopen() I get this error:

/var/lib/record/plugins/codec_ulaw.so: undefined symbol: ast_format_slin

This symbol contained by format_cache.c which is part of main Asterisk executable.

But ‘ast_format_slin’ symbol only provided by the Asterisk executable, no by any other shared library Does it mean that Asterisk codecs cannot be used by 3rd party apps, anymore? Or should I integrate somehow other format-related source modules into my app, too?

Or if it;s possible is there any API documentation or sample code that demonstrates how to integrate codecs?

Asterisk modules are written to be used by Asterisk, not to be shared libraries used by other applications. Is it possible? Yes, but you’re on your own. There’s no documentation or sample code for such things.

Why not just use FFmpeg? That has all these codecs and formats, and more.

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