[Asterisk-Dev] read callback function never is launched

Kristian Nielsen kn at sifira.dk
Mon May 9 05:07:47 MST 2005


Pere Sáez Garcia <peresaezgarcia at hotmail.com> writes:

> hello,
> MyChannel read callback function never is launched by Asterisk. In
> chan_SIP that function is launched every n seconds.  I have connected
> MyChannel with SIP channel and i need Asterisk launch read callback
> function to pass audio from MyChannel to SIP channel via Asterisk.
> 
> What is needed to Asterisk launched read callback function?

The read callback is launched when data is ready on one of the file
descripters in the fds array in the struct ast_channel returned from the
requester callback. Some of the code in asterisk (#ifdef ZAPTEL_OPTIMIZATIONS)
uses an open zaptel device to put into the array and have the read
callback launched periodically. Alternatively you can set up a separate
thread with an ast_sched structure to periodically call
ast_queue_frame(); this has the same effect as returning a frame from
the read callback.

 - Kristian.

-- 
Kristian Nielsen   kn at sifira.dk
Development Manager, Sifira A/S




More information about the asterisk-dev mailing list