[asterisk-users] Question About Codecs

Tilghman Lesher tilghman at meg.abyt.es
Thu Apr 7 12:39:01 CDT 2011


On Wednesday 06 April 2011 09:49:17 Jon Farmer wrote:
> Hi
> 
> I have a call into a MeetMe conference that when I do a "core show
> channel" returns
> 
>   NativeFormats: 0x4 (ulaw)
>   WriteFormat: 0x1000 (g722)
>   ReadFormat: 0x1000 (g722)
> 
> Can someone explain what the differences between Native, Wite and Read
> are?

Your native format is the format that the phone actually uses (on the
wire).  The read and write formats are what Asterisk expects to send to and
receive from the application, because Asterisk has set up a translation
path to ensure that the application gets a format that is more conducive to
its purpose.

Internally to Asterisk, when you ast_read() a frame from the channel, you
should expect that, when the frame is a voice frame, the frame will be in
the ReadFormat.  And, when you ast_write() a voice frame to that channel,
it should be in the WriteFormat.

-- 
Tilghman



More information about the asterisk-users mailing list