[asterisk-dev] AST_FRAME_DIGITAL

Klaus Darilion klaus.mailinglists at pernau.at
Thu Sep 13 04:40:27 CDT 2007



Russell Bryant schrieb:
> Klaus Darilion wrote:
>> What about G3 fax. It is rather the same as 3G video:
>>   fax delivers images over a telephone line
>>   3G video deliver audio and video over a telephone line
>>
>> In case of G3 fax, the image data is modulated
>> In case of 3G video, the audio/video is multiplexed with H223.
>>
>> Currently fax is handled inside an application. Taking your argument, 
>> the fax decoder should be in the channel driver and deliver 
>> AST_FRAME_IMAGE (maybe one per page) to Asterisk's core. But I think the 
>> current implementation which is a single application is much better then 
>> adding modem functionality to each channel driver.
>>
>> IMO it is much more flexible only add support for generic data 
>> (AST_FRAME_DIGITAL) to channel drivers. Then, new services and features 
>> can be added as application without touching the code of channel drivers.
> 
> Faxes are passed into Asterisk using the VOICE frame type, indicating that it is
> audio.  In the case of T.38, it uses the AST_FRAME_MODEM type.

On high level fax is a picture. On the low level it is audio.
On high level 3G video is video/audio. On the low level is is digital data.

Thus, Asterisk bridges fax call on low level (the AST FRAME includes 
audio, not pictures). And the decoding (audio-->picture) is done in an 
application.

The same we want to have for 3G video. Asterisk should bridge it on the 
low level and the decoding is done in an application which allows 
feeding the decoded audio and video back to Asterisk using pseudo channels.

> Another reason that this must be handled using the VOICE and VIDEO frame types
> is bridging with channels that are not ISDN channels.  What if you want to
> connect a voice/video ISDN call to SIP?  The way that you propose, it will not
> be possible.

Is is already possibly and works like a charm:

chan_zap just receivs the digital data and puts it into an AST_FRAME. 
The called extension starts the application h324m_gw. This application 
receives the raw data from the zap channel and decodes h324m into 
AST_FRAME_AUDIO and AST_FRAME_VIDEO. Then it requests a pseudo channel 
and feeds the audio and video frames into the pseudo channel. The pseudo 
channel continues dialplan execution and for example Dial(SIP/123).

Works like a charm - with the need to add the whole h324m decoding in 
the channel_driver.

For people who do not follow asterisk-video. 3G video <--> SIP and SIP 
<--> mp4_play/save and 3G video <--> mp4_play/save is already working. 
We just want to get most of the code into Asterisk - and by telling us 
that we have to add 3G video decoding into each channel driver is not 
the right way.

regards
klaus

 > This is why _every single channel driver_ in Asterisk decodes the
> technology specific stream of voice and video and passes them into Asterisk
> using the primitive frame types.
> 



More information about the asterisk-dev mailing list