Zaptel NOT installed on system with no compatible hardware

Lost Trunk

Guru
Joined
Aug 5, 2008
Messages
228
Reaction score
0
I touched on this in a reply in a previous thread but after trying a few more things (including update-source, update-scripts and update-fixes) I think I can say pretty definitely that Zaptel is NOT being installed on this system, and it has something to do with not seeing the source code. Here's part of the log from the update-source run:

Code:
make[1]: Entering directory `/usr/src/zaptel'
echo "You do not appear to have the sources for the 2.6.18-92.1.6.el5 kernel installed."
You do not appear to have the sources for the 2.6.18-92.1.6.el5 kernel installed.
exit 1
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/zaptel'
make: *** [all] Error 2
make[1]: Entering directory `/usr/src/zaptel'
echo "You do not appear to have the sources for the 2.6.18-92.1.6.el5 kernel installed."
You do not appear to have the sources for the 2.6.18-92.1.6.el5 kernel installed.
exit 1
make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/zaptel'
make: *** [all] Error 2
install -D zaptel.init /etc/rc.d/init.d/zaptel
install -D ifup-hdlc /etc/sysconfig/network-scripts/ifup-hdlc
/sbin/chkconfig --add zaptel
Zaptel has been configured.

If you have any zaptel hardware it is now recommended to
edit /etc/default/zaptel or /etc/sysconfig/zaptel and set there an
optimal value for the variable MODULES .

I think that the zaptel hardware you have on your system is:
gcc -g -O2 -I.  -g -fPIC -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"
-o zttool.o -c zttool.c
gcc -g -O2 -I.  -g -fPIC -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"
-o zttool zttool.o  -lnewt
removed `/usr/local/sbin/genzaptelconf'
`/usr/src/zaptel/kernel/xpp/utils/genzaptelconf' -> `/usr/local/sbin/genzaptelconf'
As noted in my earlier post, we have no zaptel-compatible hardware but still would expect that ztdummy would be used, but apparently it is not. My earlier post is here: http://pbxinaflash.com/community/threads/resolved-zaptel-ztdummy-missing-how-to-fix.588/?t=588

And my status shows:
Code:
********************************************************************
*           PBX in a Flash Version 1.2 Daemon Status               *
*                      Running Asterisk 1.4                        *
********************************************************************
* Asterisk  * ONLINE  * Zaptel    * OFFLINE * MySQL      * ONLINE  *
* SSH       * ONLINE  * Apache    * ONLINE  * Iptables   * ONLINE  *
* Fail2ban  * ONLINE  * Ethernet0 * ONLINE  * IP Connect * ONLINE  *
* BlueTooth * ONLINE  * Hidd      * ONLINE  * NTPD       * ONLINE  *
* Sendmail  * ONLINE  * Samba     * ONLINE  * Webmin     * ONLINE  *
********************************************************************
* Running Asterisk Version : Asterisk 1.4.21.2
* Asterisk Source Version  : 1.4.21.2
* Zaptel Source Version    : 1.4.11
* Libpri Source Version    : 1.4.7
* Addons Source Version    : 1.4.7
********************************************************************
CentOS release 5.2 (Final) - 32 Bit ** Kernel: 2.6.18-92.1.6.el5
One other observed bug during the updates - the permissions were not properly fixed on the var/lib/asterisk/sounds subdirs ha and wx (the directory execute permissions weren't set). They HAD been set properly (I assume, at least the sounds in the WX directory worked) before I did the updates, but afterwards those two subdirs in sounds had more restrictive permissions.
 
Last edited by a moderator:

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
Sorry guys I am in the airport at the moment shuttling to my programming job in the back and the beyond.

I suspect you have done a yum update outside of update-source.

I believe that when you run yum update outside of the update-source program that it causes a lot of problems. Your zaptel problems may be related to the zaptel source not being patched and running centos 5.2. Zaptel will not compile without the patch under centos 5.2. Digium knows about this, has posted a suggested solution, but has not released an updated version of zaptel as of today.

The code to apply the patch is not present in earlier versions of update-source. (current version is 1.3.9 released 080808)

I would recommend the following to get zaptel to compile.

1. Same old run update-scripts, update-fixes, update-source, update-fixes in that order.

2. during update-source do a kernel upgrade, yum update (FROM WITHIN THE update-source PROGRAM ONLY!), Since you do not have any Digium - et al hardware DO NOT install HPEC,

3. After the final reboot of update-source run the update-fixes and then look in the /var/log/update-source.log and read through it looking for errors in the zaptel configuration portion. Let me know if you find any (in the zaptel portion only please) (yes it is long)

Once you have done this try running zttool to see if ztdummy is available but unconfigured. If so you are done.


If not then try applying the patch manually and then recompile.

1. log into the CLI as user root
2. cd /usr/src/zaptel
3. wget http://pbxinaflash.org/ast14/files/xdefs.patch
4. patch xdefs.h < xdefs.patch
5. make clean
6. ./configure
7. make
8. make install
9. make config
10 genzaptelconf -dsv

Beyond that i have no ideas. I have been considering wrapping yum with a warning wrapper so when someone tries to do yum update it tells them that it should only be run from within the update-source program.

As for permission problems. if you make a list of what folders have incorrect permissions I will look at it when I get back in 10 days or so.

Regards

Tom
 

Lost Trunk

Guru
Joined
Aug 5, 2008
Messages
228
Reaction score
0
Sorry guys I am in the airport at the moment shuttling to my programming job in the back and the beyond.

Hey, thanks much for taking the opportunity to assist, it was very much appreciated!

I suspect you have done a yum update outside of update-source.

Nope. I've only had PiaF up for a week, and the ONLY updates I have done have been with your update scripts. I try not to do too much geeky type stuff if I can possibly avoid it. On our old system I don't think CentOS had ever been updated (certainly not in the last year or so). And beyond that, I ran your update scripts just last night (that was my first attempt to solve this problem).

I think I only used yum to install a couple perl modules that we call from agi scripts, and I wouldn't have done that if I'd known I could do it from Webmin (learned that browsing through Webmin the other night).

However I will note that if you really don't want people to do a yum update (or only run yum within your scripts) it would probably be a good idea to make that a lot more clear, because I had no idea that was something you shouldn't do until today.

Anyway, just so it is clear, here is what I did to get it to work (following your advice in the other thread at http://pbxinaflash.com/community/threads/resolved-zaptel-ztdummy-missing-how-to-fix.588/?t=588 but slightly modified here to avoid mistakes):

First, I attempted to follow jropers' instructions:

cd /usr/src/zaptel
make clean
./configure
make
make install
make config

genzaptelconf

If the above works without error I suppose that's all that's needed. However when I got to the "make" I got this error:

You do not appear to have the sources for the 2.6.18-92.1.6.el5 kernel installed.

You have to note the version number above. Then:

cd /etc/yum.repos.d
nano CentOS-Base.repo
Comment out all six instances of exclude=kernel* ( #exclude=kernel* )
Exit nano and save modified buffer
yum remove kernel-devel (this is probably optional, but may help if there is an old or wrong version lurking on the system).
yum install kernel-devel-2.6.18-92.1.6.el5 (substitute the version number that "make" complained about - the kernel-devel HAS to match the installed kernel, and if you do just yum install kernel-devel it appears to install the most recent version, even if that doesn't match your kernel!)
(Answer y to "Is this ok [y/N]:")
nano CentOS-Base.repo
Uncomment all six instances of exclude=kernel*
Exit nano and save modified buffer

After doing the above I tried jroper's instructions again and everything went great. No, I didn't do the yum install from within your script because at that point I didn't know I was supposed to (I was in a hurry, someone was waiting for me, and I honestly didn't see the part about "try recompiling zaptel again using the steps in this message" along with the link to your message above). However, when I run zttool it does now show that ztdummy is available but unconfigured, so I suppose that's all I needed to do.

This is not intended as a complaint in any way, but I would just remind you that some people coming to PiaF are people who started out back with Asterisk@Home (using Ward's excellent instructions) and we are used to needing to do certain things a certain way (like running yum to install or update certain software packages - look back on the older Nerd Vittles pages, you'll find instructions telling people to use yum!). Also, as far as I was able to discern, your scripts (at least one of them, don't recall which, and I may be wrong about this) seems to take Asterisk down, and while that's okay when messing with the system at 2 A.M., you may not want to run those just to install some piece of software, especially if it has nothing to do with the workings of Asterisk. So while I might not want to see yum disabled, I definitely would appreciate a reminder or warning if I'm about to do something I shouldn't, but with the ability to do it anyway if there's just no way I can take the system down right at the moment (although maybe not the ability to do REALLY bad things like yum update).

Thanks again for the help!
 
Last edited by a moderator:

Members online

Forum statistics

Threads
25,825
Messages
167,861
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top