Transcoding audio for custom module

Hi everybody,

I wrote a custom application to use in the asterisk dialplan. It’s working pretty fine, however, I’d like to integrate some other applications that work on the input audio. Currently, the applications only support PCM audio which makes it necessary to transcode the input audio (alaw) to slin.
I’ve tested this application with two asterisk installations. The first one connects to the public trunk using alaw and to the second one via slin. On the second server, I run my application and it works perfectly fine.
Do you know any way on how I can realise this setup without having to use two asterisk servers?

Thank you for your comments!

This sounds like a developer question. Please use the mailing list or IRC channel for those.