I am new to Asterisk. I have just issued the make command in the Dahdi-Linux-Current and I get this.
make -C /lib/modules/4.18.0-193.14.2.el8_2.x86_64/build KBUILD_EXTMOD=/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory ‘/usr/src/kernels/4.18.0-193.14.2.el8_2.x86_64’
Makefile:978: *** “Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel”. Stop.
What do I need to do? Or where would I get those files?
Thank You,
Dave
Using apt or yum, depending on your Linux distribution.
There may be an install prerequisites script, which will do this for you.
Thank you for the comeback. How is the script used? I am new to linux. I have been an Asterisk fan for about 7 years now. I have been using the GUIs ( FreePBX, Elastix ) but I want to educate myself on how all this works using Asterisk from source code. I have installed Centos 8.2 on an older server for learning purposes and downloaded the software from Asterisk.org. When I loaded Centos on the machine I chose every package it offered except the visualization part. What did I miss? Is the Centos package incomplete? Is there a better flavor of Linux that will have everything I need for Asterisk?
Thanks again,
Dave
david551,
I found the script. I ran ./install_prereq Install. Many apps were loaded successfully. I ran ./install_prereq install-unpackaged and I got this on screen:
[root@localhost scripts]# ./install_prereq install-unpackaged
*** Installing NBS (Network Broadcast Sound) ***
A nbs-trunk/Makefile
A nbs-trunk/nbscat8k
A nbs-trunk/xmms-nbs-1.2.10.patch
A nbs-trunk/xmms-nbs-orig.patch
A nbs-trunk/LICENSE
A nbs-trunk/nbsclient.c
A nbs-trunk/nbsd.c
A nbs-trunk/nbs.h
A nbs-trunk/nbscat.c
Checked out revision 15.
cc -g -Wall -O2 -D_NBS_PRIVATE -Wmissing-prototypes -Werror -Wno-pointer-sign -D_REENTRANT -c -o nbsd.o nbsd.c
nbsd.c: In function ‘handle_network’:
nbsd.c:453:5: error: ‘strncpy’ output may be truncated copying 79 bytes from a string of length 79 [-Werror=stringop-truncation]
strncpy(ns->name, si->streamname, sizeof(ns->name) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nbsd.c:454:5: error: ‘strncpy’ output may be truncated copying 15 bytes from a string of length 15 [-Werror=stringop-truncation]
strncpy(ns->app, si->appname, sizeof(ns->app) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘audio_acquire’,
inlined from ‘merge_stream’ at nbsd.c:276:9,
inlined from ‘timing_ready’ at nbsd.c:566:10:
nbsd.c:221:4: error: ‘strncpy’ output may be truncated copying 79 bytes from a string of length 79 [-Werror=stringop-truncation]
strncpy(ih.i.streamname, ns->name, sizeof(ih.i.streamname) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nbsd.c:222:4: error: ‘strncpy’ output may be truncated copying 15 bytes from a string of length 15 [-Werror=stringop-truncation]
strncpy(ih.i.appname, ns->app, sizeof(ih.i.appname) - 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What do I do with this, if anything?
Thank you,
Dave
I did a make command on the Dahdi-linux after running the prereq_script and itlooked good. I ran make install on Dahdi-linux and that looked good. When I ran make config, I received a statement on screen stating that there was nothing to be done. Is that correct or is there a problem?
I next tried LIBPRI folder make and I got this:
gcc -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2 -MD -MT pridump.o -MF .pridump.o.d -MP -c -o pridump.o pridump.c
gcc -o pridump pridump.o -L. -lpri -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2
gcc -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2 -MD -MT pritest.o -MF .pritest.o.d -MP -c -o pritest.o pritest.c
gcc -o pritest pritest.o libpri.a -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2
gcc -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2 -MD -MT rosetest.o -MF .rosetest.o.d -MP -c -o rosetest.o rosetest.c
gcc -o rosetest rosetest.o libpri.a -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2
gcc -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2 -D_REENTRANT -D_GNU_SOURCE -MD -MT testprilib.o -MF .testprilib.o.d -MP -c -o testprilib.o testprilib.c
gcc -o testprilib testprilib.o libpri.a -lpthread -g -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC -O2
It seems some of the commands are not in the folder. What to do?
Thanks again,
Dave
I couldn’t find an install prerequisites in the dahdi source tree, so you may have installed those for something else.
The LIBPRI log has no obvious failures. the -W clauses are instructions to the compiler, not compile time output.
dave551,
Are saying I’m good to go. I can install Asterisk now? The config command on this version is make install-config. I went back to the Dahdi folder and issued make install-config and it worked. Have any of the commands to install Asterisk changed? I’m following the video on Sangoma’s Asterisk Essential for an installation guide. Is that still current?
Thank You,
Dave
Does this older server have DAHDI/PRI hardware or are you just enabling everything for the experience and to play with the commands?
I would suggest just installing a ‘plain vanilla SIP’ system to get your feet wet.
dave551,
I have begun the Asterisk install with ./configure and it wants libedit to be installed. Do you know where I would get the file and how and where to install it?
Thanks Again,
Dave
Are you following a current installation tutorial like Installing Asterisk from Source?
I found the solution in another thread. I had gotten to ./configure in Asterisk. And I got an error saying I needed the the libedit devel package to installed. Yum install libedit-devel got an error saying no such file. In another thread a guy had the same problem. He solved it by issuing command dnf config-manager -set-enabled Power Tools. Then yum install libedit-devel worked. I can finish the install.
Thank you again,
Dave
Got Asterisk going. Thank you guys for the help. I appreciate your time and effort.
One more question: if I do a make menuselect again and add more stuff do I have to run the Make command and make install?
Thank You,
Dave
You need to run it again. The menus can change things that affect even the main program, and selectively building and installing individual modules is likely to be more hassle than it is worth. If you delete a module and change core setting, you may need to manually remove that module, as it may crash if it gets loaded.
Good Morning Guys,
It’s a new day with new challenges. So here it is:
Dahdi service won’t start. I do not have a Dahdi card in the machine, but the recommendation is to install Dahdi regardless. So here’s what I get.
SELinux is preventing asterisk from write access on the directory asterisk. For>
Aug 26 08:09:06 localhost.localdomain platform-python[3190]: SELinux is preventing asterisk from write access on the directory asterisk.
***** Plugin catchall_labels (83.8 confidence) suggests *******************
If you want to allow asterisk to have write access on the asterisk directory
Then you need to change the label on asterisk
Do
# semanage fcontext -a -t FILE_TYPE 'asterisk'
where FILE_TYPE is one of the following: asterisk_log_t, asterisk_spool_t, ast>
Then execute:
restorecon -v 'asterisk'
***** Plugin catchall (17.1 confidence) suggests **************************
If you believe that asterisk should be allowed write access on the asterisk di>
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'asterisk' --raw | audit2allow -M my-asterisk
# semodule -X 300 -i my-asterisk.pp
Is this a short term fix; should I look for different solution? There are 2 recommendations to fix the problem. Do I use one or both? How sensitive is Linux/Asterisk to mistakes made by Newbies? Will it crash?
ThankYou,
Dave
It hasn’t been recommended to install DAHDI regardless for many years. There are other options that the dummy DAHDI driver for timing and conference bridging should no longer need support from the dummy driver.
Should I get rid of it? I could re-install from scratch? If so, do I install the libpri package without the Dahdi Package?
Someone needs to change the documentation. It says to install Dahdi regardless.
Thank You,
Dave
The link I provided above says:
“If you are not integrating with any traditional telephony equipment and you are not planning on using the MeetMe dialplan application, then you do not have to install DAHDI or libpri in order to use Asterisk.”
sedwards,
Thanks for the comeback. I have been watching the video from Asterisk Essentials and I guess that’s dated.
It all adds to the adventure. So if I want to develop a PBX with no Conferencing ability, leave dahdi out.?
A PBX that has no conferencing seems strange. Do you know what needs to be done to fix the problem?
Thanks again,
Dave
You need a timing source (dahdi or otherwise) for the 'meetme()'
application.
Since 'meetme()'
has been deprecated for the better part of a decade, that shouldn’t be an issue. You should be using 'confbridge()'
instead. Ditto for using PJSIP instead of SIP.
Meetme may need a timing source, but nothing needs DAHDI for that, unless you are primary rate trunk needing timing form another one, and you need DAHDI for the trunk.
The facility that Meetme needs, from DAHDI, is audo mixing. I believe the Digium cards provide this in hardware, but there is a dummy driver in DAHDI that simulates this. confbridge, and all the other modern approaches to conferences do the audio mixing within Asterisk.