[asterisk-dev] [Code Review] Documentation for the timing modules used in Asterisk
Kevin P. Fleming
kpfleming at digium.com
Mon Mar 2 11:57:42 CST 2009
Mark Michelson wrote:
> My biggest concern with the document as-is right now is the "What Asterisk does
> with the Timing Interfaces" section. It explains Asterisk's preference for which
> timing interfaces pretty well, but I also wanted to use the section to explain
> exactly what internal timing is used for. Right now, I have a single sentence
> stating that internal timing is required for IAX2 trunking. I would like to
> expand this section to include other instances where internal timing is used, as
> well as potential benefits for using internal timing. As far as I understand,
> the only other place where Asterisk currently uses internal timing is for file
> playback. Are there other situations where internal timing is used? Are there
> any inherent benefits to using internal timing as opposed to ... whatever the
> alternative is?
In addition to IAX2 trunking, timing is used by generators to generate
audio frames from 'recorded' sources (filestreams, used by playback
operations and musiconhold). In the past, the timing of the incoming
stream was used to do this, but if the incoming stream is not reliable
(like if the device stops sending audio because it doesn't want to
transmit silence), then there would be no outgoing stream either. If
internal_timing is enabled, then these streams will *always* go out on
schedule, regardless of the incoming stream. This is also why when DAHDI
timing is in use, but DAHDI has not been configured (and thus is not
generating 'ticks'), Playback and Background don't generate any audio in
many circumstances.
Timing is also used when frames are queued on a channel, to trigger
ast_read() into reading them, although in this case it's just a trigger
mechanism, it doesn't actually generate events on intervals, and the
choice of timing source is not really relevant (they all provide the
same continuous triggering).
I don't know of any other uses of timing sources in Asterisk 1.6.1.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming at digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list