OpenVZ Forum


Home » General » Support » *SOLVED* Zaptel - ztdummy - kernel install help
*SOLVED* Zaptel - ztdummy - kernel install help [message #26582] Tue, 29 January 2008 01:28 Go to next message
ricoche is currently offline  ricoche
Messages: 17
Registered: January 2008
Location: Nagano Japan
Junior Member
Hello,

I am trying to find information about how to install/compile zaptel onto the HN of my CentOS OpenVZ system. I am obviously running the 2.6.18-53.1.4.el5.028stab053.4 kernel, but whenever I try to do anything I find that this is not located in the /usr/src/linux directory so I always get an error that says the source is not installed. I am not sure how to to do that.

Edit - Just fixed my problem with yum install ovzkernel-devel

Jim

[Updated on: Fri, 01 February 2008 00:25]

Report message to a moderator

Re: Zaptel - ztdummy - kernel install help [message #26593 is a reply to message #26582] Tue, 29 January 2008 10:04 Go to previous messageGo to next message
Kirill Shileev is currently offline  Kirill Shileev
Messages: 6
Registered: December 2007
Junior Member
In order to compile zaptel you need to have a kernel source tree
corresponding to your current kernel. So install this rpm
http://download.openvz.org/kernel/branches/rhel5-2.6.18/028s tab053.4/ovzkernel-2.6.18-53.1.4.el5.028stab053.4.src.rpm
, then zaptel should compile without problems.

I'd also like to note that if your task is to get Asterisk MeetMe working and you do not have any analog FXO cards installed, you only need to have 2 LKMs from zaptel: zaptel-base and ztdummy.
See also http://wiki.openvz.org/Asterisk_from_source

Kirill
Re: Zaptel - ztdummy - kernel install help [message #26596 is a reply to message #26593] Tue, 29 January 2008 11:19 Go to previous messageGo to next message
ricoche is currently offline  ricoche
Messages: 17
Registered: January 2008
Location: Nagano Japan
Junior Member
Thank you Kirill for the help.

I managed to get zaptel compiled on the VE, but I am still getting some errors which I will post here. I should note that everything on the HN side appears to be running without any problems. I just can't get the VE side of things working so that when I install Asterisk on the VE I'll see the "app_meetme.so" module under /usr/lib/asterisk/modules. It still doesn't show which means it's not installed and/or working.

On the HN side, the following commands appear to work fine:
modprobe ztdummy
modprobe zaptel
service start zaptel
ztcfg -v
ztcfg -d
cat /proc/zaptel/1
vzctl set 112 --devnodes zap/pseudo:rw --save


On the VE side, the following commands are giving me errors:

modprobe ztdummy
WARNING: Error inserting crc_ccitt (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/kernel/lib/crc- ccitt.ko): Operation not permitted
WARNING: Error inserting zaptel (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/misc/zaptel.ko) : Operation not permitted
FATAL: Error inserting ztdummy (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/misc/ztdummy.ko ): Operation not permitted

modprobe zaptel
WARNING: Error inserting crc_ccitt (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/kernel/lib/crc- ccitt.ko): Operation not permitted
FATAL: Error inserting zaptel (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/misc/zaptel.ko) : Operation not permitted

ztcfg -v
Notice: Configuration file is /etc/zaptel.conf
line 233: Unable to read Zaptel version information.

Zaptel Version: Unknown
Echo Canceller: Unknown
Configuration
======================
0 channels to configure.

ioctl(ZT_LOADZONE) failed: Invalid argument
line 233: Unable to register tone zone 'us'

ztcfg -d
Line 158: loadzone = us
Line 172: defaultzone=us
<End of File>
ioctl(ZT_LOADZONE) failed: Invalid argument
Notice: Configuration file is /etc/zaptel.conf
line 233: Unable to register tone zone 'us'

cat /proc/zaptel/1
cat: /proc/zaptel/1: No such file or directory

service zaptel start
Loading zaptel framework: WARNING: Error inserting crc_ccitt (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/kernel/lib/crc- ccitt.ko): Operation not permitted
FATAL: Error inserting zaptel (/lib/modules/2.6.18-53.1.4.el5.028stab053.4/misc/zaptel.ko) : Operation not permitted
[FAILED]
Waiting for zap to come online...OK
Loading zaptel hardware modules:No functioning zap hardware found in /proc/zaptel, loading ztdummy
Running ztcfg: ioctl(ZT_LOADZONE) failed: Invalid argument
Notice: Configuration file is /etc/zaptel.conf
line 233: Unable to register tone zone 'us'
[ OK ]

[Updated on: Tue, 29 January 2008 11:21]

Report message to a moderator

Re: Zaptel - ztdummy - kernel install help [message #26597 is a reply to message #26582] Tue, 29 January 2008 11:56 Go to previous messageGo to next message
ricoche is currently offline  ricoche
Messages: 17
Registered: January 2008
Location: Nagano Japan
Junior Member
Ok, I was just able to compile Asterisk again and now the MeetMe file "app_meetme.so" is showing up in the /usr/lib/asterisk/modules directory.

What I did differently is this.

1. I downloaded an updated Zaptel from here http://downloads.digium.com/pub/zaptel/releases/zaptel-1.4.8 .tar.gz instead of the previous place which I can't remember. I re-installed Zaptel. The errors above were all the same so I was a bit discouraged, but nonetheless continued.

2. I copied the zaptel.h file from the 1.4.8 zaptel distribution and stuck it into the location /usr/include/zaptel/zaptel.h in the VE I was installing Asterisk.

3. I then re-installed Asterisk using ./configure, make, make install, make config. ( Do I need make samples? )

I then checked the /usr/lib/asterisk/modules directory and to my surprise the "app_meetme.so" file magically appeared. Thus Asterisk must have liked something about my Zaptel/ztdummy install on the VE.

Now whether Asterisk and MeetMe will work or not remains to be seen as my next step will be to dive in and actually do some testing. Now that I appear to have all the files I need installed, perhaps I'll be ok....shshsh yeah! <laugh>

If anyone understands what happened here or has any additional info that might be helpful, please let me know. I am hoping some of my notes will help others in trying to figure all this stuff out.

Thanks,

Jim

[Updated on: Tue, 29 January 2008 11:58]

Report message to a moderator

Re: Zaptel - ztdummy - kernel install help [message #26598 is a reply to message #26596] Tue, 29 January 2008 11:59 Go to previous messageGo to next message
Kirill Shileev is currently offline  Kirill Shileev
Messages: 6
Registered: December 2007
Junior Member
Ricoche

There is no way to load a module inside VE. It's forbidden,
consider it as a feature of OVZ.

Instead you need to load zaptel modules on HN. Once again for MeetMe, it's enough to load ztdummy (which depends on zaptel-base). On VE, one doesn't need to compile zaptel as a whole.
MeetMe module will be compiled if Asterisk gets access to a single header file zaptel.h. That's enough.

All the details on how to do it is described in before mentioned HOWTO article.

If you have analog telephone card installed, then you do need to compile and load zaptel modules (corresponding to your card), but on HN, not VE.

Hope this helps.



Kirill
Re: Zaptel - ztdummy - kernel install help [message #26599 is a reply to message #26598] Tue, 29 January 2008 12:06 Go to previous messageGo to next message
ricoche is currently offline  ricoche
Messages: 17
Registered: January 2008
Location: Nagano Japan
Junior Member
Thanks Kirill,

Actually you have been a huge help because you lead me back to the basic article which I re-read and got the point. I finally was able to get MeetMe to show up under Asterisk and now I'll be able to move on and actually work with the application. After three days of wrapping my head around all of this I feel I have a better understanding. Thanks again for your help.

Regards,

Jim

[Updated on: Tue, 29 January 2008 12:07]

Report message to a moderator

Re: Zaptel - ztdummy - kernel install help [message #41459 is a reply to message #26593] Wed, 26 January 2011 11:55 Go to previous messageGo to next message
maxglucksmann is currently offline  maxglucksmann
Messages: 2
Registered: January 2011
Location: Miami
Junior Member

Hello Kirill,

Wanted to write you because I've tried several times with the ovzkernel and ovzkernel-devel compiling also zaptel and still can't start ztdummy nor zaptel's init.d service in the CN. I've replaced the number values for security...
____________________________________________________________ _


____________________________________________________________ _
This is the kernel setup and ovz packages:

HN:
[root@box src]# rpm -qa | grep -i ovz
ovzkernel-devel-2.6.18-194.3.1.el5.028stab069.6
ovzkernel-2.6.18-194.3.1.el5.028stab069.6

uname -a
Linux box.astraqom.ca 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 18:31:05 MSD 2010 x86_64 x86_64 x86_64 GNU/Linux

CN:
[root@pickering ~]# rpm -qa | grep -i ovz
ovzkernel-2.6.18-194.3.1.el5.028stab069.6
ovzkernel-devel-2.6.18-194.3.1.el5.028stab069.6

uname -a
Linux pickering 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 18:31:05 MSD 2010 i686 i686 i386 GNU/Linux
____________________________________________________________ _


____________________________________________________________ _
Besides that, in the HN is working properly - after doing:
make distclean
make clean
./configure
make menuselect (may be needed to be run twice, select only ztdummy)
make

FAILS
...
...
...
include/linux/hardirq.h:38:27: warning: "NR_IRQS" is not defined
make[3]: *** [/usr/src/comtelpbx-3.0/asterisk/zaptel-1.4.12.1/kernel/pcir adio.o] Error 1
make[2]: *** [_module_/usr/src/comtelpbx-3.0/asterisk/zaptel-1.4.12.1/ker nel] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.18-194.3.1.el5.028stab069.6-i686'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/comtelpbx-3.0/asterisk/zaptel-1.4.12.1'
make: *** [all] Error 2
____________________________________________________________ _


____________________________________________________________ _
After changing the ovzkernel and ovzkernel-devel packages:
rhel5-2.6.18/028stab069.6/


[root@box ovzkernel]# rpm -Uvh ovzkernel-2.6.18-194.3.1.el5.028stab069.6.x86_64.rpm
Preparing... ########################################### [100%]
1:ovzkernel ########################################### [100%]

[root@box ovzkernel]# rpm -Uvh ovzkernel-devel-2.6.18-194.3.1.el5.028stab069.6.x86_64.rpm Preparing... ########################################### [100%]
1:ovzkernel-devel ########################################### [100%]

make distclean
make clean
make menuselect (twice)
select only ztdummy
make
make install

[root@box zaptel-1.4.12.1]# make config
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:

...
...
...

[root@box zaptel-1.4.12.1]# service zaptel restart
Unloading zaptel hardware drivers:.
Loading zaptel framework: FATAL: Error inserting zaptel (/lib/modules/2.6.18-194.3.1.el5.028stab069.6/misc/zaptel.ko ): Invalid module format
[FAILED]
Waiting for zap to come online...OK
Loading zaptel hardware modules:Running ztcfg: ioctl(ZT_LOADZONE) failed: Invalid argument
Notice: Configuration file is /etc/zaptel.conf
line 287: Unable to register tone zone 'us'
[ OK ]
____________________________________________________________ _



____________________________________________________________ _
Devices:
[root@box zaptel-1.4.12.1]# ls -lsa /dev/zap/
total 0
0 drwxr-xr-x 2 root root 140 Jan 25 20:01 .
0 drwxr-xr-x 14 root root 14440 Jan 26 01:06 ..
0 crw-rw---- 1 root root 196, 254 Jan 25 20:01 channel
0 crw-rw---- 1 root root 196, 0 Jan 25 20:01 ctl
0 crw-rw---- 1 root root 196, 255 Jan 25 20:01 pseudo
0 crw-rw---- 1 root root 196, 253 Jan 25 20:01 timer
0 crw-rw---- 1 root root 196, 250 Jan 25 20:01 transcode
[root@box zaptel-1.4.12.1]#
____________________________________________________________ _



____________________________________________________________ _
Port devices:
[root@box ~]# vzctl set 999888777 --devnodes zap/transcode:rw --save
Setting devices
Saved parameters for CT 999888777
[root@box ~]# vzctl set 999888777 --devnodes zap/timer:rw --save
Setting devices
Saved parameters for CT 999888777
[root@box ~]# vzctl set 999888777 --devnodes zap/pseudo:rw --save
Setting devices
Saved parameters for CT 999888777
[root@box ~]# vzctl set 999888777 --devnodes zap/ctl:rw --save
Setting devices
Saved parameters for CT 999888777
[root@box ~]# vzctl set 999888777 --devnodes zap/channel:rw --save
Setting devices
Saved parameters for CT 999888777
____________________________________________________________ _



____________________________________________________________ _

Still, when I'm called into a conference by vicidial's agent gui, the application app_meetme is run and the CLI says...

pseudo channel is not available:

== Parsing '/etc/asterisk/manager.conf': Found
== Manager 'sendcron' logged on from 127.0.0.1
-- Executing [123123123@default:1] MeetMe("SIP/sip1000001-09654350", "123123123|F") in new stack
== Parsing '/etc/asterisk/meetme.conf': Found
== Parsing '/etc/asterisk/meetme-vicidial.conf': Found
[Jan 26 14:47:15] WARNING[24346]: app_meetme.c:800 build_conf: Unable to open pseudo device
== Manager 'sendcron' logged off from 127.0.0.1
-- <SIP/sip1000001-09654350> Playing 'conf-invalid' (language 'en')
== Spawn extension (default, 123123123, 1) exited non-zero on 'SIP/sip1000001-09654350'
-- Executing [h@default:1] DeadAGI("SIP/sip1000001-09654350", " agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG---- -16---------------") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG---- -16--------------- completed, returning 0
pickering*CLI>
____________________________________________________________ _


Any advice you could give will be very appreciated.

Thank you very much and have a good day,
Max Glucksmann
Mobility1 LLC
Re: Zaptel - ztdummy - kernel install help [message #41493 is a reply to message #41459] Tue, 01 February 2011 00:56 Go to previous message
maxglucksmann is currently offline  maxglucksmann
Messages: 2
Registered: January 2011
Location: Miami
Junior Member

Just for refrence, using url:
download.openvz.org / kernel / branches / rhel5-2.6.18 /

Will try with dkms...
Previous Topic: iptables error?
Next Topic: vzctl stop kills glusterfs?
Goto Forum:
  


Current Time: Fri Apr 26 08:16:27 GMT 2024

Total time taken to generate the page: 0.01634 seconds