[asterisk-users] Can't compile DAHDI - wrong kernel source

Thermal Wetland thermalwetland at gmail.com
Thu Jul 15 17:27:44 CDT 2010


On Thu, Jul 15, 2010 at 11:29 AM, Miguel Molina
<mmolina at millenium.com.co> wrote:
> El 15/07/10 15:15, Thermal Wetland escribió:
>
> On Wed, Jul 14, 2010 at 11:34 PM, Tzafrir Cohen
> <tzafrir.cohen at xorcom.com> wrote:
>
>
> The DAHDI Makefile looks for the kernel source by default in:
>
>  /lib/modules/`uname -r`/build
>
> This is normally a symlink that points to the directory with the
> (possibly partial) kernel source tree.
>
> It seems that the kernel package you have installed did not set up this
> symlink. You can create it yourself.
>
> Alternatively, set set KSRC explicitly to the (full path to) the kernel
> tree:
>
>  make KSRC=/usr/src/<whatever>
>
> --
>               Tzafrir Cohen
> icq#16849755              jabber:tzafrir.cohen at xorcom.com
> +972-50-7952406           mailto:tzafrir.cohen at xorcom.com
> http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir
>
>
> Creating the link was the answer!  Even when I installed the RPM the
> link in /lib/modules was not created.
>
> After make all, make install, and make config DAHDI will not start.
> in the /drivers/dahdi folder I only have dahdi_dummy.c
> All the other files have .ko .mod.c .o etc
> Is this related?
>
> [root at ip-97-74-119-59 dahdi-linux-complete-2.3.0.1+2.3.0]# dahdi_cfg -vvvvv
> DAHDI Tools Version - 2.3.0
> Notice: Configuration file is /etc/dahdi/system.conf
> line 0: Unable to open master device '/dev/dahdi/ctl'
>
> 1 error(s) detected
>
> The only warning I see is "WARNING: could not find
> /usr/src/asterisk/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/vpmadt032_loader/.vpmadt032_x86_32.o.cmd
> for
> /usr/src/asterisk/dahdi-linux-complete-2.3.0.1+2.3.0/linux/drivers/dahdi/vpmadt032_loader/vpmadt032_x86_32.o"
>
> Does that ring a bell with any one?
>
>
>
> I experienced the same issue, and googling about this, on some openvz
> documentation they are clear: for security you can't enable kernel modules
> in an openVZ VPS (you can't even do a lsmod, it shows nothing), the only way
> I could use DAHDI timing in my case for asterisk inside a VPS, was to
> install DAHDI in the HN (Hardware Node) and share it using this config
> settings:
>
> vzctl set 101 --devnodes 'dahdi/pseudo:rw dahdi/channel:rw dahdi/timer:rw
> dahdi/ctl:rw' --save
>
> Where 101 is your CTID (container ID).
>
> Look at http://forum.openvz.org/index.php?t=msg&goto=37706&
>
> That way I made it! Now I have a single DAHDI instance in the HN shared into
> two VPS, and dahdi_cfg and dahdi_test works great:
>
> [root at virtual1_ast1 ~]# dahdi_test
> Opened pseudo dahdi interface, measuring accuracy...
> 99.951% 99.641% 99.572% 99.604% 99.671% 99.972% 99.979% 99.991%
> --- Results after 8 passes ---
> Best: 99.991 -- Worst: 99.572 -- Average: 99.797645, Difference: 99.998742
>
> The DAHDI timing is used without issue by asterisk:
>
> virtual1_ast1*CLI> module show like timing
> Module                         Description                              Use
> Count
> res_timing_dahdi.so            DAHDI Timing Interface
> 484
> res_timing_pthread.so          pthread Timing Interface                 0
>
> virtual1_ast1*CLI> timing test
> Attempting to test a timer with 50 ticks per second.
> Using the 'DAHDI' timing module for this test.
> It has been 1016 milliseconds, and we got 51 timer ticks
>
>
> My goal was to provide DAHDI timing to asterisk inside a VPS. I don't know
> if having a TDM card in the HN configured with DAHDI it can be shared so a
> VPS can access it and then you could receive PRI calls or something directly
> into a VPS, or better, split channel groups between VPS.
>
> Cheers,
>
> --
> Ing. Miguel Molina
> Grupo de Tecnología
> Millenium Phone Center


Thank you Miguel for the openVZ help!

-- 
-Thermal



More information about the asterisk-users mailing list