diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2007-12-26 11:13:38 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2007-12-26 11:13:38 +0000 |
commit | d44178743b8691076146bfddfc4f20708fc2682b (patch) | |
tree | 4283c0776713f96bcf3c10713f8f288aa81feb85 /net/asterisk16/files | |
parent | e958139444c0bce7bea59836337994cc4ca1d7fd (diff) | |
download | ports-d44178743b8691076146bfddfc4f20708fc2682b.tar.gz ports-d44178743b8691076146bfddfc4f20708fc2682b.zip |
Notes
Diffstat (limited to 'net/asterisk16/files')
-rw-r--r-- | net/asterisk16/files/codecnego-patch-Makefile | 45 | ||||
-rw-r--r-- | net/asterisk16/files/nocodecnego-patch-Makefile | 45 | ||||
-rw-r--r-- | net/asterisk16/files/patch-channels::chan_sip.c | 64 | ||||
-rw-r--r-- | net/asterisk16/files/patch-channels::chan_skinny.c | 14 |
4 files changed, 66 insertions, 102 deletions
diff --git a/net/asterisk16/files/codecnego-patch-Makefile b/net/asterisk16/files/codecnego-patch-Makefile index 7a39f24fcd66..f474578c3a35 100644 --- a/net/asterisk16/files/codecnego-patch-Makefile +++ b/net/asterisk16/files/codecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig Mon Sep 17 11:42:04 2007 -+++ Makefile Mon Sep 17 11:43:10 2007 -@@ -119,7 +119,7 @@ +--- Makefile.orig Mon Dec 24 11:53:33 2007 ++++ Makefile Mon Dec 24 11:53:33 2007 +@@ -127,7 +127,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -9,7 +9,7 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -210,7 +210,7 @@ +@@ -222,7 +222,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. @@ -18,7 +18,7 @@ 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 -@@ -379,15 +379,15 @@ +@@ -402,15 +402,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. @@ -39,7 +39,7 @@ $(MAKE) -C sounds install update: -@@ -408,45 +408,45 @@ +@@ -431,45 +431,45 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) bininstall: _all @@ -115,7 +115,7 @@ fi $(SUBDIRS_INSTALL): -@@ -473,7 +473,7 @@ +@@ -496,7 +496,7 @@ echo " WARNING WARNING WARNING" ;\ fi @@ -124,7 +124,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -511,31 +511,23 @@ +@@ -534,31 +534,23 @@ upgrade: bininstall adsi: @@ -164,7 +164,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -597,20 +589,23 @@ +@@ -643,20 +635,23 @@ echo "; Default: strict"; \ echo ";"; \ echo ";translation_algorithm = strict"; \ @@ -192,7 +192,7 @@ done @echo " +--------- Asterisk Web Voicemail ----------+" @echo " + +" -@@ -637,10 +632,10 @@ +@@ -683,10 +678,10 @@ __rpm: include/asterisk/version.h include/asterisk/buildopts.h spec rm -rf /tmp/asterisk ; \ @@ -205,28 +205,3 @@ 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 -@@ -651,19 +646,19 @@ - config: - @if [ "${OSARCH}" = "linux-gnu" ]; then \ - if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ - elif [ -f /etc/debian_version ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \ - /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; \ - elif [ -f /etc/gentoo-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ - /sbin/rc-update add asterisk default; \ - elif [ -f /etc/mandrake-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ - elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ - elif [ -f /etc/slackware-version ]; then \ - echo "Slackware is not currently supported, although an init script does exist for it." \ diff --git a/net/asterisk16/files/nocodecnego-patch-Makefile b/net/asterisk16/files/nocodecnego-patch-Makefile index 680c226dc42d..f73c3d83bcde 100644 --- a/net/asterisk16/files/nocodecnego-patch-Makefile +++ b/net/asterisk16/files/nocodecnego-patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig Thu Aug 9 16:10:46 2007 -+++ Makefile Mon Sep 17 11:40:51 2007 -@@ -119,7 +119,7 @@ +--- Makefile.orig Mon Dec 17 08:44:51 2007 ++++ Makefile Mon Dec 24 11:54:52 2007 +@@ -127,7 +127,7 @@ ASTMANDIR=$(mandir) ifneq ($(findstring BSD,$(OSARCH)),) ASTVARLIBDIR=$(prefix)/share/asterisk @@ -9,7 +9,7 @@ else ASTVARLIBDIR=$(localstatedir)/lib/asterisk endif -@@ -210,7 +210,7 @@ +@@ -222,7 +222,7 @@ ifeq ($(OSARCH),FreeBSD) # -V is understood by BSD Make, not by GNU make. @@ -18,7 +18,7 @@ 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 -@@ -379,15 +379,15 @@ +@@ -402,15 +402,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. @@ -39,7 +39,7 @@ $(MAKE) -C sounds install update: -@@ -408,45 +408,45 @@ +@@ -431,45 +431,45 @@ OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) bininstall: _all @@ -115,7 +115,7 @@ fi $(SUBDIRS_INSTALL): -@@ -473,7 +473,7 @@ +@@ -496,7 +496,7 @@ echo " WARNING WARNING WARNING" ;\ fi @@ -124,7 +124,7 @@ @if [ -x /usr/sbin/asterisk-post-install ]; then \ /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ fi -@@ -511,31 +511,23 @@ +@@ -534,31 +534,23 @@ upgrade: bininstall adsi: @@ -164,7 +164,7 @@ ( \ echo "[directories]" ; \ echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -556,20 +548,23 @@ +@@ -602,20 +594,23 @@ echo ";astctlowner = root" ; \ echo ";astctlgroup = apache" ; \ echo ";astctl = asterisk.ctl" ; \ @@ -192,7 +192,7 @@ done @echo " +--------- Asterisk Web Voicemail ----------+" @echo " + +" -@@ -596,10 +591,10 @@ +@@ -642,10 +637,10 @@ __rpm: include/asterisk/version.h include/asterisk/buildopts.h spec rm -rf /tmp/asterisk ; \ @@ -205,28 +205,3 @@ 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 -@@ -610,19 +605,19 @@ - config: - @if [ "${OSARCH}" = "linux-gnu" ]; then \ - if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ - elif [ -f /etc/debian_version ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.debian.asterisk /etc/init.d/asterisk; \ - /usr/sbin/update-rc.d asterisk start 10 2 3 4 5 . stop 91 2 3 4 5 .; \ - elif [ -f /etc/gentoo-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.gentoo.asterisk /etc/init.d/asterisk; \ - /sbin/rc-update add asterisk default; \ - elif [ -f /etc/mandrake-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.mandrake.asterisk /etc/rc.d/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ - elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then \ -- $(INSTALL) -m 755 contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ -+ $(BSD_INSTALL_SCRIPT) contrib/init.d/rc.suse.asterisk /etc/init.d/asterisk; \ - /sbin/chkconfig --add asterisk; \ - elif [ -f /etc/slackware-version ]; then \ - echo "Slackware is not currently supported, although an init script does exist for it." \ diff --git a/net/asterisk16/files/patch-channels::chan_sip.c b/net/asterisk16/files/patch-channels::chan_sip.c index 06bb9c822545..916cc7ffa0ac 100644 --- a/net/asterisk16/files/patch-channels::chan_sip.c +++ b/net/asterisk16/files/patch-channels::chan_sip.c @@ -1,6 +1,6 @@ ---- channels/chan_sip.c.orig Wed Mar 28 11:23:42 2007 -+++ channels/chan_sip.c Wed Mar 28 11:36:27 2007 -@@ -484,7 +484,7 @@ static const struct cfsip_options { +--- channels/chan_sip.c.orig Mon Dec 24 11:59:46 2007 ++++ channels/chan_sip.c Mon Dec 24 11:58:47 2007 +@@ -493,7 +493,7 @@ #define DEFAULT_MOHINTERPRET "default" #define DEFAULT_MOHSUGGEST "" #define DEFAULT_VMEXTEN "asterisk" @@ -9,7 +9,7 @@ #define DEFAULT_NOTIFYMIME "application/simple-message-summary" #define DEFAULT_MWITIME 10 #define DEFAULT_ALLOWGUEST TRUE -@@ -3822,6 +3823,8 @@ static struct ast_channel *sip_new(struc +@@ -3985,6 +3985,8 @@ ast_codec_pref_remove2(&tmp->nativeformats, ~i->usercapability); fmt = ast_codec_pref_index_audio(&tmp->nativeformats, 0); @@ -18,18 +18,46 @@ /* If we have a prefcodec setting, we have an inbound channel that set a preferred format for this call. Otherwise, we check the jointcapability We also check for vrtp. If it's not there, we are not allowed do any video anyway. -@@ -11203,6 +11215,13 @@ static int build_reply_digest(struct sip - secret = p->peersecret; - md5secret = p->peermd5secret; - } -+ /* No authentication. Try to get auth info from channel vars */ -+ if (ast_strlen_zero(username)) -+ { -+ username = pbx_builtin_getvar_helper(p->owner, "SIP_AUTH_NAME"); -+ secret = pbx_builtin_getvar_helper(p->owner, "SIP_AUTH_SECRET"); -+ md5secret = pbx_builtin_getvar_helper(p->owner, "SIP_AUTH_MD5SECRET"); -+ } - if (ast_strlen_zero(username)) /* We have no authentication */ - return -1; +@@ -15845,6 +15847,9 @@ + char *ext, *host; + char tmp[256]; + char *dest = data; ++ char *secret = NULL; ++ char *md5secret = NULL; ++ char *authname = NULL; - + if (!(p = sip_alloc(NULL, NULL, 0, SIP_INVITE))) { + ast_log(LOG_ERROR, "Unable to build sip pvt data for '%s' (Out of memory or socket error)\n", (char *)data); +@@ -15866,6 +15871,17 @@ + if (host) { + *host++ = '\0'; + ext = tmp; ++ secret = strchr(ext, ':'); ++ if (secret) { ++ *secret++ = '\0'; ++ md5secret = strchr(secret, ':'); ++ if (md5secret) { ++ *md5secret++ = '\0'; ++ authname = strchr(md5secret, ':'); ++ if (authname) ++ *authname++ = '\0'; ++ } ++ } + } else { + ext = strchr(tmp, '/'); + if (ext) +@@ -15898,6 +15914,14 @@ + ast_string_field_set(p, username, ext); + ast_string_field_free(p, fullcontact); + } ++ if (secret && !ast_strlen_zero(secret)) ++ ast_string_field_set(p, peersecret, secret); ++ ++ if (md5secret && !ast_strlen_zero(md5secret)) ++ ast_string_field_set(p, peermd5secret, md5secret); ++ ++ if (authname && !ast_strlen_zero(authname)) ++ ast_string_field_set(p, authname, authname); + #if 0 + printf("Setting up to call extension '%s' at '%s'\n", ext ? ext : "<none>", host); + #endif diff --git a/net/asterisk16/files/patch-channels::chan_skinny.c b/net/asterisk16/files/patch-channels::chan_skinny.c deleted file mode 100644 index e2d94821c558..000000000000 --- a/net/asterisk16/files/patch-channels::chan_skinny.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- channels/chan_skinny.c.orig -+++ channels/chan_skinny.c -@@ -107,7 +107,7 @@ - #define htolel(x) (x) - #define htoles(x) (x) - #else --#if defined(SOLARIS) || defined(__Darwin__) || defined(__NetBSD__) || defined(__OpenBSD__) -+#if defined(SOLARIS) || defined(__Darwin__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) - #define __bswap_16(x) \ - ((((x) & 0xff00) >> 8) | \ - (((x) & 0x00ff) << 8)) |