[asterisk-dev] SLINEAR_FORMAT returning 16khz frames not 8khz
Russell Bryant
russell at russellbryant.net
Tue Aug 13 17:01:29 CDT 2013
On Tue, Aug 13, 2013 at 12:02 PM, Ryan Conrad <rconrad54 at gmail.com> wrote:
> Sorry for being a little ambiguous. I am looking at this function:
>
> static int console_write(struct ast_channel *chan, struct ast_frame *f)
> {
> struct console_pvt *pvt = ast_channel_tech_pvt(chan);
>
> Pa_WriteStream(pvt->stream, f->data.ptr, f->samples);
>
> return 0;
> }
>
> However, I dont use PortAudio, instead I have my own stream that instead
> will send throught a socket the raw buffer of the frame. I just need to be
> able to get the raw voice buffer off of the phone every 10ms doing 8khz raw
> PCM data (SLINEAR). That is all I am trying to get from the console_write.
> Is there a better way to get that voice data coming from the endpoint
> device?
>
> Basically, I have a SIP configured phone and my custom driver, so when
> console_write gets hit, I should be taking the SIP phone's voice frames and
> then I want to send those on their way with my stream to a totally separate
> device.
>
Sooo ... you're basically not using chan_console, then. That was indeed a
bit misleading. Since you're doing a custom channel driver I don't think I
can help much.
In general, search for all of the instances of SLINEAR16 in the driver you
started with. Those are the places you need to change.
--
Russell Bryant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130813/22b96a3f/attachment.htm>
More information about the asterisk-dev
mailing list