The only reason im posting this is cause its taken me 2 days to get to work properly and i couldnt find anything that covers it all for freebsd so i thought id document it for myself and hopefully it’ll help someone else out…
if you know of a better way to do what ive done below post up and let me know… (eg . you can get the IAX2 trunking to work with newer zaptel ports)
let me know if this is useful to you as well…
Steve
i386 platform
FreeBSD 6.2
Clone PCI X100P (purely for timing)
Requirements :
Inbound and Outbound faxing
IAX Trunking between sites
CDR logging to MYSQL
& of course standard Asterisk Features
ok… so these are my notes… no warranty… no liability etc etc…
cd /usr/src/
wget ftp.digium.com/pub/asterisk/rele … .11.tar.gz
wget soft-switch.org/downloads/sn … 413.tar.gz
wget soft-switch.org/downloads/sn … pp_rxfax.c
wget soft-switch.org/downloads/sn … pp_txfax.c
wget soft-switch.org/downloads/sn … risk.patch
cd /usr/ports/devel/autoconf261
make install clean
------ Zaptel ------
Ive had a LOT of problems getting zaptel to work with iax conferencing…
even though the port of 1.4.2 installs fine, i still get the “Unable to support trunking on peer ‘xxx’ without zaptel timing”
i tried everything… zttest worked 100%, kldload of ztdummy worked fine as well… but still same error…
in the /dev/zap i only had /ctl … no timer
ended up modifying cvs-ports.cfg to pull the /misc/zaptel port from December 2006… (zaptel-1.0_1 port)
+*default date=2006.12.12.13.30.00
-ports-all
+ports-misc
cd /usr/ports/misc/zaptel
make install clean
now in /dev/zap there is also /timer1 and it now works…
and libpri if it isnt already via ports
cd /usr/ports/devel/spandsp
make install clean
cd /usr/ports/tiff
make install clean
cd /usr/src
tar -zxvf asterisk-1.4.2.tar.gz
cd asterisk-1.4.11
cp …/asterisk.patch .
cp …/app_rxfax.c apps/
cp …/app_txfax.c apps/
(at this point, you SHOULD be able to do “patch -bp0 < asterisk.patch”, but the patch is partially broken. )
Ive found that manually patching the files is the ONLY way to get it to work correctly… the patch command above DOES NOT PATCH ALL FILES!
Look at the asterisk.patch and you’ll see several different sections where the patch looks for one block of text in a certain
file, then inserts the lines that starts with the “+”. You need to manually add the lines with the “+” character into the spots
that the patch file point to. Remember to remove the “+” from the beginning of the line.)
cp /usr/local/include/spandsp/plc.h include/asterisk/plc.h
(this was suggested somewhere… i did it, but i dont know whether i needed to )…
gmake clean
autoconf
./configure
gmake menuselect
(at this point, check to see if the app_txfax and app_rxfax are selected. It should not be marked as unavailable, ie., no XXX’s…
if they are marked with XXX then start again… double check the patching)
gmake
gmake install
If it compiles without error & if it does not coredump when you run asterisk, you should be able to see usage information from
the console by running these commands:
core show application RxFax
core show application TxFax
–asterisk-addons
cd /usr/ports/databases/p5-DBD-mysql50
make install clean
cd /usr/src
tar zxvf asterisk-addons-1.4.2.tar.gz
ln -s /usr/src/asterisk-1.4.11 asterisk
cd asterisk-addons-1.4.2
vi Makefile
-CFLAGS+=-fPIC
+CFLAGS+=-fPIC -I$/usr/local/include
./configure
gmake menuselect
gmake install
now start asterisk
(/usr/local/etc/rc.d/asterisk.sh start)
core show application MYSQL
check your iax2 trunking is working (if you use it)
module reload chan_iax2.so
(and you shouldnt get any errors (make sure you have the IAX trunking setup first though to test !)…
Good luck!.. let me know how you go!
Steve