tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Building Asterisk with PostgreSQL support
On 6/20/15 6:54 AM, D'Arcy J.M. Cain wrote:
I tried changing the package as shown below but it doesn't create the
required modules. The changes are meant to follow these instructions
on the Asterisk page:
Configure asterisk with postgresql support:
./configure --with-postgres=<dir where postgresql is installed>
However, there is a further instruction:
Then issue the command:
make menuconfig
In the menu select 2.Call Detail Recording -> then check cdr_pgsql
I assume that make menuconfig is already run during the build but I
don't know how to run that second part. Is there some magic for that?
Anyone have a problem if I commit these changes once I have it working?
Hi D'Arcy,
Take a look at
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=49661 ... I've
been using the patch there quite successfully in production for a few
months.
Since you're mentioning it, there are a couple of other "gotchas" with
modern (post 1.8) * under NetBSD which I've run across. (Untested on
other platforms.)
The first is that res_timing_kqueue.so appears to have a race condition,
which causes it to stall indefinitely until * eats all it's available
file handles. This can be seen building via "sip show channels"
maintaining connections which never die, and "timing test" going totally
sideways. Disabling it in modules.conf, falling back to
res_timing_pthread.so appears to work around that.
The second is that the new pjproject code fairly consistently crashes *
as channel load picks up to ~15 active channels. The patch I've cat'd
below hacks out the PJ code in the build, reverting to the original *
RTP code. While I did manage to build * with DONT_OPTIMIZE (and
struggled a bit with the way menuconfig works... or doesn't) the PJ code
doesn't include symbols with that flag, and I never figured out how to
do so to get a deeper BT. * 13 drops the legacy RTP code altogether, so
at some point this will have to be figured out more appropriately.
HTH!
Mike.
netbsd6-1-5-amd64$ cat patches/patch-res_Makefile
$NetBSD$
Disable pjproject
--- res/Makefile.orig 2015-05-07 06:56:20.000000000 -0700
+++ res/Makefile 2015-05-07 06:56:31.000000000 -0700
@@ -87,7 +87,7 @@
$(PJ_LIB_FILES): FORCE
$(MAKE) -C $(patsubst %/lib/,%,$(dir $@))/build/
../lib/$(notdir $@)
-ifeq ($(subst 1:0,1,$(UUID)), 1)
+ifeq ($(subst 1:0,1,$(UUID)), 0)
res_rtp_asterisk.o: $(PJ_LIB_FILES)
res_rtp_asterisk.o: _ASTCFLAGS+=-DUSE_PJPROJECT
res_rtp_asterisk.o: _ASTCFLAGS+=$(PJ_CFLAGS)
Home |
Main Index |
Thread Index |
Old Index