[asterisk-dev] Re: Channel driver API question

Lorenzo Miniero lorenzo.miniero at unina.it
Thu May 17 07:05:55 MST 2007


Kevin P. Fleming ha scritto:
> Lorenzo Miniero wrote:
> 
>> However, since we're covering the subject, there's a feature that I
>> think could be safely and harmlessly added anyway, i.e. getting
>> information upon the negotiated codecs in a channel. Currently the only
>> way to understand which audio and/or video codec has been negotiated is
>> waiting for a frame and look at its subclass: which means that, as long
>> as no frame is received, there's no way to know this. The same
>> information polling approach could also apply at several other aspects
>> of the underlying media, since, while signaling protocols are a lot,
>> always RTP is used.
> 
> This is not true; there are variables in the ast_channel structure that
> reflect the codecs that the channel is capable of supporting, which one
> is currently in use, and what codec the channel's media is currently
> being transcoded to/from.
> 


If you're talking about readformat/writeformat, I assume they're 
bitmasks containing the negotiated formats, even though I couldn't find 
a way to correctly take advantage of them. I just tried it with Ekiga 
(SIP call, GSM negotiated for audio and H.261 for video) and they both 
have a 4 value (AST_FORMAT_ULAW), which looks incorrect if I got their 
meaning well (should have been AST_FORMAT_GSM=2 + 
AST_FORMAT_H261=262144). Or am I doing something wrong?

Thanks,
Lorenzo

-- 
Lorenzo Miniero, Junior Researcher
Dipartimento di Informatica e Sistemistica
Università degli Studi di Napoli "Federico II"
Via Claudio 21 -- 80125 Napoli (Italy)
Phone: +390817683821 - Fax: +390817683816
Email: lorenzo.miniero at unina.it


More information about the asterisk-dev mailing list