[RESOLVED] Asterisk Book Wrong? Elementary configuration?

Ike,

There are many Linux distributions that will work just fine. It is a matter of getting everything correct.

I was using Fedora core 5 but I have now moved to CentOS 4.5 if you want to run CentOS 4.5 download it and I can give you clear instruction to get it all working.

I have Asterisk (Cisco 7940 handsets) running is seven of our sites all interconnected and working well.

Yes, copied verbatim right out of the Asterisk 2nd Edition Book. I have also tried various zapata.confs suggested by others.

Regards,

Ike

[quote=“bwilks”]
I was using Fedora core 5 but I have now moved to CentOS 4.5 if you want to run CentOS 4.5 download it and I can give you clear instruction to get it all working.[/quote]

I found CentOS 4.6 on the CentOS website but not 4.5. Is 4.6 close enough?

Ike

Maybe? but I can only guarantee my instruction will work with 4.5

WHY Asterisk is asterisk. you DON’T have to use the gui. same goes for Trixbox. Yes you can install linux then install asterisk then find that it doesnt work because you havent intalled all the correct dependancys.

TBH you could get a TRIXbox ISO install that then forget about their configs use you own and you will be at the same point you are trying to get but in one leap.

All the iso versions do is install linux with all the required dependancies then asterisk, you can then upgrade asterisk at you leisure.

What do you intend to do that can only be done by a full install.

Ian

Hi Ike,

Take a look here 203.52.88.250/asterisk/ I put this together today.

I actually setup a system with these instruction so I know they work.

Let me know of any errors or typos.

This is a very basic setup with analogue handsets; there are many other things that can be done or done other ways.

I hope this gets you up and running so you can learn Asterisk.

Brett

I am on my 3rd build. Fedora Core 6, asterisk-1.4-current, zaptel-1.4-current, and libpri-1.4-current. Zaptel compiled without error this time. I used the following steps to compile it and redirected the output to text files for later inspection:
make clean
make
make install
make clean

The libpri compile went to crap but I captured the errors verbatim by redirecting the output to a text file. I used the following steps and stopped when I encountered errors:
make clean
make

the output from make clean:
rm -f *.o *.so *.lo *.so.1 *.so.1.0
rm -f testprilib libpri.a libpri.so.1.0
rm -f pritest pridump
rm -f .depend

the errors from make:
CC=“gcc” ./mkdep -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC ls *.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o copy_string.o copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri.o pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q921.o q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o prisched.o prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q931.o q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri_facility.o pri_facility.c
ar rcs libpri.a copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
ranlib libpri.a
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o copy_string.lo -c copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o pri.lo -c pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o q921.lo -c q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o prisched.lo -c prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o q931.lo -c q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o pri_facility.lo -c pri_facility.c
gcc -shared -Wl,-hlibpri.so.1.0 -o libpri.so.1.0 copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
/sbin/ldconfig -n .
ln -sf libpri.so.1.0 libpri.so
ln -sf libpri.so.1.0 libpri.so.1

If I’m correct the “make clean” hosed it by deleting required files and/or I’m missing files. I am going to rip out libpri and start the libpri compile again but this time I’m not going to run “make clean” first.

I’ll post the results later.

Ike

OK, ran make on libpri and got the same error:

CC=“gcc” ./mkdep -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC ls *.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o copy_string.o copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri.o pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q921.o q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o prisched.o prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o q931.o q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -c -o pri_facility.o pri_facility.c
ar rcs libpri.a copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o
ranlib libpri.a
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o copy_string.lo -c copy_string.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o pri.lo -c pri.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o q921.lo -c q921.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o prisched.lo -c prisched.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o q931.lo -c q931.c
gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC -o pri_facility.lo -c pri_facility.c
gcc -shared -Wl,-hlibpri.so.1.0 -o libpri.so.1.0 copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo
/sbin/ldconfig -n .
ln -sf libpri.so.1.0 libpri.so
ln -sf libpri.so.1.0 libpri.so.1

I’m hitting Google for a while and If I don’t find a fix I’m going downlevel on libpri.

Ike

Google just told me that libpri 1.4.3 blows up during compile on various flavors of Linux. Also mentions a patch. One post said libpri 1.4.2 blows up but then 1.4.3 worked. Did I just happen to download libpri on the days it was busted?

Anyone know how to patch libpri 1.4.3?

Should I just go downlevel to libpri 1.2-current?

Ike

Hi

Are you going to use a PRI card ?

[quote=“ianplain”]Hi

Are you going to use a PRI card ?[/quote]

No, never. I’m using a TDM400P while prototyping. Later on I will use SIP exclusively.

BTW, I pulled down libpri 1.4.3 (not current) and libpri 1.2-current and both had the same compile problems I saw with 1.4-current.

Ike

So why are you compiling libpri ?

you dont need it.

Ian

Ike,

You can’t just use any Linux distribution at random and expect it all to work seamlessly. Every release of every Distribution has changes that may or may not affect Asterisk like; new or updated kernels and dependences can stop Asterisk from compiling, make it unreliable or produce poor quality.

So you will need to pick a Linux distribution and version you want to use and work through the errors find out way its failing and patch/fix it.

You will need to keep working on it until you get it worked out. These two sites will be helpful.

bugs.digium.com
voip-info.org/wiki/

As I said earlier if you get CentOS 4.5 and follow my instructions you should have a working system in no time. You can get CentOS 4.5 here;
mirror.nsc.liu.se/CentOS/

Also skip the libpri as Ian said you don’t need it for a TDM400P

Brett

It functions now. :smiley:

Now the real work begins. Maybe I should have skipped Bootcamp and gone straight for the Developer class.

I appreciate each and every one of you that helped.

Regards,

Ike

Fedora Core 6 installed with all options selected during install (developer tools, etc from the CD iso’s).
asterisk 1.4.16.1
zaptel 1.4.7.1
libpri never did compile correctly and was not installed but since I am using the TDM400P card and will use SIP later it is not required.

With zaptel I DID NOT run “make clean”, “./configure”, or “make menuselect” during the compile. I do not know why but this seemed to break it the first 4 tries.

Asterisk was compiled as suggested in the 2nd Edition of the Asterisk book:
make clean
./configure
make menuselect (hit “q” to escape the menu that pops up afterwards)
make install
make samples
make configure

The TDM400P card is populated thus:
1: FXO module
2,3,4: FXS modules

Output of ztcfg -vv is unusual:
[root@localhost ~]# ztcfg -vv
Zaptel Version: 1.4.7.1
Echo Canceller: MG2
Configuration

Channel map:
Channel 01: FXS Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Slaves: 04)
[color=darkblue]4 channels to configure.[/color]

The books indicate it should say “4 channels configured.”. [color=red]NOPE.[/color]

zaptel.conf:

loadzone=us
defaultzone=us
fxsks=1
fxoks=2,3,4

zapata.conf:

[trunkgroups]
;define any trunk groups
[channels]
usecallerid=yes
hidecallerid=no
callwaiting=yes
transfer=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
rxgain=0.0
txgain=0.0
;
;define channels
context=phones
signalling=fxo_ks
channel => 2,3,4
context=incoming
signalling=fxs_ks
channel => 1

extensions.conf:

[globals]

[general]
autofallthrough=yes

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[incoming]
exten => s,1,Answer()
exten => s,n,Echo()

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()

[phones]
include => internal

I’ll be building on this after the holidays.

Merry Christmas,

Ike