Asterisk: DADHI module not working when using Xen

If you want to use any Asterisk module that needs a timer, like MeetMe, you have to use a module named dahdi (previously named zaptel). DAHDI has one module for each Digium supported card (B410P), and a dummy module (named dahdi_dummy) if you don’t have a hardware card, like me.

The problem appears when you have your Asterisk in a Xen environment. Xen does not allow the use of the RTC, so when using Dahdi/meetme, you get the following in you logs:

res_timing_dahdi.c: Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection.

So get the sources, and let’s patch it!

svn co http://svn.digium.com/svn/dahdi/linux-complete/trunk DAHDI

In dahdi_dummy.c, you’ll have to comment the two defines USE_RTC, as in a Xen, you can’t use it:

Then compile the module, as usual, with :

Verify that your module has been correctly installed:

Comment out all the defined modules in the /etc/dahdi/modules file.

facebooktwittergoogle_plusredditpinterestlinkedinmail
Comments Closed
  • mark says:

    So with your “patches”, asterisk is working well with in a xen environment? Im assuming your using full virtualization? What OS and asterisk version are you using? I noticed the kernel version is a bit high, so im assuming its not centos.

  • admin says:

    It’s not really a patch, just commented lines :-). Anyway, I’m not using full virtualization, but it works fine. My configuration (Debian Lenny domU on an Ubuntu server as the dom0) is a little unconventional as the SIP conversion is not done by Asterisk but by a Patton router that connects as a client on the Asterisk. In our company we haven’t any problem (lag/latency/echo, or anything like that) and we’re around 10 people (3 or 4 simultaneous calls).

  • Willgathernomoss says:

    Excellent post, really helped me out. Many thanks for taking the time to share this!

    Do you mind if I cross post this in the Citrix Xen Server forums (attributed to you, of course)?

    Thanks again.

  • Obstblog says:

    Schmerzfreie Asterisk/DAHDI-Installation…

    Asterisk ab 1.4.20 oder so und die 1.6er Version sowieso wollen DAHDI anstelle von zaptel. Beide werden sowohl zum Ansteuern von Telefonie-Hardware als auch als Dummy-Timer (herst, was hab ich für nen Satzbau heute) für Telefonkonferenzen (MeetMe, zu…

  • admin says:

    @Willgathernomoss: OK, no problem.