0

I have tried to look for simple language of explanation what is timing source for in asterisk? and why it has significant impact on the asterisk

Anyone can give me insight will be appreciated

jakarta512
  • 127
  • 8

2 Answers2

5

A timing source is exactly what it sounds like - a reliable source of a fixed frequency signal used for timing (Asterisk uses it for, among other things, the RTP stream and recording playback).

Timing sources may be software, or hardware (via supported analog or digital line cards).
Hardware timing sources have the advantage of not being affected by system load, and can provide a more reliable timing source which avoids "hiccups" in recording playback during periods of high load.

As line cards are relatively cheap (supported Digium cards can be purchased new for under $300) it is often recommended to purchase a low-end line card to use as a timing source, even if your environment is going to be strictly VOIP with no telco connections.

voretaq7
  • 79,879
  • 17
  • 130
  • 214
1

Asterisk requires timing for IAX trunking and for conference calls, and also uses timing for Music on Hold, other audio playback, syncing RTP streams as @voretaq7 mentioned, and some other things I can't remember right now. The general idea is that audio has to be played at exactly the right time so that it sounds correct and isn't choppy or distorted.

You can get timing with one of two asterisk drivers (not both at the same time):

  • dahdi (formerly zaptel): Uses the timing source from a DAHDI/Zaptel or compatible FXO/FXS card.
  • dahdi_dummy (formerly ztdummy): Linux-only; uses one of several possible timing sources provided by the Linux kernel, such as the real-time clock, HPET, or some USB controllers.

(As @sruffell noted in comments below, the functionality of dahdi_dummy has been rolled into dahdi since 2.3.0, so a new installation will probably only need dahdi for timing, whether a line card is present or not.)

If you're using Linux, you can use the dahdi_dummy driver to provide timing; if you deploy Asterisk on any other OS, you'll need the dahdi driver and a supported card, even if you don't use any of the channels on the card.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • This is answer is slightly out of date. dahdi_dummy has been deprecated since dahdi-linux 2.3.0. The core of dahdi will now always provide the best source of timing it can. If there is a telephony card available, it will sync the timers to the clock on the card. If one is not available DAHDI will automatically use kernel timers without requiring the 'dummy' span driver. So basically as long as DAHDI is loaded, it will do the right thing with respect to timing. – sruffell Aug 26 '12 at 06:36
  • @sruffell You must be a DAHDI coder. :) Thanks for the clarification. – Michael Hampton Aug 26 '12 at 06:39
  • I'm busted. :) Although a question about timing came up on the Asterisk mailing list which could help if someone comes across question in the future: http://article.gmane.org/gmane.comp.telephony.pbx.asterisk.user/271494 – sruffell Sep 21 '12 at 01:27