[Asterisk-Dev] meaning of frame->offset

Klaus Darilion klaus.mailinglists at pernau.at
Tue Jan 11 13:58:24 MST 2005


Hi all!

I'm trying to understand asterisk and zaptel. Therefore I wrote a small 
app which writes all the data received on a Zap-Channel into a file.

I'm using
	f = ast_read(chan);
to read the data from the channel and then I use
	write(fddumpfile, f->data, f->datalen);
to write the samples into the file.

I'm not sure if this is correct - do I have to take care of f->offset 
(How far into "data" the data really starts) ?

So what is the difference between f->datalen and f->samples and how to 
deal with the offset?

thanks for any hints,
klaus




More information about the asterisk-dev mailing list