[asterisk-dev] DAHDI: force channel to SLIN

Moises Silva moises.silva at gmail.com
Tue Feb 2 08:52:27 CST 2010


Hello,

On Mon, Feb 1, 2010 at 9:34 PM, Dan Amarandei <dan.amarandei at gmail.com>wrote:

> I am trying to force an fxs dahdi channel to slin. I see that
> DAHDI_SETLINEAR sets the DAHDI_FLAG_LINEAR in chan->flags in
> dahdi-base.c but I am not sure how to force chan_dandi.conf or
> dahdi/system.conf to switch to it,


Cannot be done through system.conf or chan_dahdi.conf settings, it's most a
programming decision depending on the situation (each time dahdi_write is
called with a linear frame or the rawreadformat is changed to linear by
Asterisk).



> and secondly if that was done I don't
> see how DAHDI_FLAG_LINEAR affects anything in the existing DAHDI drivers
> for TDM400P (the driver I am working on is based on the same chipset). I
> know that the fax apps somehow force DAHDI to slin so I hope this is
> possible. meetme seems to do it for the pseudo channel which probably
> won't help.
>

Look into dahdi-base.c, you can see how DAHDI_FLAG_LINEAR will cause
transcoding from ulaw/alaw to slinear before returning a read buffer to user
space (dahdi_chan_read) and before pushing down buffers to hardware
(dahdi_chan_write).

It's probably better for you to describe why is that you want to set the
read/write format in the dahdi channel to linear in order to get some help.

-- 
Moises Silva
Senior Software Engineer
Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON L3R 9T3
Canada
t. 1 905 474 1990 x 128 | e. moy at sangoma.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100202/bb02102c/attachment.htm 


More information about the asterisk-dev mailing list