aboutsummaryrefslogtreecommitdiffstats
path: root/net/asterisk10/files
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2008-12-09 15:59:50 +0800
committersobomax <sobomax@FreeBSD.org>2008-12-09 15:59:50 +0800
commit2d40dfc8747b6b3d6ae89e29bf2c82314d6f3c78 (patch)
treef8ff09d666ce28f4173d9c9437ea3b167043eab5 /net/asterisk10/files
parentf38ede9d89fe5dfdd0383e64c6a36d57b2aa4213 (diff)
downloadfreebsd-ports-gnome-2d40dfc8747b6b3d6ae89e29bf2c82314d6f3c78.tar.gz
freebsd-ports-gnome-2d40dfc8747b6b3d6ae89e29bf2c82314d6f3c78.tar.zst
freebsd-ports-gnome-2d40dfc8747b6b3d6ae89e29bf2c82314d6f3c78.zip
Update to 1.4.22.
Diffstat (limited to 'net/asterisk10/files')
-rw-r--r--net/asterisk10/files/codecnego-patch-Makefile36
-rw-r--r--net/asterisk10/files/feature_disconnect.diff42
-rw-r--r--net/asterisk10/files/nocodecnego-patch-Makefile13
-rw-r--r--net/asterisk10/files/patch-channels::chan_zap.c80
4 files changed, 30 insertions, 141 deletions
diff --git a/net/asterisk10/files/codecnego-patch-Makefile b/net/asterisk10/files/codecnego-patch-Makefile
index e6b6ac476b42..0146d59c7b21 100644
--- a/net/asterisk10/files/codecnego-patch-Makefile
+++ b/net/asterisk10/files/codecnego-patch-Makefile
@@ -1,8 +1,5 @@
-
-$FreeBSD$
-
---- Makefile.orig
-+++ Makefile
+--- Makefile.orig 2008-10-16 17:36:35.000000000 +0300
++++ Makefile 2008-10-16 17:36:36.000000000 +0300
@@ -129,7 +129,7 @@
ASTMANDIR=$(mandir)
ifneq ($(findstring BSD,$(OSARCH)),)
@@ -15,16 +12,16 @@ $FreeBSD$
@@ -214,9 +214,11 @@
ASTLDFLAGS+=-L/usr/local/lib
endif
-
+
+ifneq ($(OSARCH),FreeBSD)
ifneq ($(PROC),ultrasparc)
ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
endif
+endif
-
+
ifeq ($(PROC),ppc)
ASTCFLAGS+=-fsigned-char
-@@ -224,7 +224,7 @@
+@@ -224,7 +226,7 @@
ifeq ($(OSARCH),FreeBSD)
# -V is understood by BSD Make, not by GNU make.
@@ -33,7 +30,7 @@ $FreeBSD$
ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
endif
-@@ -404,15 +404,15 @@
+@@ -401,15 +403,15 @@
# Should static HTTP be installed during make samples or even with its own target ala
# webvoicemail? There are portions here that *could* be customized but might also be
# improved a lot. I'll put it here for now.
@@ -54,7 +51,7 @@ $FreeBSD$
$(MAKE) -C sounds install
update:
-@@ -433,47 +433,47 @@
+@@ -430,47 +432,47 @@
OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h)))
installdirs:
@@ -134,7 +131,7 @@ $FreeBSD$
fi
$(SUBDIRS_INSTALL):
-@@ -507,7 +507,7 @@
+@@ -506,7 +508,7 @@
@exit 1
endif
@@ -143,7 +140,7 @@ $FreeBSD$
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
fi
-@@ -545,31 +545,23 @@
+@@ -544,31 +546,23 @@
upgrade: bininstall
adsi:
@@ -183,7 +180,7 @@ $FreeBSD$
( \
echo "[directories]" ; \
echo "astetcdir => $(ASTETCDIR)" ; \
-@@ -655,20 +647,23 @@
+@@ -655,20 +649,23 @@
echo "; Default: strict"; \
echo ";"; \
echo ";translation_algorithm = strict"; \
@@ -211,16 +208,3 @@ $FreeBSD$
done
@echo " +--------- Asterisk Web Voicemail ----------+"
@echo " + +"
-@@ -695,10 +690,10 @@
-
- __rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
- rm -rf /tmp/asterisk ; \
-- mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
-+ $(MKDIR) /tmp/asterisk/redhat/RPMS/i386 ; \
- $(MAKE) DESTDIR=/tmp/asterisk install ; \
- $(MAKE) DESTDIR=/tmp/asterisk samples ; \
-- mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
-+ $(MKDIR) /tmp/asterisk/etc/rc.d/init.d ; \
- cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \
- rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
-
diff --git a/net/asterisk10/files/feature_disconnect.diff b/net/asterisk10/files/feature_disconnect.diff
index 5be713b0da13..a712e906c924 100644
--- a/net/asterisk10/files/feature_disconnect.diff
+++ b/net/asterisk10/files/feature_disconnect.diff
@@ -143,9 +143,9 @@
+
#endif /* _AST_FEATURES_H */
---- res/res_features.c.orig 2008-04-08 14:55:25.000000000 +0300
-+++ res/res_features.c 2008-04-08 14:59:59.000000000 +0300
-@@ -485,18 +485,6 @@
+--- res/res_features.c.orig 2008-10-16 18:17:33.000000000 +0300
++++ res/res_features.c 2008-10-16 18:49:20.000000000 +0300
+@@ -517,18 +517,6 @@
}
@@ -164,32 +164,38 @@
/*! \brief
* set caller and callee according to the direction
*/
-@@ -1061,32 +1049,35 @@
+@@ -1121,38 +1109,40 @@
+ res = 0;
+ break;
+ }
+- ast_rwlock_unlock(&features_lock);
+
return res;
}
-static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense)
+void ast_features_lock(void)
+{
-+ ast_rwlock_rdlock(&features_lock);
-+ AST_LIST_LOCK(&feature_list);
++ ast_rwlock_rdlock(&features_lock);
++ AST_LIST_LOCK(&feature_list);
+}
+
+void ast_features_unlock(void)
+{
-+ AST_LIST_UNLOCK(&feature_list);
-+ ast_rwlock_unlock(&features_lock);
++ AST_LIST_UNLOCK(&feature_list);
++ ast_rwlock_unlock(&features_lock);
+}
+
+int ast_feature_detect(struct ast_channel *chan, const struct ast_flags *features, char *code, struct feature_interpret_result *result)
{
int x;
- struct ast_flags features;
- int res = FEATURE_RETURN_PASSDIGITS;
struct ast_call_feature *feature;
- const char *dynamic_features;
+ const char *dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES");
char *tmp, *tok;
+ int res = FEATURE_RETURN_PASSDIGITS;
+ int feature_detected = 0;
- if (sense == FEATURE_SENSE_CHAN) {
- ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
@@ -200,8 +206,8 @@
- }
- if (option_debug > 2)
- ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, code=%s, sense=%d, features=%d dynamic=%s\n", chan->name, peer->name, code, sense, features.flags, dynamic_features);
-+ result->builtin_feature = NULL;
-+ result->num_dyn_features = 0;
++ result->builtin_feature = NULL;
++ result->num_dyn_features = 0;
- ast_rwlock_rdlock(&features_lock);
for (x = 0; x < FEATURES_COUNT; x++) {
@@ -212,18 +218,10 @@
if (!strcmp(builtin_features[x].exten, code)) {
- res = builtin_features[x].operation(chan, peer, config, code, sense, NULL);
+ result->builtin_feature = &builtin_features[x];
+ feature_detected = 1;
break;
} else if (!strncmp(builtin_features[x].exten, code, strlen(code))) {
- if (res == FEATURE_RETURN_PASSDIGITS)
-@@ -1094,7 +1085,6 @@
- }
- }
- }
-- ast_rwlock_unlock(&features_lock);
-
- if (ast_strlen_zero(dynamic_features))
- return res;
-@@ -1102,9 +1092,7 @@
+@@ -1169,9 +1159,7 @@
tmp = ast_strdupa(dynamic_features);
while ((tok = strsep(&tmp, "#"))) {
@@ -233,7 +231,7 @@
continue;
}
-@@ -1112,21 +1100,52 @@
+@@ -1179,21 +1167,52 @@
if (!strcmp(feature->exten, code)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 " Feature Found: %s exten: %s\n",feature->sname, tok);
diff --git a/net/asterisk10/files/nocodecnego-patch-Makefile b/net/asterisk10/files/nocodecnego-patch-Makefile
index c325d81f10af..cf5e1df564b0 100644
--- a/net/asterisk10/files/nocodecnego-patch-Makefile
+++ b/net/asterisk10/files/nocodecnego-patch-Makefile
@@ -208,16 +208,3 @@
done
@echo " +--------- Asterisk Web Voicemail ----------+"
@echo " + +"
-@@ -654,10 +649,10 @@
-
- __rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
- rm -rf /tmp/asterisk ; \
-- mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
-+ $(MKDIR) /tmp/asterisk/redhat/RPMS/i386 ; \
- $(MAKE) DESTDIR=/tmp/asterisk install ; \
- $(MAKE) DESTDIR=/tmp/asterisk samples ; \
-- mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
-+ $(MKDIR) /tmp/asterisk/etc/rc.d/init.d ; \
- cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \
- rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
-
diff --git a/net/asterisk10/files/patch-channels::chan_zap.c b/net/asterisk10/files/patch-channels::chan_zap.c
deleted file mode 100644
index ab02c02af962..000000000000
--- a/net/asterisk10/files/patch-channels::chan_zap.c
+++ /dev/null
@@ -1,80 +0,0 @@
-
-$FreeBSD$
-
---- channels/chan_zap.c.orig Tue Nov 29 20:24:39 2005
-+++ channels/chan_zap.c Fri Jan 13 13:28:33 2006
-@@ -638,6 +638,7 @@ static struct zt_pvt {
- int cidlen;
- int ringt;
- int ringt_base;
-+ int waitnorings;
- int stripmsd;
- int callwaitcas;
- int callwaitrings;
-@@ -2308,6 +2309,19 @@ static int zt_hangup(struct ast_channel
- }
-
- ast_mutex_lock(&p->lock);
-+ switch (p->sig) {
-+ case SIG_FXSGS:
-+ case SIG_FXSKS:
-+ case SIG_FXSLS:
-+ if((ast->_state == AST_STATE_RING) && (p->ringt > 1))
-+ {
-+ p->waitnorings = 1;
-+ }
-+ break;
-+ default:
-+ break;
-+ };
-+
-
- index = zt_get_index(ast, p, 1);
-
-@@ -6129,7 +6143,37 @@ static void *ss_thread(void *data)
- ast_setstate(chan, AST_STATE_RING);
- chan->rings = 1;
- p->ringt = p->ringt_base;
-+ p->waitnorings = 0;
- res = ast_pbx_run(chan);
-+
-+ if(p->waitnorings)
-+ {
-+ p->ringt = p->ringt_base;
-+ for(;;)
-+ {
-+ int i,j=0;
-+ i = ZT_IOMUX_SIGEVENT | ZT_IOMUX_NOWAIT;
-+ if (ioctl(p->subs[index].zfd, ZT_IOMUX, &i) == -1)
-+ break;
-+
-+ if (ioctl(p->subs[index].zfd, ZT_GETEVENT, &j) == -1)
-+ break;
-+
-+ if(j == ZT_EVENT_RINGOFFHOOK)
-+ p->ringt = p->ringt_base;
-+
-+ usleep(20000);
-+
-+ if (p->ringt <= 0)
-+ break;
-+
-+ else if (p->ringt > 0)
-+ p->ringt--;
-+ }
-+ p->ringt = 0;
-+ p->waitnorings = 0;
-+ }
-+
- if (res) {
- ast_hangup(chan);
- ast_log(LOG_WARNING, "PBX exited non-zero\n");
-@@ -6431,7 +6475,7 @@ static void *do_monitor(void *data)
- i = iflist;
- while(i) {
- if ((i->subs[SUB_REAL].zfd > -1) && i->sig && (!i->radio)) {
-- if (!i->owner && !i->subs[SUB_REAL].owner) {
-+ if (!i->owner && !i->subs[SUB_REAL].owner && !i->waitnorings) {
- /* This needs to be watched, as it lacks an owner */
- pfds[count].fd = i->subs[SUB_REAL].zfd;
- pfds[count].events = POLLPRI;