problems with the package asterisk

Tzafrir Cohen tzafrir.cohen@xorcom.com
Thu Jul 14 12:32:07 UTC 2005


--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Jul 14, 2005 at 07:50:02AM +0100, Mark Purcell wrote:
> 
> On Monday 11 July 2005 14:14, you wrote:
> 
> > 5. There is no need for the script addmailbox
> 
> Why not? Upstream still include it?  Why shouldn't we?

Just asked on asterisk-dev . The reply was:

|  Agreed. I would, in fact, add a 'don't use this script' warning to the
|	top of the script itself, along with not installing it.

> 
> > 9. Should the asterisk package include vim syntax hilighting?
> 
> Not sure what you mean about this?

On my package I grabbed the vim syntax hilighting file from
voip-info.org and placed it at /usr/share/vim/addons/syntax/asterisk.vim
(in the main asterisk package) .

One still needs to set the syntax to 'asterisk' , but it's a start.

I personally consider vim to be the One True Editor ;-) . I figure
others may not share this view (those ignorants!), but I consider the
overhead here low enough.

> 
> > 10. Attached  a minor patch to allow the use of 'context=' in the general
> > context of iax.conf
> 
> Couldn't find that patch attached. Please resend.

Attached, for the record.

I also attach my take on the postgresql-in-apps dpatch: something that
surprisingly doesn't conflict with any other patch I apply.

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen@xorcom.com  http://www.xorcom.com

--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="iax_general_conf.dpatch"

#! /bin/sh /usr/share/dpatch/dpatch-run
## iax_general_conf.dpatch by Xorcom Ltd. (software releases key) <support@xorcom.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Adds a 'context' directivein the general section to give a default 
## DP: context

@DPATCH@
diff -urNad asterisk-1.0.8.dfsg.1/channels/chan_iax2.c /tmp/dpep.9MANKo/asterisk-1.0.8.dfsg.1/channels/chan_iax2.c
--- asterisk-1.0.8.dfsg.1/channels/chan_iax2.c	2005-06-28 11:20:20.000000000 +0300
+++ /tmp/dpep.9MANKo/asterisk-1.0.8.dfsg.1/channels/chan_iax2.c	2005-06-28 11:22:48.000000000 +0300
@@ -6871,6 +6871,8 @@
 			lagrq_time = atoi(v->value);
 		else if (!strcasecmp(v->name, "dropcount")) 
 			iax2_dropcount = atoi(v->value);
+		else if (!strcasecmp(v->name, "context"))
+			strncpy(context, v->value, sizeof(context) - 1);
 		else if (!strcasecmp(v->name, "bindaddr"))
 			inet_aton(v->value, &sin->sin_addr);
 		else if (!strcasecmp(v->name, "authdebug"))

--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="vm_pg_extra.dpatch"

#! /bin/sh /usr/share/dpatch/dpatch-run
## vm_pg_extra.dpatch by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Create an extra voicemail module with pgsql support

@DPATCH@
diff -urNad asterisk-1.0.9.dfsg.1/apps/Makefile /tmp/dpep.vy7i73/asterisk-1.0.9.dfsg.1/apps/Makefile
--- asterisk-1.0.9.dfsg.1/apps/Makefile	2005-07-14 00:32:03.000000000 +0300
+++ /tmp/dpep.vy7i73/asterisk-1.0.9.dfsg.1/apps/Makefile	2005-07-14 00:32:08.000000000 +0300
@@ -53,11 +53,33 @@
 CFLAGS+=-DUSEMYSQLVM
 endif
 
+# detect pgsql
+PGSQL_CAND_DIRS:=/usr/local/pgsql/include /usr/include/pgsql \
+  /usr/include/postgresql /usr/local/include/pgsql /opt/pgsql/include \
+	/usr/include
+# the file name we look for:
+PGSQL_CAND_INC:=$(PGSQL_CAND_DIRS:%=%/libpq-fe.h)
+# files that actually exist:
+PGSQL_REAL_INC:=$(wildcard $(PGSQL_CAND_DIRS))
+PGSQL_INC_DIR:=$(patsubst %/libpq-fe.h,%,$(firstword $(PGSQL_REAL_INC)))
+ifneq (,$(PGSQL_INC_DIR))
+  APPS+=app_voicemail_pg.so
+  APPS+=app_sql_postgres.so
+	CFLAGS+=-I$(PGSQL_INC_DIR)
+endif
+
 all: $(APPS)
 
 clean:
 	rm -f *.so *.o look .depend
 
+# TODO: improve the implicit rule below to accept LDFLAGS
+app_voicemail_pg.so: app_voicemail_pg.o
+	$(CC) $(SOLINK) -o $@ $< -lpq
+
+app_voicemail_pg.o: app_voicemail.c
+	$(CC) $(CFLAGS) -DUSEPOSTGRESVM -c $< -o $@
+
 %.so : %.o
 	$(CC) $(SOLINK) -o $@ $<
 
diff -urNad asterisk-1.0.9.dfsg.1/configs/modules.conf.sample /tmp/dpep.vy7i73/asterisk-1.0.9.dfsg.1/configs/modules.conf.sample
--- asterisk-1.0.9.dfsg.1/configs/modules.conf.sample	2005-07-14 00:32:03.000000000 +0300
+++ /tmp/dpep.vy7i73/asterisk-1.0.9.dfsg.1/configs/modules.conf.sample	2005-07-14 00:36:26.000000000 +0300
@@ -19,6 +19,13 @@
 ; chan_oss.  Don't load it.
 ;
 noload => app_intercom.so
+
+; don't load the postgresql voicemail module by default.
+; enable it only after disabling the original app_voiocemail (they conflict)
+; and configuring it (because it will hang and fail to load otherwise)
+noload => app_voicemail_pg.so
+;noload => app_voicemail.so
+
 ;
 ; Explicitly load the chan_modem.so early on to be sure
 ; it loads before any of the chan_modem_* 's afte rit

--45Z9DzgjV8m4Oswq--




More information about the Pkg-voip-maintainers mailing list