russellbryant.net

Asterisk Open Source Software Engineering

russellbryant.net header image 2

Asterisk 1.6, Now with a New Timing API

June 16th, 2008 · 22 Comments

For as long as I have been involved with the project, Asterisk has used DAHDI (Zaptel) to provide timing. This has worked great, since the timing was usually provided by telephony hardware. Then, we had the ztdummy kernel module to provide timing from other parts of the kernel.

However, a lot of people have not been happy with this. Most Asterisk users don’t have telephony hardware to provide timing. Also, ztdummy does not work on all systems. Also, DAHDI was originally only for Linux.

Starting with Asterisk 1.6.1, you will no longer need DAHDI installed at all to get proper timing in Asterisk. There is a new timing API, and there are already two implementations. There is a DAHDI timing interface (res_timing_dahdi) and another (res_timing_pthread) that has no special kernel requirements.

Keep in mind, that MeetMe, the Asterisk conferencing application, still requires DAHDI. MeetMe uses the DAHDI conference mixing. It doesn’t just use it for timing. However, do not worry! Coming soon, we will have a new bridging API that provides software conference mixing, among many other benefits. The code is pretty much done. It just needs some more documentation polish and a bit of code review. Then, you will not need DAHDI for conferencing either.

Timing API

res_timing_dahdi

res_timing_pthread

Josh’s bridging code:

$ svn co http://svn.digium.com/svn/asterisk/team/file/bridging

Tags: Asterisk · Development

22 responses so far ↓

  • 1 Diego Viola // Jun 17, 2008 at 3:12 pm

    One word: SEXY!

    I been waiting for this for a LONG TIME.

    Keep up the great work! =D

  • 2 Diego Viola // Jun 17, 2008 at 3:14 pm

    Can MeetMe be adapted to use this new timing without the need to use DAHDI?

  • 3 russell // Jun 17, 2008 at 3:42 pm

    Nope, as I tried to explain, MeetMe() does not only use DAHDI for timing. MeetMe() uses DAHDI for the entire conference mixing engine. So, it would be a new conferencing application to remove DAHDI from the requirements.

    However, Joshua Colp (file) has already done this. He has been working on a bridging API which includes a new conferencing application that uses it. The code is very close to being ready for merging. Once it is in, conferencing in Asterisk will no longer require DAHDI, if you use the conferencing application.

  • 4 Diego Viola // Jun 17, 2008 at 3:43 pm

    I mean, something like this:

    “If present use DAHDI otherwise use the internal timing”

  • 5 Diego Viola // Jun 17, 2008 at 3:44 pm

    It would rock to have 100% soft-based conferencing already.

  • 6 Diego Viola // Jun 17, 2008 at 3:46 pm

    Oh I got it now.

    Thanks for explaining Russell.

  • 7 Diego Viola // Jun 17, 2008 at 5:09 pm

    Will the app_confbridge be released in 1.6.1 as well?

  • 8 ø A New Timing API for Asterisk, Silencing Digium Critics ø // Jun 17, 2008 at 9:05 pm

    [...] Bryant has post details of a new timing API for Asterisk: Starting with Asterisk 1.6.1, you will no longer need DAHDI installed at all to get [...]

  • 9 Diego Viola // Jun 18, 2008 at 12:52 pm

    With this new timing API I confirm that Digium listen to their users.

    Keep up the great work guys!

  • 10 Diego Viola // Jun 18, 2008 at 3:46 pm

    This will be very useful for me, I tried to use MeetMe() on a XEN VM once and ztdummy.ko failed to load there… so I had to move my asterisk server to a dedicated (real computer) machine.

    This means that with the new timing API, when the new application for conferencing comes out, it will work well inside a virtual machine right?

  • 11 russell // Jun 19, 2008 at 9:24 am

    Yes. In fact, it has already been tested in Xen by some community members and has been reported to work very well.

  • 12 Andres // Jun 19, 2008 at 1:08 pm

    Does this means that on the future would be easier to run Asterisk on XEN enviroments ?

    ztdummy was a nightmare on such as enviroments!

  • 13 russell // Jun 19, 2008 at 1:21 pm

    … yes. :)

  • 14 jeffg // Jun 19, 2008 at 9:21 pm

    > It just needs some more documentation polish

    You’ll reach a wider audience if you write the docs in English ;)

    /me ducks

  • 15 Diego Viola // Jun 22, 2008 at 4:05 pm

    OMFG.

    Can’t wait, Asterisk 1.6 WILL ROCK so much and is going to kick ass.

    Thanks for the hard work you put into this Russell, I have no doubts that 1.6.0+ will be one of the best asterisk releases ever.

    Your work is very recognized and admired.

    Keep it up! :D

  • 16 David // Jul 18, 2008 at 9:12 am

    Hello was reading your article about 1.6.1 rtp timing and was wondering how i could get the source for the 1.6.1 for testing with our voice application.

    Thank you.

  • 17 russell // Jul 18, 2008 at 9:27 am

    This code will be in Asterisk 1.6.1. However, 1.6.1 is still in full development and does not have its own branch yet. Basically, to get the current code that will eventually become 1.6.1, you should check out the main development trunk.

    $ svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk

  • 18 Klaus // Sep 3, 2008 at 3:41 am

    Is iax2 trunking supported?

  • 19 russell // Sep 3, 2008 at 6:46 am

    Yes, it is.

  • 20 John Peterson // Nov 12, 2008 at 7:15 pm

    Does the current 1.6.1 beta now support a conferencing application that will run in Xen environments? Be it MeetMe or something else? If something else, whats the application, way to configure it and what branch should I grab.

    Thanks!

  • 21 Francois // Nov 24, 2008 at 6:50 pm

    I’ve just tried to compile this. Everything works fine except if I try to compile app_confbridge… really a matter to use conferencing!

    How often should I try again?
    How can I be useful?

  • 22 VoIP is Everywhere! » Blog Archives » Время и Asterisk // Dec 24, 2008 at 7:36 am

    [...] Asterisk 1.6, Now with a New Timing API [...]

Leave a Comment