diff options
Diffstat (limited to 'net/asterisk14/files')
19 files changed, 0 insertions, 1527 deletions
diff --git a/net/asterisk14/files/asterisk.sh.in b/net/asterisk14/files/asterisk.sh.in deleted file mode 100644 index e05d58ed6ee8..000000000000 --- a/net/asterisk14/files/asterisk.sh.in +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -# PROVIDE: asterisk -# REQUIRE: DAEMON -# KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf to enable asterisk: -# -# asterisk_enable="YES" -# - -. %%RC_SUBR%% - -stop_precmd=asterisk_shutdown -sig_stop=KILL -asterisk_shutdown () { - %%PREFIX%%/sbin/asterisk -qrx 'stop now' - sleep 1 - return 0 -} - -name=asterisk -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/asterisk - -load_rc_config $name - -pidfile=${asterisk_pidfile:-"/var/run/asterisk.pid"} - -asterisk_enable=${asterisk_enable:-"NO"} - -run_rc_command "$1" diff --git a/net/asterisk14/files/codecnego-patch-Makefile b/net/asterisk14/files/codecnego-patch-Makefile deleted file mode 100644 index c94aad32f623..000000000000 --- a/net/asterisk14/files/codecnego-patch-Makefile +++ /dev/null @@ -1,207 +0,0 @@ ---- Makefile.orig 2008-04-08 14:50:57.000000000 +0300 -+++ Makefile 2008-04-08 14:52:01.000000000 +0300 -@@ -129,7 +129,7 @@ - ASTMANDIR=$(mandir) - ifneq ($(findstring BSD,$(OSARCH)),) - ASTVARLIBDIR=$(prefix)/share/asterisk -- ASTVARRUNDIR=$(localstatedir)/run/asterisk -+ ASTVARRUNDIR=$(localstatedir)/run - else - ASTVARLIBDIR=$(localstatedir)/lib/asterisk - endif -@@ -224,7 +224,7 @@ - - ifeq ($(OSARCH),FreeBSD) - # -V is understood by BSD Make, not by GNU make. -- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) -+ BSDVERSION=$(OSVERSION) - 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 @@ - # 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. -- mkdir -p $(DESTDIR)$(ASTDATADIR)/static-http -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/static-http - for x in static-http/*; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \ - done -- mkdir -p $(DESTDIR)$(ASTDATADIR)/images -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/images - for x in images/*.jpg; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTDATADIR)/images ; \ - done -- mkdir -p $(DESTDIR)$(AGI_DIR) -+ $(MKDIR) $(DESTDIR)$(AGI_DIR) - $(MAKE) -C sounds install - - update: -@@ -433,45 +433,45 @@ - OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) - - bininstall: _all -- mkdir -p $(DESTDIR)$(MODULES_DIR) -- mkdir -p $(DESTDIR)$(ASTSBINDIR) -- mkdir -p $(DESTDIR)$(ASTETCDIR) -- mkdir -p $(DESTDIR)$(ASTBINDIR) -- mkdir -p $(DESTDIR)$(ASTVARRUNDIR) -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/dictate -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor -- $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ -+ $(MKDIR) $(DESTDIR)$(MODULES_DIR) -+ $(MKDIR) $(DESTDIR)$(ASTSBINDIR) -+ $(MKDIR) $(DESTDIR)$(ASTETCDIR) -+ $(MKDIR) $(DESTDIR)$(ASTBINDIR) -+ $(MKDIR) $(DESTDIR)$(ASTVARRUNDIR) -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/voicemail -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/dictate -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/system -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/tmp -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/meetme -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/monitor -+ $(BSD_INSTALL_PROGRAM) main/asterisk $(DESTDIR)$(ASTSBINDIR)/ - $(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk -- $(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ -- $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ -+ $(BSD_INSTALL_SCRIPT) contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ -+ $(BSD_INSTALL_SCRIPT) contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ - if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \ - cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\ - chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\ - fi -- $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) -- $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir) -- $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) -+ $(MKDIR) $(DESTDIR)$(ASTHEADERDIR) -+ $(BSD_INSTALL_DATA) include/asterisk.h $(DESTDIR)$(includedir) -+ $(BSD_INSTALL_DATA) include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) - if [ -n "$(OLDHEADERS)" ]; then \ - rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\ - fi -- mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv -- mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom -- mkdir -p $(DESTDIR)$(ASTDATADIR)/keys -- mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware -- mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax -- mkdir -p $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys -- $(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys -- $(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(MKDIR) $(DESTDIR)$(ASTLOGDIR)/cdr-csv -+ $(MKDIR) $(DESTDIR)$(ASTLOGDIR)/cdr-custom -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/keys -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/firmware -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/firmware/iax -+ $(MKDIR) $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys -+ $(BSD_INSTALL_DATA) keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys -+ $(BSD_INSTALL_DATA) doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 - if [ -f contrib/firmware/iax/iaxy.bin ] ; then \ -- $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \ -+ $(BSD_INSTALL_DATA) contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \ - fi - - $(SUBDIRS_INSTALL): -@@ -505,7 +505,7 @@ - @exit 1 - endif - --install: badshell datafiles bininstall $(SUBDIRS_INSTALL) -+install: badshell datafiles bininstall $(SUBDIRS_INSTALL) samples - @if [ -x /usr/sbin/asterisk-post-install ]; then \ - /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ - fi -@@ -543,31 +543,23 @@ - upgrade: bininstall - - adsi: -- mkdir -p $(DESTDIR)$(ASTETCDIR) -+ $(MKDIR) $(DESTDIR)$(ASTETCDIR) - for x in configs/*.adsi; do \ - if [ ! -f $(DESTDIR)$(ASTETCDIR)/$$x ]; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \ - fi ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`-dist ; \ - done - - samples: adsi -- mkdir -p $(DESTDIR)$(ASTETCDIR) -+ $(MKDIR) $(DESTDIR)$(ASTETCDIR) - for x in configs/*.sample; do \ -- if [ -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \ -- if [ "$(OVERWRITE)" = "y" ]; then \ -- if cmp -s $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $$x ; then \ -- echo "Config file $$x is unchanged"; \ -- continue; \ -- fi ; \ -- mv -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.old ; \ -- else \ -- echo "Skipping config file $$x"; \ -- continue; \ -- fi ;\ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`-dist ;\ -+ if [ ! -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`;\ - fi ; \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ;\ - done -- if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ -+ if true; then \ - ( \ - echo "[directories]" ; \ - echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -653,20 +645,23 @@ - echo "; Default: strict"; \ - echo ";"; \ - echo ";translation_algorithm = strict"; \ -- ) > $(DESTDIR)$(ASTCONFPATH) ; \ -+ ) > $(DESTDIR)$(ASTCONFPATH)-dist ; \ -+ if [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ -+ cp $(DESTDIR)$(ASTCONFPATH)-dist $(DESTDIR)$(ASTCONFPATH); \ -+ fi; \ - else \ - echo "Skipping asterisk.conf creation"; \ - fi -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX - build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR) - - webvmail: - @[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 ) - @[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 ) - $(INSTALL) -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi -- mkdir -p $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk -+ $(MKDIR) $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk - for x in images/*.gif; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \ - done - @echo " +--------- Asterisk Web Voicemail ----------+" - @echo " + +" -@@ -693,10 +688,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/asterisk14/files/dtmf_debug.diff b/net/asterisk14/files/dtmf_debug.diff deleted file mode 100644 index 81205d40dd46..000000000000 --- a/net/asterisk14/files/dtmf_debug.diff +++ /dev/null @@ -1,225 +0,0 @@ ---- channels/chan_sip.c.orig 2008-03-18 16:42:59.000000000 +0200 -+++ channels/chan_sip.c 2008-03-18 17:08:34.000000000 +0200 -@@ -3768,6 +3768,7 @@ - ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner); - else { - p->owner = newchan; -+ ast_rtp_set_chan_name(p->rtp, newchan->name); - ret = 0; - } - if (option_debug > 2) -@@ -4032,6 +4035,7 @@ - if (i->rtp) { - tmp->fds[0] = ast_rtp_fd(i->rtp); - tmp->fds[1] = ast_rtcp_fd(i->rtp); -+ ast_rtp_set_chan_id(i->rtp, i->callid); - } - if (needvideo && i->vrtp) { - tmp->fds[2] = ast_rtp_fd(i->vrtp); -@@ -4059,6 +4063,8 @@ - if (!ast_strlen_zero(i->language)) - ast_string_field_set(tmp, language, i->language); - i->owner = tmp; -+ ast_rtp_set_chan_name(i->rtp, tmp->name); -+ - ast_module_ref(ast_module_info->self); - ast_copy_string(tmp->context, i->context, sizeof(tmp->context)); - /*Since it is valid to have extensions in the dialplan that have unescaped characters in them -@@ -4479,8 +4485,10 @@ - build_via(p); - if (!callid) - build_callid_pvt(p); -- else -+ else { - ast_string_field_set(p, callid, callid); -+ ast_rtp_set_chan_id(p->rtp, p->callid); -+ } - /* Assign default music on hold class */ - ast_string_field_set(p, mohinterpret, default_mohinterpret); - ast_string_field_set(p, mohsuggest, default_mohsuggest); ---- include/asterisk/rtp.h.orig 2008-03-18 13:35:42.000000000 +0200 -+++ include/asterisk/rtp.h 2008-03-18 13:35:58.000000000 +0200 -@@ -251,6 +251,9 @@ - - int ast_rtp_codec_getformat(int pt); - -+void ast_rtp_set_chan_name(struct ast_rtp *, const char *); -+void ast_rtp_set_chan_id(struct ast_rtp *, const char *); -+ - /*! \brief Set rtp timeout */ - void ast_rtp_set_rtptimeout(struct ast_rtp *rtp, int timeout); - /*! \brief Set rtp hold timeout */ ---- main/rtp.c.orig 2008-04-08 14:53:18.000000000 +0300 -+++ main/rtp.c 2008-04-08 14:54:14.000000000 +0300 -@@ -81,6 +81,7 @@ - static int rtpstart; /*!< First port for RTP sessions (set in rtp.conf) */ - static int rtpend; /*!< Last port for RTP sessions (set in rtp.conf) */ - static int rtpdebug; /*!< Are we debugging? */ -+static int rtpdebugdtmf; /*!< Are we debugging DTMFs? */ - static int rtcpdebug; /*!< Are we debugging RTCP? */ - static int rtcpstats; /*!< Are we debugging RTCP? */ - static int rtcpinterval = RTCP_DEFAULT_INTERVALMS; /*!< Time between rtcp reports in millisecs */ -@@ -168,6 +169,8 @@ - struct ast_codec_pref pref; - struct ast_rtp *bridged; /*!< Who we are Packet bridged to */ - int set_marker_bit:1; /*!< Whether to set the marker bit or not */ -+ char chan_name[100]; -+ char chan_id[100]; - }; - - /* Forward declarations */ -@@ -669,8 +672,8 @@ - struct ast_frame *f = NULL; - event = ntohl(*((unsigned int *)(data))); - event &= 0x001F; -- if (option_debug > 2 || rtpdebug) -- ast_log(LOG_DEBUG, "Cisco DTMF Digit: %08x (len = %d)\n", event, len); -+ if (option_debug > 2 || rtpdebug || rtpdebugdtmf) -+ ast_log(LOG_DEBUG, "Channel: %s %s Cisco DTMF packet: %08x (len = %d)\n", rtp->chan_name, rtp->chan_id, event, len); - if (event < 10) { - resp = '0' + event; - } else if (event < 11) { -@@ -684,12 +687,24 @@ - } - if (rtp->resp && (rtp->resp != resp)) { - f = send_dtmf(rtp, AST_FRAME_DTMF_END); -+ ast_log(LOG_DEBUG, "Channel: %s %s Cisco DTMF event: %c\n", rtp->chan_name, rtp->chan_id, rtp->resp); - } - rtp->resp = resp; - rtp->dtmfcount = dtmftimeout; - return f; - } - -+void ast_rtp_set_chan_id(struct ast_rtp *rtp, const char *chan_id) { -+ if (rtp == NULL || chan_id == NULL) -+ return; -+ snprintf(rtp->chan_id, sizeof(rtp->chan_id), "%s", chan_id); -+} -+ -+void ast_rtp_set_chan_name(struct ast_rtp *rtp, const char *chan_name) { -+ if (rtp == NULL || chan_name == NULL) -+ return; -+ snprintf(rtp->chan_name, sizeof(rtp->chan_name), "%s", chan_name); -+} - /*! - * \brief Process RTP DTMF and events according to RFC 2833. - * -@@ -1051,6 +1066,10 @@ - struct rtpPayloadType rtpPT; - int reconstruct = ntohl(rtpheader[0]); - -+ /* If we are listening for DTMF - then feed all packets into the core to keep the RTP stream consistent when relaying DTMFs */ -+ if (ast_test_flag(rtp, FLAG_P2P_NEED_DTMF)) -+ return -1; -+ - /* Get fields from packet */ - payload = (reconstruct & 0x7f0000) >> 16; - mark = (((reconstruct & 0x800000) >> 23) != 0); -@@ -1062,10 +1081,6 @@ - if (!bridged->current_RTP_PT[payload].code) - return -1; - -- /* If the payload is DTMF, and we are listening for DTMF - then feed it into the core */ -- if (ast_test_flag(rtp, FLAG_P2P_NEED_DTMF) && !rtpPT.isAstFormat && rtpPT.code == AST_RTP_DTMF) -- return -1; -- - /* Otherwise adjust bridged payload to match */ - bridged_payload = ast_rtp_lookup_code(bridged, rtpPT.isAstFormat, rtpPT.code); - -@@ -1254,11 +1269,12 @@ - /* This is special in-band data that's not one of our codecs */ - if (rtpPT.code == AST_RTP_DTMF) { - /* It's special -- rfc2833 process it */ -- if (rtp_debug_test_addr(&sin)) { -+ if (rtp_debug_test_addr(&sin) || rtpdebugdtmf) { - unsigned char *data; - unsigned int event; - unsigned int event_end; - unsigned int duration; -+ - data = rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen; - event = ntohl(*((unsigned int *)(data))); - event >>= 24; -@@ -1267,9 +1283,12 @@ - event_end >>= 24; - duration = ntohl(*((unsigned int *)(data))); - duration &= 0xFFFF; -- ast_verbose("Got RTP RFC2833 from %s:%u (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u, mark %d, event %08x, end %d, duration %-5.5d) \n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), payloadtype, seqno, timestamp, res - hdrlen, (mark?1:0), event, ((event_end & 0x80)?1:0), duration); -+ -+ ast_verbose("Channel: %s %s Got RTP RFC2833 from %s:%u to %s:%u (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u, mark %d, event %08x, end %d, duration %-5.5d)\n", rtp->chan_name, rtp->chan_id, ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), ast_inet_ntoa(rtp->us.sin_addr), ntohs(rtp->us.sin_port), payloadtype, seqno, timestamp, res - hdrlen, (mark?1:0), event, ((event_end & 0x80)?1:0), duration); - } - f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen, seqno, timestamp); -+ if (rtpdebugdtmf && f) -+ ast_verbose("Channel: %s %s Got RFC2833 DTMF event %c of type %s\n", rtp->chan_name, rtp->chan_id, f->subclass, (f->frametype == AST_FRAME_DTMF_BEGIN ? "DTMF BEGIN" : (f->frametype == AST_FRAME_DTMF_END ? "DTMF_END" : "UNKNOWN"))); - } else if (rtpPT.code == AST_RTP_CISCO_DTMF) { - /* It's really special -- process it the Cisco way */ - if (rtp->lastevent <= seqno || (rtp->lastevent >= 65530 && seqno <= 6)) { -@@ -2198,8 +2217,9 @@ - ast_log(LOG_ERROR, "RTP Transmission error to %s:%u: %s\n", - ast_inet_ntoa(rtp->them.sin_addr), - ntohs(rtp->them.sin_port), strerror(errno)); -- if (rtp_debug_test_addr(&rtp->them)) -- ast_verbose("Sent RTP DTMF packet to %s:%u (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n", -+ if (rtp_debug_test_addr(&rtp->them) || rtpdebugdtmf) -+ ast_verbose("Channel: %s %s Sent RTP DTMF packet to %s:%u (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n", -+ rtp->chan_name, rtp->chan_id, - ast_inet_ntoa(rtp->them.sin_addr), - ntohs(rtp->them.sin_port), payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); - /* Increment sequence number */ -@@ -2242,8 +2262,9 @@ - ast_log(LOG_ERROR, "RTP Transmission error to %s:%d: %s\n", - ast_inet_ntoa(rtp->them.sin_addr), - ntohs(rtp->them.sin_port), strerror(errno)); -- if (rtp_debug_test_addr(&rtp->them)) -- ast_verbose("Sent RTP DTMF packet to %s:%u (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n", -+ if (rtp_debug_test_addr(&rtp->them) || rtpdebugdtmf) -+ ast_verbose("Channel: %s %s Sent RTP DTMF packet to %s:%u (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n", -+ rtp->chan_name, rtp->chan_id, - ast_inet_ntoa(rtp->them.sin_addr), - ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); - -@@ -3481,6 +3502,16 @@ - return RESULT_SUCCESS; - } - -+static int rtp_do_debug_dtmf(int fd, int argc, char *argv[]) -+{ -+ if (argc != 3) -+ return RESULT_SHOWUSAGE; -+ -+ rtpdebugdtmf = 1; -+ ast_cli(fd, "RTP DTMF debugging enabled\n"); -+ return RESULT_SUCCESS; -+} -+ - static int rtp_do_debug(int fd, int argc, char *argv[]) - { - if (argc != 2) { -@@ -3541,6 +3572,7 @@ - if (argc != 3) - return RESULT_SHOWUSAGE; - rtpdebug = 0; -+ rtpdebugdtmf = 0; - ast_cli(fd,"RTP Debugging Disabled\n"); - return RESULT_SUCCESS; - } -@@ -3601,7 +3633,7 @@ - } - - static char debug_usage[] = -- "Usage: rtp debug [ip host[:port]]\n" -+ "Usage: rtp debug [ip host[:port] | dtmf]\n" - " Enable dumping of all RTP packets to and from host.\n"; - - static char no_debug_usage[] = -@@ -3676,6 +3708,10 @@ - rtp_do_debug, "Enable RTP debugging", - debug_usage }, - -+ { { "rtp", "debug", "dtmf", NULL }, -+ rtp_do_debug_dtmf, "Enable RTP debugging on DTMFs", -+ debug_usage }, -+ - { { "rtp", "debug", "off", NULL }, - rtp_no_debug, "Disable RTP debugging", - no_debug_usage, NULL, &cli_rtp_no_debug_deprecated }, diff --git a/net/asterisk14/files/feature_disconnect.diff b/net/asterisk14/files/feature_disconnect.diff deleted file mode 100644 index 5be713b0da13..000000000000 --- a/net/asterisk14/files/feature_disconnect.diff +++ /dev/null @@ -1,292 +0,0 @@ ---- apps/app_dial.c.orig Wed Feb 6 18:45:30 2008 -+++ apps/app_dial.c Wed Feb 6 18:51:59 2008 -@@ -297,6 +297,8 @@ AST_APP_OPTIONS(dial_exec_options, { - OPT_CALLER_HANGUP | OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER | \ - OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK)) - -+static int detect_disconnect(struct ast_channel *chan, char code); -+ - /* We define a custom "local user" structure because we - use it not only for keeping track of what is in use but - also for keeping track of who we're dialing. */ -@@ -402,6 +404,7 @@ static struct ast_channel *wait_for_answ - struct ast_channel *peer = NULL; - /* single is set if only one destination is enabled */ - int single = outgoing && !outgoing->next && !ast_test_flag(outgoing, OPT_MUSICBACK | OPT_RINGBACK); -+ - - if (single) { - /* Turn off hold music, etc */ -@@ -716,9 +719,9 @@ static struct ast_channel *wait_for_answ - } - - if (ast_test_flag(peerflags, OPT_CALLER_HANGUP) && -- (f->subclass == '*')) { /* hmm it it not guaranteed to be '*' anymore. */ -+ detect_disconnect(in, f->subclass)) { /* hmm it it not guaranteed to be '*' anymore. */ - if (option_verbose > 2) -- ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass); -+ ast_verbose(VERBOSE_PREFIX_3 "User requested call disconnect.\n"); - *to=0; - ast_cdr_noanswer(in->cdr); - strcpy(status, "CANCEL"); -@@ -776,6 +779,56 @@ static struct ast_channel *wait_for_answ - - return peer; - } -+ -+static char featurecode[FEATURE_MAX_LEN + 1] = ""; -+ -+static int detect_disconnect(struct ast_channel *chan, char code) -+{ -+ struct feature_interpret_result result; -+ int x; -+ struct ast_flags features; -+ int res = FEATURE_RETURN_PASSDIGITS; -+ struct ast_call_feature *feature; -+ char *cptr; -+ int len; -+ -+ len = strlen(featurecode); -+ if (len >= FEATURE_MAX_LEN) { -+ featurecode[0] = '\0'; -+ } -+ cptr = &featurecode[strlen(featurecode)]; -+ cptr[0] = code; -+ cptr[1] = '\0'; -+ -+ memset(&features, 0, sizeof(struct ast_flags)); -+ ast_set_flag(&features, AST_FEATURE_DISCONNECT); -+ -+ ast_features_lock(); -+ -+ res = ast_feature_detect(chan, &features, featurecode, &result); -+ -+ if (res != FEATURE_RETURN_STOREDIGITS) -+ featurecode[0] = '\0'; -+ -+ if (result.builtin_feature && result.builtin_feature->feature_mask & AST_FEATURE_DISCONNECT) { -+ ast_features_unlock(); -+ return 1; -+ } -+ -+ for (x = 0; x < result.num_dyn_features; ++x) { -+ feature = result.dynamic_features[x]; -+ if (feature->feature_mask & AST_FEATURE_DISCONNECT) { -+ ast_features_unlock(); -+ return 1; -+ } -+ } -+ -+ ast_features_unlock(); -+ -+ return 0; -+} -+ -+ - - static void replace_macro_delimiter(char *s) - { ---- include/asterisk/features.h.orig Thu Aug 23 23:16:41 2007 -+++ include/asterisk/features.h Tue Dec 11 17:13:52 2007 -@@ -31,6 +31,20 @@ - #define FEATURE_EXTEN_LEN 32 - #define FEATURE_MOH_LEN 80 /* same as MAX_MUSICCLASS from channel.h */ - -+#define FEATURE_RETURN_HANGUP -1 -+#define FEATURE_RETURN_SUCCESSBREAK 0 -+#define FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE -+#define FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER -+#define FEATURE_RETURN_PASSDIGITS 21 -+#define FEATURE_RETURN_STOREDIGITS 22 -+#define FEATURE_RETURN_SUCCESS 23 -+#define FEATURE_RETURN_KEEPTRYING 24 -+ -+#define FEATURE_SENSE_CHAN (1 << 0) -+#define FEATURE_SENSE_PEER (1 << 1) -+ -+typedef int (*feature_operation)(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense, void *data); -+ - /*! \brief main call feature structure */ - struct ast_call_feature { - int feature_mask; -@@ -38,7 +52,7 @@ - char sname[FEATURE_SNAME_LEN]; - char exten[FEATURE_MAX_LEN]; - char default_exten[FEATURE_MAX_LEN]; -- int (*operation)(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense, void *data); -+ feature_operation operation; - unsigned int flags; - char app[FEATURE_APP_LEN]; - char app_args[FEATURE_APP_ARGS_LEN]; -@@ -47,6 +61,12 @@ - }; - - -+struct feature_interpret_result { -+ struct ast_call_feature *builtin_feature; -+ struct ast_call_feature *dynamic_features[20]; -+ int num_dyn_features; -+}; -+ - - /*! \brief Park a call and read back parked location - * \param chan the channel to actually be parked -@@ -93,5 +113,11 @@ - /*! \brief unregister feature from feature_set - \param feature the ast_call_feature object which was registered before*/ - void ast_unregister_feature(struct ast_call_feature *feature); -+ -+int ast_feature_detect(struct ast_channel *chan, const struct ast_flags *features, char *code, struct feature_interpret_result *result); -+ -+void ast_features_lock(void); -+void ast_features_unlock(void); -+ - - #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 @@ - } - - --#define FEATURE_RETURN_HANGUP -1 --#define FEATURE_RETURN_SUCCESSBREAK 0 --#define FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE --#define FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER --#define FEATURE_RETURN_PASSDIGITS 21 --#define FEATURE_RETURN_STOREDIGITS 22 --#define FEATURE_RETURN_SUCCESS 23 --#define FEATURE_RETURN_KEEPTRYING 24 -- --#define FEATURE_SENSE_CHAN (1 << 0) --#define FEATURE_SENSE_PEER (1 << 1) -- - /*! \brief - * set caller and callee according to the direction - */ -@@ -1061,32 +1049,35 @@ - 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); -+} -+ -+void ast_features_unlock(void) -+{ -+ 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; - -- if (sense == FEATURE_SENSE_CHAN) { -- ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL); -- dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"); -- } else { -- ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL); -- dynamic_features = pbx_builtin_getvar_helper(peer, "DYNAMIC_FEATURES"); -- } -- 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; - -- ast_rwlock_rdlock(&features_lock); - for (x = 0; x < FEATURES_COUNT; x++) { -- if ((ast_test_flag(&features, builtin_features[x].feature_mask)) && -+ if ((ast_test_flag(features, builtin_features[x].feature_mask)) && - !ast_strlen_zero(builtin_features[x].exten)) { - /* Feature is up for consideration */ - if (!strcmp(builtin_features[x].exten, code)) { -- res = builtin_features[x].operation(chan, peer, config, code, sense, NULL); -+ result->builtin_feature = &builtin_features[x]; - 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 @@ - tmp = ast_strdupa(dynamic_features); - - while ((tok = strsep(&tmp, "#"))) { -- AST_LIST_LOCK(&feature_list); - if (!(feature = find_dynamic_feature(tok))) { -- AST_LIST_UNLOCK(&feature_list); - continue; - } - -@@ -1112,21 +1100,52 @@ - if (!strcmp(feature->exten, code)) { - if (option_verbose > 2) - ast_verbose(VERBOSE_PREFIX_3 " Feature Found: %s exten: %s\n",feature->sname, tok); -- res = feature->operation(chan, peer, config, code, sense, feature); -- if (res != FEATURE_RETURN_KEEPTRYING) { -- AST_LIST_UNLOCK(&feature_list); -+ result->dynamic_features[result->num_dyn_features++] = feature; -+ if (result->num_dyn_features >= (sizeof(result->dynamic_features) / sizeof(result->dynamic_features[0]))) { - break; - } - res = FEATURE_RETURN_PASSDIGITS; - } else if (!strncmp(feature->exten, code, strlen(code))) - res = FEATURE_RETURN_STOREDIGITS; - -- AST_LIST_UNLOCK(&feature_list); - } - - return res; - } - -+static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense) -+{ -+ struct feature_interpret_result result; -+ int x; -+ struct ast_flags features; -+ int res = FEATURE_RETURN_PASSDIGITS; -+ struct ast_call_feature *feature; -+ -+ if (sense == FEATURE_SENSE_CHAN) -+ ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL); -+ else -+ ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL); -+ if (option_debug > 2) -+ ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d\n", chan->name, peer->name, sense, features.flags); -+ -+ ast_features_lock(); -+ res = ast_feature_detect(chan, &features, code, &result); -+ -+ if (result.builtin_feature) -+ res = result.builtin_feature->operation(chan, peer, config, code, sense, NULL); -+ -+ for (x = 0; x < result.num_dyn_features; ++x) { -+ feature = result.dynamic_features[x]; -+ res = feature->operation(chan, peer, config, code, sense, feature); -+ if (res != FEATURE_RETURN_KEEPTRYING) -+ break; -+ res = FEATURE_RETURN_PASSDIGITS; -+ } -+ -+ ast_features_unlock(); -+ return res; -+} -+ - static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config) - { - int x; diff --git a/net/asterisk14/files/nocodecnego-patch-Makefile b/net/asterisk14/files/nocodecnego-patch-Makefile deleted file mode 100644 index 1d9675f1d664..000000000000 --- a/net/asterisk14/files/nocodecnego-patch-Makefile +++ /dev/null @@ -1,207 +0,0 @@ ---- Makefile.orig 2008-03-25 16:37:35.000000000 +0200 -+++ Makefile 2008-04-08 15:02:12.000000000 +0300 -@@ -129,7 +129,7 @@ - ASTMANDIR=$(mandir) - ifneq ($(findstring BSD,$(OSARCH)),) - ASTVARLIBDIR=$(prefix)/share/asterisk -- ASTVARRUNDIR=$(localstatedir)/run/asterisk -+ ASTVARRUNDIR=$(localstatedir)/run - else - ASTVARLIBDIR=$(localstatedir)/lib/asterisk - endif -@@ -224,7 +224,7 @@ - - ifeq ($(OSARCH),FreeBSD) - # -V is understood by BSD Make, not by GNU make. -- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) -+ BSDVERSION=$(OSVERSION) - 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 @@ - # 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. -- mkdir -p $(DESTDIR)$(ASTDATADIR)/static-http -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/static-http - for x in static-http/*; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \ - done -- mkdir -p $(DESTDIR)$(ASTDATADIR)/images -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/images - for x in images/*.jpg; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTDATADIR)/images ; \ - done -- mkdir -p $(DESTDIR)$(AGI_DIR) -+ $(MKDIR) $(DESTDIR)$(AGI_DIR) - $(MAKE) -C sounds install - - update: -@@ -433,45 +433,45 @@ - OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) - - bininstall: _all -- mkdir -p $(DESTDIR)$(MODULES_DIR) -- mkdir -p $(DESTDIR)$(ASTSBINDIR) -- mkdir -p $(DESTDIR)$(ASTETCDIR) -- mkdir -p $(DESTDIR)$(ASTBINDIR) -- mkdir -p $(DESTDIR)$(ASTVARRUNDIR) -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/dictate -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor -- $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ -+ $(MKDIR) $(DESTDIR)$(MODULES_DIR) -+ $(MKDIR) $(DESTDIR)$(ASTSBINDIR) -+ $(MKDIR) $(DESTDIR)$(ASTETCDIR) -+ $(MKDIR) $(DESTDIR)$(ASTBINDIR) -+ $(MKDIR) $(DESTDIR)$(ASTVARRUNDIR) -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/voicemail -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/dictate -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/system -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/tmp -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/meetme -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/monitor -+ $(BSD_INSTALL_PROGRAM) main/asterisk $(DESTDIR)$(ASTSBINDIR)/ - $(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk -- $(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ -- $(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ -+ $(BSD_INSTALL_SCRIPT) contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/ -+ $(BSD_INSTALL_SCRIPT) contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/ - if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \ - cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\ - chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\ - fi -- $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) -- $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir) -- $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) -+ $(MKDIR) $(DESTDIR)$(ASTHEADERDIR) -+ $(BSD_INSTALL_DATA) include/asterisk.h $(DESTDIR)$(includedir) -+ $(BSD_INSTALL_DATA) include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) - if [ -n "$(OLDHEADERS)" ]; then \ - rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\ - fi -- mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv -- mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom -- mkdir -p $(DESTDIR)$(ASTDATADIR)/keys -- mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware -- mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax -- mkdir -p $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys -- $(INSTALL) -m 644 keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys -- $(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 -- $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(MKDIR) $(DESTDIR)$(ASTLOGDIR)/cdr-csv -+ $(MKDIR) $(DESTDIR)$(ASTLOGDIR)/cdr-custom -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/keys -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/firmware -+ $(MKDIR) $(DESTDIR)$(ASTDATADIR)/firmware/iax -+ $(MKDIR) $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) keys/iaxtel.pub $(DESTDIR)$(ASTDATADIR)/keys -+ $(BSD_INSTALL_DATA) keys/freeworlddialup.pub $(DESTDIR)$(ASTDATADIR)/keys -+ $(BSD_INSTALL_DATA) doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_DATA) contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 - if [ -f contrib/firmware/iax/iaxy.bin ] ; then \ -- $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \ -+ $(BSD_INSTALL_DATA) contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \ - fi - - $(SUBDIRS_INSTALL): -@@ -505,7 +505,7 @@ - @exit 1 - endif - --install: badshell datafiles bininstall $(SUBDIRS_INSTALL) -+install: badshell datafiles bininstall $(SUBDIRS_INSTALL) samples - @if [ -x /usr/sbin/asterisk-post-install ]; then \ - /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ - fi -@@ -543,31 +543,23 @@ - upgrade: bininstall - - adsi: -- mkdir -p $(DESTDIR)$(ASTETCDIR) -+ $(MKDIR) $(DESTDIR)$(ASTETCDIR) - for x in configs/*.adsi; do \ - if [ ! -f $(DESTDIR)$(ASTETCDIR)/$$x ]; then \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x` ; \ - fi ; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`-dist ; \ - done - - samples: adsi -- mkdir -p $(DESTDIR)$(ASTETCDIR) -+ $(MKDIR) $(DESTDIR)$(ASTETCDIR) - for x in configs/*.sample; do \ -- if [ -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \ -- if [ "$(OVERWRITE)" = "y" ]; then \ -- if cmp -s $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $$x ; then \ -- echo "Config file $$x is unchanged"; \ -- continue; \ -- fi ; \ -- mv -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.old ; \ -- else \ -- echo "Skipping config file $$x"; \ -- continue; \ -- fi ;\ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`-dist ;\ -+ if [ ! -f $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ]; then \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`;\ - fi ; \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ;\ - done -- if [ "$(OVERWRITE)" = "y" ] || [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ -+ if true; then \ - ( \ - echo "[directories]" ; \ - echo "astetcdir => $(ASTETCDIR)" ; \ -@@ -612,20 +604,23 @@ - echo ";astctlowner = root" ; \ - echo ";astctlgroup = apache" ; \ - echo ";astctl = asterisk.ctl" ; \ -- ) > $(DESTDIR)$(ASTCONFPATH) ; \ -+ ) > $(DESTDIR)$(ASTCONFPATH)-dist ; \ -+ if [ ! -f $(DESTDIR)$(ASTCONFPATH) ]; then \ -+ cp $(DESTDIR)$(ASTCONFPATH)-dist $(DESTDIR)$(ASTCONFPATH); \ -+ fi; \ - else \ - echo "Skipping asterisk.conf creation"; \ - fi -- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX -+ $(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX - build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR) - - webvmail: - @[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 ) - @[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 ) - $(INSTALL) -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi -- mkdir -p $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk -+ $(MKDIR) $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk - for x in images/*.gif; do \ -- $(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \ -+ $(BSD_INSTALL_DATA) $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \ - done - @echo " +--------- Asterisk Web Voicemail ----------+" - @echo " + +" -@@ -652,10 +647,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/asterisk14/files/patch-agi::Makefile b/net/asterisk14/files/patch-agi::Makefile deleted file mode 100644 index f9910fe96dd6..000000000000 --- a/net/asterisk14/files/patch-agi::Makefile +++ /dev/null @@ -1,25 +0,0 @@ ---- agi/Makefile.orig Sat Dec 16 23:14:34 2006 -+++ agi/Makefile Wed Mar 28 11:13:21 2007 -@@ -13,7 +13,9 @@ - - .PHONY: clean all uninstall - --AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi -+AGIS_BIN=eagi-test eagi-sphinx-test -+AGIS_SCR=agi-test.agi jukebox.agi -+AGIS=$(AGIS_SCR) $(AGIS_BIN) - - ifeq ($(OSARCH),SunOS) - LIBS+=-lsocket -lnsl -@@ -31,8 +33,9 @@ eagi-test: eagi-test.o strcompat.o - eagi-sphinx-test: eagi-sphinx-test.o - - install: all -- mkdir -p $(DESTDIR)$(AGI_DIR) -- for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done -+ $(MKDIR) -p $(DESTDIR)$(AGI_DIR) -+ for x in $(AGIS_BIN); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(AGI_DIR) ; done -+ for x in $(AGIS_SCR); do $(BSD_INSTALL_SCRIPT) $$x $(DESTDIR)$(AGI_DIR) ; done - - uninstall: - for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done diff --git a/net/asterisk14/files/patch-channels::Makefile b/net/asterisk14/files/patch-channels::Makefile deleted file mode 100644 index dbe7d0c7a0d2..000000000000 --- a/net/asterisk14/files/patch-channels::Makefile +++ /dev/null @@ -1,35 +0,0 @@ - -$FreeBSD$ - ---- channels/Makefile.orig -+++ channels/Makefile -@@ -26,8 +26,8 @@ - endif - - ifeq ($(OSARCH),FreeBSD) -- PTLIB=-lpt_FreeBSD_x86_r -- H323LIB=-lh323_FreeBSD_x86_r -+ PTLIB=-lpt_r -+ H323LIB=-lh323_r - CHANH323LIB=-pthread - endif - -@@ -72,12 +72,12 @@ - h323/libchanh323.a h323/Makefile.ast: - $(CMD_PREFIX) $(MAKE) -C h323 - $(CMD_PREFIX) rm -f ../main/asterisk -- $(CMD_PREFIX) echo "***************************************************************" -- $(CMD_PREFIX) echo -- $(CMD_PREFIX) echo "********** Re-run 'make' to pick up H.323 parameters **********" -- $(CMD_PREFIX) echo -- $(CMD_PREFIX) echo "***************************************************************" -- $(CMD_PREFIX) exit 1 -+# $(CMD_PREFIX) echo "***************************************************************" -+# $(CMD_PREFIX) echo -+# $(CMD_PREFIX) echo "********** Re-run 'make' to pick up H.323 parameters **********" -+# $(CMD_PREFIX) echo -+# $(CMD_PREFIX) echo "***************************************************************" -+# $(CMD_PREFIX) exit 1 - endif - - gentone: gentone.c diff --git a/net/asterisk14/files/patch-channels::chan_sip.c b/net/asterisk14/files/patch-channels::chan_sip.c deleted file mode 100644 index e54df0eb1bf1..000000000000 --- a/net/asterisk14/files/patch-channels::chan_sip.c +++ /dev/null @@ -1,54 +0,0 @@ ---- channels/chan_sip.c.orig 2008-03-18 16:42:59.000000000 +0200 -+++ channels/chan_sip.c 2008-03-18 17:08:34.000000000 +0200 -@@ -495,7 +495,7 @@ - #define DEFAULT_MOHINTERPRET "default" - #define DEFAULT_MOHSUGGEST "" - #define DEFAULT_VMEXTEN "asterisk" --#define DEFAULT_CALLERID "asterisk" -+#define DEFAULT_CALLERID "Unknown" - #define DEFAULT_NOTIFYMIME "application/simple-message-summary" - #define DEFAULT_MWITIME 10 - #define DEFAULT_ALLOWGUEST TRUE -@@ -15873,6 +15881,9 @@ - char *ext, *host; - char tmp[256]; - char *dest = data; -+ char *secret = NULL; -+ char *md5secret = NULL; -+ char *authname = NULL; - - oldformat = format; - if (!(format &= ((AST_FORMAT_MAX_AUDIO << 1) - 1))) { -@@ -15903,6 +15914,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) -@@ -15933,6 +15955,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/asterisk14/files/patch-channels::chan_zap.c b/net/asterisk14/files/patch-channels::chan_zap.c deleted file mode 100644 index ab02c02af962..000000000000 --- a/net/asterisk14/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; diff --git a/net/asterisk14/files/patch-channels::h323::ast_h323.cxx b/net/asterisk14/files/patch-channels::h323::ast_h323.cxx deleted file mode 100644 index bfc819452128..000000000000 --- a/net/asterisk14/files/patch-channels::h323::ast_h323.cxx +++ /dev/null @@ -1,29 +0,0 @@ ---- channels/h323/ast_h323.cxx.orig 2008-04-08 15:08:37.000000000 +0300 -+++ channels/h323/ast_h323.cxx 2008-04-08 15:08:51.000000000 +0300 -@@ -81,8 +81,6 @@ - /** PWLib entry point */ - static MyProcess *localProcess = NULL; - --static int _timerChangePipe[2]; -- - static unsigned traceOptions = PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine; - - class PAsteriskLog : public PObject, public iostream { -@@ -191,8 +189,6 @@ - - MyProcess::~MyProcess() - { -- _timerChangePipe[0] = timerChangePipe[0]; -- _timerChangePipe[1] = timerChangePipe[1]; - } - - void MyProcess::Main() -@@ -2460,8 +2456,6 @@ - if (localProcess) { - delete localProcess; - localProcess = NULL; -- close(_timerChangePipe[0]); -- close(_timerChangePipe[1]); - } - if (logstream) { - PTrace::SetLevel(0); diff --git a/net/asterisk14/files/patch-configure b/net/asterisk14/files/patch-configure deleted file mode 100644 index adb7268b02b2..000000000000 --- a/net/asterisk14/files/patch-configure +++ /dev/null @@ -1,71 +0,0 @@ - -$FreeBSD$ - ---- configure.orig -+++ configure -@@ -3926,8 +3926,6 @@ - case "${host_os}" in - freebsd*) - ac_default_prefix=/usr/local -- CPPFLAGS=-I/usr/local/include -- LDFLAGS=-L/usr/local/lib - ;; - *) - ac_default_prefix=/usr -@@ -26228,6 +26226,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <ptlib.h> - #include <${HOME}/openh323/include/h323.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -26268,6 +26267,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <ptlib.h> - #include <${HOME}/openh323/include/h323.h> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" -@@ -26365,6 +26365,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <ptlib.h> - #include </usr/local/include/openh323/h323.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -26405,6 +26406,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <ptlib.h> - #include </usr/local/include/openh323/h323.h> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" -@@ -26652,7 +26654,7 @@ - - fi - -- PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}" -+ PLATFORM_OPENH323="h323_${OPENH323_SUFFIX}" - - if test "${HAS_OPENH323:-unset}" != "unset"; then - { echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 -@@ -31800,6 +31802,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default -+#include <ptlib.h> - #include <h323.h> - _ACEOF - rm -f conftest.$ac_objext -@@ -31840,6 +31843,7 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include <ptlib.h> - #include <h323.h> - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" diff --git a/net/asterisk14/files/patch-include::asterisk::utils.h b/net/asterisk14/files/patch-include::asterisk::utils.h deleted file mode 100644 index a06f7d065c84..000000000000 --- a/net/asterisk14/files/patch-include::asterisk::utils.h +++ /dev/null @@ -1,13 +0,0 @@ - -$FreeBSD$ - ---- include/asterisk/utils.h 2004/10/10 12:55:50 1.1 -+++ include/asterisk/utils.h 2004/10/10 12:56:43 -@@ -37,7 +37,6 @@ - #ifdef inet_ntoa - #undef inet_ntoa - #endif --#define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__ - - #ifdef LINUX - #define ast_pthread_create pthread_create diff --git a/net/asterisk14/files/patch-main::Makefile b/net/asterisk14/files/patch-main::Makefile deleted file mode 100644 index 56624065f61f..000000000000 --- a/net/asterisk14/files/patch-main::Makefile +++ /dev/null @@ -1,22 +0,0 @@ ---- main/Makefile.orig 2008-01-29 19:43:41.000000000 +0200 -+++ main/Makefile 2008-03-13 13:57:48.000000000 +0200 -@@ -102,8 +102,8 @@ - cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR) - $(MAKE) -C editline libedit.a - --db1-ast/libdb1.a: -- CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a -+#db1-ast/libdb1.a: -+# CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a - - ast_expr2.c ast_expr2.h: - bison -o $@ -d --name-prefix=ast_yy ast_expr2.y -@@ -133,7 +133,7 @@ - H323LDLIBS= - endif - --asterisk: $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -+asterisk: $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) - @$(ASTTOPDIR)/build_tools/make_build_h > $(ASTTOPDIR)/include/asterisk/build.h.tmp - @if cmp -s $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; then echo ; else \ - mv $(ASTTOPDIR)/include/asterisk/build.h.tmp $(ASTTOPDIR)/include/asterisk/build.h ; \ diff --git a/net/asterisk14/files/patch-main::db.c b/net/asterisk14/files/patch-main::db.c deleted file mode 100644 index 0b26f3b2cca6..000000000000 --- a/net/asterisk14/files/patch-main::db.c +++ /dev/null @@ -1,21 +0,0 @@ - -$FreeBSD$ - ---- main/db.c.orig Fri Jan 13 11:05:32 2006 -+++ main/db.c Fri Jan 13 11:06:55 2006 -@@ -35,6 +35,7 @@ - #include <errno.h> - #include <unistd.h> - #include <dirent.h> -+#include <db.h> - - #include "asterisk.h" - -@@ -51,7 +52,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi - #include "asterisk/utils.h" - #include "asterisk/lock.h" - #include "asterisk/manager.h" --#include "db1-ast/include/db.h" - - #ifdef __CYGWIN__ - #define dbopen __dbopen diff --git a/net/asterisk14/files/patch-main::frame.c b/net/asterisk14/files/patch-main::frame.c deleted file mode 100644 index 232de08a9e21..000000000000 --- a/net/asterisk14/files/patch-main::frame.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- main/frame.c.orig Wed Jan 25 13:22:43 2006 -+++ main/frame.c Wed Jan 25 13:21:25 2006 -@@ -1170,7 +1170,7 @@ static int g723_len(unsigned char buf) - { - switch(buf & TYPE_MASK) { - case TYPE_DONTSEND: -- return 0; -+ return 2; - break; - case TYPE_SILENCE: - return 4; diff --git a/net/asterisk14/files/patch-main::manager.c b/net/asterisk14/files/patch-main::manager.c deleted file mode 100644 index 686068b09e09..000000000000 --- a/net/asterisk14/files/patch-main::manager.c +++ /dev/null @@ -1,31 +0,0 @@ ---- main/manager.c.orig 2008-04-02 15:49:38.000000000 +0300 -+++ main/manager.c 2008-04-02 15:42:18.000000000 +0300 -@@ -176,6 +176,7 @@ - struct eventqent *eventq; - /* Timeout for ast_carefulwrite() */ - int writetimeout; -+ int pending_event; - AST_LIST_ENTRY(mansession) list; - }; - -@@ -2214,6 +2215,11 @@ - fds[0].events = POLLIN; - do { - ast_mutex_lock(&s->__lock); -+ if (s->pending_event) { -+ s->pending_event = 0; -+ ast_mutex_unlock(&s->__lock); -+ return 0; -+ } - s->waiting_thread = pthread_self(); - ast_mutex_unlock(&s->__lock); - -@@ -2475,6 +2481,8 @@ - ast_mutex_lock(&s->__lock); - if (s->waiting_thread != AST_PTHREADT_NULL) - pthread_kill(s->waiting_thread, SIGURG); -+ else -+ s->pending_event = 1; - ast_mutex_unlock(&s->__lock); - } - AST_LIST_UNLOCK(&sessions); diff --git a/net/asterisk14/files/rtp_force_dtmf-codecnego.diff b/net/asterisk14/files/rtp_force_dtmf-codecnego.diff deleted file mode 100644 index 7cd43e08d238..000000000000 --- a/net/asterisk14/files/rtp_force_dtmf-codecnego.diff +++ /dev/null @@ -1,86 +0,0 @@ ---- channels/chan_sip.c.orig 2008-03-12 17:37:00.000000000 +0200 -+++ channels/chan_sip.c 2008-03-12 18:17:33.000000000 +0200 -@@ -554,6 +554,9 @@ - static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ - static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ - static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ -+static int global_force_dtmf_relay = 0; -+static int global_force_dtmf_relay_pt = 101; -+ - static int compactheaders; /*!< send compact sip headers */ - static int recordhistory; /*!< Record SIP history. Off by default */ - static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -4983,6 +4986,8 @@ - int codec_index = 0; - int codec_pt_order[256]; - -+ int dtmf_present = 0; -+ - if (!p->rtp) { - ast_log(LOG_ERROR, "Got SDP but have no RTP session allocated.\n"); - return -1; -@@ -5408,12 +5413,20 @@ - for (x = 0; x < codec_index; ++x) { - struct rtpPayloadType pt; - pt = ast_rtp_lookup_pt(p->rtp, codec_pt_order[x]); -+ if (pt.code == AST_RTP_DTMF) -+ dtmf_present = 1; - if (!pt.isAstFormat && !pt.code && p->vrtp) - pt = ast_rtp_lookup_pt(p->vrtp, codec_pt_order[x]); - if (pt.isAstFormat) - ast_codec_pref_append(&p->formats, pt.code); - } - ast_codec_pref_remove2(&p->formats, ~p->usercapability); -+ if (!dtmf_present && global_force_dtmf_relay) { -+ newnoncodeccapability |= AST_RTP_DTMF; -+ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ codec_pt_order[codec_index++] = global_force_dtmf_relay_pt; -+ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); -+ } - - /* Now gather all of the codecs that we are asked for: */ - ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); -@@ -16845,6 +16858,9 @@ - - global_matchexterniplocally = FALSE; - -+ global_force_dtmf_relay = 0; -+ global_force_dtmf_relay_pt = 101; -+ - /* Copy the default jb config over global_jbconf */ - memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); - -@@ -16901,6 +16917,18 @@ - } - } else if (!strcasecmp(v->name, "vmexten")) { - ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); -+ } else if (!strcasecmp(v->name, "rtp_force_dtmf_relay")) { -+ if ((global_force_dtmf_relay = ast_true(v->value))) -+ ast_verbose("RTP DTMF relaying will be enforced\n"); -+ else -+ ast_verbose("RTP DTMF relaying will not be enforced\n"); -+ } else if (!strcasecmp(v->name, "rtp_force_dtmf_relay_pt")) { -+ sscanf(v->value, "%d", &global_force_dtmf_relay_pt); -+ if (global_force_dtmf_relay_pt < 96 || global_force_dtmf_relay_pt > 255) { -+ ast_verbose("RTP forced DTMF relay payload type is not valid: %d. Using default (101)\n", global_force_dtmf_relay_pt); -+ global_force_dtmf_relay_pt = 101; -+ } else -+ ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); - } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { - ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); ---- configs/sip.conf.sample.orig 2008-03-12 17:57:19.000000000 +0200 -+++ configs/sip.conf.sample 2008-03-12 18:13:03.000000000 +0200 -@@ -53,6 +53,12 @@ - ; and multiline formatted headers for strict - ; SIP compatibility (defaults to "no") - -+;rtp_force_dtmf_relay=no ; Enable RFC2833 DTMFs to be sent even if peer -+ ; hasn't announced support for it. Default: no -+ -+;rtp_force_dtmf_relay_pt=101 ; RTP payload type value for enforced RFC2833 -+ ; DTMFs. Default: 101 -+ - ; See doc/README.tos for a description of these parameters. - ;tos_sip=cs3 ; Sets TOS for SIP packets. - ;tos_audio=ef ; Sets TOS for RTP audio packets. diff --git a/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff b/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff deleted file mode 100644 index 776422b34645..000000000000 --- a/net/asterisk14/files/rtp_force_dtmf-nocodecnego.diff +++ /dev/null @@ -1,70 +0,0 @@ ---- channels/chan_sip.c.orig 2008-01-31 21:52:49.000000000 +0200 -+++ channels/chan_sip.c 2008-03-14 17:50:57.000000000 +0200 -@@ -556,6 +556,9 @@ - static unsigned int global_tos_sip; /*!< IP type of service for SIP packets */ - static unsigned int global_tos_audio; /*!< IP type of service for audio RTP packets */ - static unsigned int global_tos_video; /*!< IP type of service for video RTP packets */ -+static int global_force_dtmf_relay = 0; -+static int global_force_dtmf_relay_pt = 101; -+ - static int compactheaders; /*!< send compact sip headers */ - static int recordhistory; /*!< Record SIP history. Off by default */ - static int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */ -@@ -5392,6 +5395,13 @@ - - /* Now gather all of the codecs that we are asked for: */ - ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability); -+ /* Add telephone-event */ -+ if (global_force_dtmf_relay && !(peernoncodeccapability & AST_RTP_DTMF)) { -+ ast_rtp_set_m_type(newaudiortp, global_force_dtmf_relay_pt); -+ found_rtpmap_codecs[last_rtpmap_codec++] = global_force_dtmf_relay_pt; -+ ast_rtp_set_rtpmap_type(newaudiortp, global_force_dtmf_relay_pt, "audio", "telephone-event", 0); -+ peernoncodeccapability |= AST_RTP_DTMF; -+ } - ast_rtp_get_current_formats(newvideortp, &vpeercapability, &vpeernoncodeccapability); - - newjointcapability = p->capability & (peercapability | vpeercapability); -@@ -16833,6 +16843,9 @@ - - global_matchexterniplocally = FALSE; - -+ global_force_dtmf_relay = 0; -+ global_force_dtmf_relay_pt = 101; -+ - /* Copy the default jb config over global_jbconf */ - memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); - -@@ -16889,6 +16902,18 @@ - } - } else if (!strcasecmp(v->name, "vmexten")) { - ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten)); -+ } else if (!strcasecmp(v->name, "rtp_force_dtmf_relay")) { -+ if ((global_force_dtmf_relay = ast_true(v->value))) -+ ast_verbose("RTP DTMF relaying will be enforced\n"); -+ else -+ ast_verbose("RTP DTMF relaying will not be enforced\n"); -+ } else if (!strcasecmp(v->name, "rtp_force_dtmf_relay_pt")) { -+ sscanf(v->value, "%d", &global_force_dtmf_relay_pt); -+ if (global_force_dtmf_relay_pt < 96 || global_force_dtmf_relay_pt > 255) { -+ ast_verbose("RTP forced DTMF relay payload type is not valid: %d. Using default (101)\n", global_force_dtmf_relay_pt); -+ global_force_dtmf_relay_pt = 101; -+ } else -+ ast_log(LOG_WARNING, "RTP forced DTMF relay payload type is %d\n", global_force_dtmf_relay_pt); - } else if (!strcasecmp(v->name, "rtptimeout")) { - if ((sscanf(v->value, "%d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) { - ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d. Using default.\n", v->value, v->lineno); ---- configs/sip.conf.sample.orig 2008-03-12 17:57:19.000000000 +0200 -+++ configs/sip.conf.sample 2008-03-12 18:13:03.000000000 +0200 -@@ -53,6 +53,12 @@ - ; and multiline formatted headers for strict - ; SIP compatibility (defaults to "no") - -+;rtp_force_dtmf_relay=no ; Enable RFC2833 DTMFs to be sent even if peer -+ ; hasn't announced support for it. Default: no -+ -+;rtp_force_dtmf_relay_pt=101 ; RTP payload type value for enforced RFC2833 -+ ; DTMFs. Default: 101 -+ - ; See doc/README.tos for a description of these parameters. - ;tos_sip=cs3 ; Sets TOS for SIP packets. - ;tos_audio=ef ; Sets TOS for RTP audio packets. diff --git a/net/asterisk14/files/sip_force_callid.diff b/net/asterisk14/files/sip_force_callid.diff deleted file mode 100644 index 67a3e0192633..000000000000 --- a/net/asterisk14/files/sip_force_callid.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- channels/chan_sip.c.orig 2008-04-09 11:39:09.000000000 +0300 -+++ channels/chan_sip.c 2008-04-09 11:40:28.000000000 +0300 -@@ -2998,6 +2998,9 @@ - p->t38.state = T38_LOCAL_DIRECT; - if (option_debug) - ast_log(LOG_DEBUG,"T38State change to %d on channel %s\n", p->t38.state, ast->name); -+ } else if (!strcasecmp(ast_var_name(current), "SIP_FORCE_CALLID")) { -+ -+ ast_string_field_set(p, callid, ast_var_value(current)); - } - - } |