login | register
Sat 17 of May, 2008 [09:37 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.58s
  • Memory usage: 2.26MB
  • Database queries: 30
  • GZIP: Disabled
  • Server load: 1.39

Asterisk timer ztdummy

How to compile ztdummy

ztdummy is a Linux kernel module that will provide your Asterisk with a Zaptel timer even if you don't have any Digium hardware installed in your Linux server. For Linux kernel version 2.4 the ztdummy module takes timing from the usb-uhci kernel module, which should be loaded before ztdummy. Note that usb-uhci must not be compiled into the kernel, it'll only work with ztdummy if loaded as a module! On kernel version 2.6 ztdummy uses internal high-resolution kernel timer and does not require any USB. Using the internal kernel timer is recommended.

General instructions for compiling all of the zaptel modules including ztdummy are here: Asterisk Zaptel Installation

Do you have the correct USB Controller?

If you are using a Linux 2.4 kernel you will need a USB controller to use ztdummy.
There are two types of USB controller chips used on motherboards: USB OHCI and USB UHCI. To use ztdummy, you need an USB UHCI type controller on the motherboard, as the OHCI chips work very differently. If you do not have an appropriate USB controller as a timing source, then you should use Asterisk zaprtc. It was originally written by Klaus-Peter Junghanns and is distributed at http://www.junghanns.net/asterisk/.

  1. To check if you have the usb_uhci module, do lsmod
  2. Check out the zaptel module from the Asterisk CVS repository
  3. Make sure you have the Linux Kernel source files installed
  4. Edit the Makefile and remove the '#' in front of ztdummy in the top
  5. Do a make all
  6. Do make install
  7. To load the ztdummy, do modprobe ztdummy

You will probably want to include 'modprobe ztdummy' in your /etc/rc.d/rc.local to make sure it is present at startup before Asterisk is launched.

Additional info


This page contains outdated information. Now that 2.6 kernels are norm, it still talks about 2.4 and 'make linux26' which have been deprecated.
Also these instructions do not work on Fedora 6/7 as of kernel 2.6.22.1-32 . These are the errors when doing modprobe ztdummy after compilation
ztdummy: Unknown symbol rtc_register
ztdummy: Unknown symbol rtc_unregister
ztdummy: Unknown symbol rtc_control

even though crc_ccitt is set as M. here is the output from lsmod | grep zaptel
zaptel 186404 0
crc_ccitt 6337 1 zaptel

There is a bug opened with Digium

http://bugs.digium.com/view.php?id=10426

Install instructions for CentOS as of 3/10/2008 for ztdummy timer only


Install the CentOS kernel sources (google it)
Build the kernel source
Make sure /usr/src/kernel/.config is your kernel config
Make sure /lib/modules/`uname -r`/build points to your kernel directory

Required Packages:
  1. Subversion
  2. ncurses
  3. ncurses-devel
  4. newt
  5. newt-devel
  6. bison
  7. bison-devel

cd /usr/src
svn co http://svn.digium.com/svn/zaptel/tags/1.4.2.1 zaptel
cd zaptel
./configure
make
make install
make config
vi /etc/init.d/zaptel
change
    this: action "Removing zaptel module: " rmmod zaptel
    to: action "Removing zaptel module: " rmmod ztdummy zaptel
mkdir -p /var/lib/digium/licenses/
useradd asterisk
echo zap/*:asterisk:asterisk:660 >> /etc/udev/permissions.d/50-udev.permissions
/sbin/udevstart
/etc/init.d/zaptel start
chkconfig --add zaptel

/etc/init.d/zaptel

If you are running a RedHat based system run
  $ make config
from within the zaptel source directory. This will create a file called zaptel in /etc/init.d/. Edit the file and search or MODULES and RMODULES, you will see a list of all of the zaptel modules i.e. wcfxo and wctdm(OLD:wcfxs). I deleted all of the entires with the quotes "" becasue I didn't have any additional hardware and added ztdummy to both fields. You can probably just add ztdummy to the list.

Now if you type
   $ sudo service zaptel start
ztdummy should be running. If you use the ntsysv or similar gui utility you can ensure the service starts after all reboots.

Installation for Red Hat/Fedora/CentOS Linux 2.6 kernels and recent Zaptel sources

  1. Check out the zaptel module from the Asterisk CVS repository
  2. Make sure you have the Linux kernel source files installed
  3. cd to the zaptel source directory
  4. Do make linux26
  5. Do make install
  6. Do make config
  7. Edit /etc/sysconfig/zaptel and comment or delete all MODULES lines except the one referencing ztdummy. Be sure to uncomment the ztdummy line.
  8. Do /etc/init.d/zaptel start to start zaptel and ztdummy
  9. Use chkconfig as usual to automate zaptel and ztdummy startup
  10. Follow the instructions in README.udev so that /dev/zap/pseudo is created with the correct permissions during boot.

Notes: USB existence/type are irrelevant on Linux 2.6 kernels because timing is performed within the kernel. Use lsmod to verify that both zaptel and ztdummy are loaded. If you see "chan_zap.c: Unable to open '/dev/zap/pseudo': No such device or address" in /var/log/asterisk/full, make sure that you followed the instructions in README.udev and edited /etc/udev/permissions.d/50-udev.permissions to include "zap/*:asterisk:asterisk:660". Reboot to make udev changes effective.

undefined reference to `uhci_devices'

I was just on the phone with Digium about getting the ztdummy module to compile and load. I followed the instructions above and I was unable to build the module. I kept getting the following errors (RH 7.3, 2.4.20-28.7 Kernel, all updates):

   # make ztdummy
   cc ztdummy.o -o ztdummy
   /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function `_start':
   /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18): undefined reference to `main'
   ztdummy.o: In function `init_module':
   ztdummy.o(.text+0x7): undefined reference to `uhci_devices'
... more errors ...
   collect2: ld returned 1 exit status
   make: *** ztdummy Error 1

Digium suggested the following:

1. Edit Makefile and uncomment ztdummy from the "MODULES" line.
2. Run the command "touch ztdummy.c"
3. Then "make; make install"
4. After that, issuing a "modprobe ztdummy" loaded the module

It worked for me, although this does confuse me a bit, as "make ztdummy" still creates the same errors. Go figure.

Update: Actually, it's quite reasonable - the Makefile tries to build an executable "ztdummy". As there is no code for an executable (read: main(...) ) it fails with the above errors. If you just want to build the ztdummy module, use "make ztdummy.o" for kernels 2.4 or "make ztdummy.ko" for 2.6 respectively.

Auto-Load ztdummy

Add the following to your /etc/modules.conf to get ztdummy to load at boot.

   alias char-major-196 ztdummy

ztdummy and Kernel 2.6

Recent CVS versions (as of July 2004) also have zaptel modules which work with 2.6 kernels (type "make linux26" to compile them). The 2.6 version of the ztdummy module is completely different to the 2.4 version. Firstly it does not rely on the USB hardware being there; instead it uses the PC hardware's clock (which under 2.6 kernels can be set to generate interrupts at the required precision), so it can be used on any machine, rather than only those with the right USB hardware. Effectively the 2.6 version of ztdummy does the same job as zaprtc does for 2.4 kernels. I have been using ztdummy for 2.6 for a while now, and have had no problems with it.

Update May '05: Timing problems with IAX and MeetMe and a possible solution for 2.6
Please read this and take a look at bug 4301.

Further Update Jan '06: Tony Mountifield' 2.6 timer patches (May '05) are now in ztdummy, however, they require >=2.6.13 to build.
upgrading to from 2.6.12 to 2.6.15 made my zttest score go from 98.5% to 99.95%. This improvement should be sufficient to run
meetme. (but watch out for some scsi driver changes in the kernel.)

To install, simply checkout zaptel from the Asterisk CVS and do the following:

- cd /usr/src/zaptel
  • READ /usr/src/zaptel/README.udev and follow the steps
  • check modules on: /etc/sysconfig/zaptel> if you have no digium hardware comment out all modeules except ztdummy.
- make linux26
- make install
- Reboot to make udev changes take effect
- modprobe zaptel
- modprobe ztdummy

Should be working. If you are having any problems with the compile, try:

- As root
- /usr/src/linuxsrc2.6.whatever/#> make cloneconfig && make modules

FATAL: Error inserting ztdummy (/lib/modules/2.6.x.x/misc/ztdummy.ko): Unknown symbol in module, or unknown parameter (see dmesg)

The kernel has to be recompiled with CONFIG_CRC_CCITT=y or CONFIG_CRC_CCITT=m. To do this, run 'make menuconfig' and change it under 'Library Routines -> CRC-CCIT functions'. If you compiled it as a module,
load it, otherwise reboot. If the problem persists, enable RTC in the kernel.


undefined reference to "unlink_td" (wrong UHCI driver)

If you get unresolved symbols when you try to load the module and one of the unresolved symbols is "unlink_td" you probably compiled the alternate UHCI drivers instead of the standard one. Apparently ztdummy needs the standard UHCI driver built in the kernel to work correctly. Go back and do a 'make menuconfig'. Unselect the alternate UHCI driver and select the standard one as a module. One you do rebuild the kernel and modules it should work. Install the new kernel and modules and reboot.


WARNING: Error inserting rtc (/lib/modules/2.6.x.x/kernel/drivers/char/rtc.ko): No such device

This occurs because module genrtc is loaded. genrtc emulates rtc, you must unload genrtc and load rtc, then you can load tzdummy.
# modprobe ztdummy
WARNING: Error inserting rtc (/lib/modules/2.6.x.x/kernel/drivers/char/rtc.ko): No such device
WARNING: Error inserting rtc (/lib/modules/2.6.x.x/kernel/drivers/char/rtc.ko): No such device
FATAL: Error inserting ztdummy (/lib/modules/2.6.x.x/misc/ztdummy.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error running install command for ztdummy
# dmesg
ztdummy: unresolved symbol zt_unregister
ztdummy: unresolved symbol zt_transmit ztdummy: unresolved symbol zt_receive
ztdummy: unresolved symbol zt_register
# lsmod | grep rtc
genrtc                  9984  0
# rmmod genrtc
# modprobe rtc
# modprobe ztdummy


You can tell that you are loading the wrong UHCI drivers in other ways...

1. The alternate driver usually doesn't load by default.
2. The alternate driver exists and is the only uhci module.
3. The alternate driver is called simply 'uhci.o' instead of the standard one 'usb_uhci".

Update June '06: For best results with ztdummy, use at least a 2.6.13 kernel with one or both of the following built in to the kernel:
Processor Type and Features --> Timer frequency (set this to 1000 Hz)
Device Drivers --> Character devices --> Enhanced Real Time Clock Support


See Also

Created by oej, Last modification by linkx on Tue 11 of Mar, 2008 [07:32 UTC]

Comments Filter

Out of date instructions...

by Periklis on Thursday 07 of June, 2007 [16:52:48 UTC]
I have Asterisk-1.4.4, zaptel-1.4.2.1 using FC5. I think that the instructions for installing ztdummy in similar "machines" are out-of-date...
Please re-new them...
(Excuse my indications but i spend two days searching what is going on but nothing...)

ztdummy: Unable to compile with 2.6.18

by Ming Jiang on Monday 06 of November, 2006 [16:17:48 UTC]
I got this error when trying to do make linux26 on zaptel-1.2.10:
Missing linux/config.h

I've read that in the latest 2.6 kernel, the support for legacy header files like config.h has been removed. I had a similar problem when compiling MadWifi driver on a Fedora Core 6 machine(2.6.18-1.2798) and it was resolved after applying a patch from Madwifi which corrected the #include in source file so that it will be compatible with the latest kernel. Has anyone else noticed this problem? Maybe we should notify the guys at Digium to update the source files.

ztdummy: Unable to register zaptel rtc driver

by Friedrich Schäuffelhut on Monday 30 of October, 2006 [09:31:15 UTC]
I got this answer from modprobe on a 2.6.18 kernel (zaptel-1.2.9.1):
ztdummy: Unable to register zaptel rtc driver

The Problem was a new kernel option CONFIG_HPET_RTC_IRQ which basically disabled
the rtc_register function. So if you want to use ztdummy with a recent 2.6 kernel do not
activate the HPET feature. More precisely HPET should not be allowed to control the RTC interupt.

Device or resource busy / Unable to register zaptel rtc driver

by perepo on Monday 13 of March, 2006 [22:45:58 UTC]
If modprobe answers:
FATAL: Error inserting ztdummy (/lib/modules/XXX/misc/ztdummy.ko): Device or resource busy
and dmesg says
ztdummy: Unable to register zaptel rtc driver
then check that no other application is using /dev/rtc. A usual culprit is an NTP daemon. It seems only one application can use the RTC :-(

Re: How to get rid of ztdummy compile errors

by Real name on Tuesday 18 of October, 2005 [02:34:27 UTC]
It's a nastly little module that asterisk uses for no good reason.

Linux has accurate POSIX real-time timers now. I think Solaris and *BSD have them too. These should be used for timing, not some obsolete hack that does a bad emulation of a timer that Digium supplies with their PCI boards.

debian

by dros7 on Friday 01 of July, 2005 [00:47:45 UTC]
For debian make sure you have the corrrect kernel-headers-2.*** installed
Edit

make linux26

by Anonymous on Sunday 06 of February, 2005 [00:48:58 UTC]
don't forget to run make install after that (and before probing for modules)

cannot insmod ztdummy

by compuholic on Sunday 21 of November, 2004 [10:39:06 UTC]
hi!

i use debian 2.4.27-1-386
i cannot insmod ztdummy. error:


Using /lib/modules/2.4.27-1-386/misc/ztdummy.o
/lib/modules/2.4.27-1-386/misc/ztdummy.o: /lib/modules/2.4.27-1-386/misc/ztdummy.o: unresolved symbol zt_unregister
/lib/modules/2.4.27-1-386/misc/ztdummy.o: /lib/modules/2.4.27-1-386/misc/ztdummy.o: unresolved symbol zt_transmit
/lib/modules/2.4.27-1-386/misc/ztdummy.o: /lib/modules/2.4.27-1-386/misc/ztdummy.o: unresolved symbol zt_receive
/lib/modules/2.4.27-1-386/misc/ztdummy.o: /lib/modules/2.4.27-1-386/misc/ztdummy.o: unresolved symbol zt_register


when i compile it i get a lot of warnings but no errors:


gcc -I/usr/src/linux-2.4/include -O6 -DMODULE -DKERNEL -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I /usr/src/linux/include -I/usr/src/linux/include/net -DSTANDALONE_ZAPATA -c zaptel.c
In file included from /usr/src/linux/include/linux/spinlock.h:6,
                from /usr/src/linux/include/linux/module.h:12,
                from zaptel.c:44:
/usr/src/linux/include/asm/system.h: In function `__set_64bit_var':
/usr/src/linux/include/asm/system.h:190: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/linux/include/asm/system.h:190: warning: dereferencing type-punned pointer will break strict-aliasing rules


please help

thanx



Fedora Core 2 Compiling

by rtaylor on Monday 15 of November, 2004 [07:11:55 UTC]
The FC2 kernel source package has a different version to FC2 kernel which breaks modprobe of ztdummy

create link /usr/src/linux-2.6
Remove "custom" from the Kernel source Makefile's EXTRAVERSION line
make modules
you can break compliation (ctrl-C) so you don't have to wast time compiling it all
in zaptel src dir
make linux26
make install
modprobe

See
http://lists.digium.com/pipermail/asterisk-users/2004-November/071940.html
Edit

Litnimax

by Anonymous on Friday 27 of August, 2004 [23:35:19 UTC]
After zaptel installation do not forget to recompile asterisk. Only after re-building * you get app_meetme.so
and app_zap*.
I spent 30 minutes to find it out (:redface:)

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver