diff options
author | Max Khon <fjoe@FreeBSD.org> | 2010-11-29 04:29:46 +0000 |
---|---|---|
committer | Max Khon <fjoe@FreeBSD.org> | 2010-11-29 04:29:46 +0000 |
commit | 8a74b966cdda9f5004ec0e730a4e3dcf501f5c7a (patch) | |
tree | 5156281971f56fca23f20b8a274e3ed4abae86c8 /net/asterisk10 | |
parent | 4add52e8828ace579d2f5f45c842667a69496475 (diff) | |
download | ports-8a74b966cdda9f5004ec0e730a4e3dcf501f5c7a.tar.gz ports-8a74b966cdda9f5004ec0e730a4e3dcf501f5c7a.zip |
Notes
Diffstat (limited to 'net/asterisk10')
-rw-r--r-- | net/asterisk10/files/codecnego-patch-Makefile | 219 | ||||
-rw-r--r-- | net/asterisk10/files/dtmf_debug.diff | 226 | ||||
-rw-r--r-- | net/asterisk10/files/nocodecnego-patch-Makefile | 228 | ||||
-rw-r--r-- | net/asterisk10/files/patch-Makefile.rules | 16 | ||||
-rw-r--r-- | net/asterisk10/files/patch-channels::chan_sip.c | 11 | ||||
-rw-r--r-- | net/asterisk10/files/patch-include::asterisk::utils.h | 13 | ||||
-rw-r--r-- | net/asterisk10/files/patch-main::frame.c | 14 | ||||
-rw-r--r-- | net/asterisk10/files/patch-rtp_timeout | 25 | ||||
-rw-r--r-- | net/asterisk10/files/patch-suppress_log_dups.diff | 270 | ||||
-rw-r--r-- | net/asterisk10/files/rtp_force_dtmf-codecnego.diff | 86 | ||||
-rw-r--r-- | net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff | 69 | ||||
-rw-r--r-- | net/asterisk10/files/sip_force_callid.diff | 11 | ||||
-rw-r--r-- | net/asterisk10/files/sip_set_auth.diff | 45 |
13 files changed, 0 insertions, 1233 deletions
diff --git a/net/asterisk10/files/codecnego-patch-Makefile b/net/asterisk10/files/codecnego-patch-Makefile deleted file mode 100644 index e39dd6f62082..000000000000 --- a/net/asterisk10/files/codecnego-patch-Makefile +++ /dev/null @@ -1,219 +0,0 @@ ---- Makefile.orig 2009-11-20 17:48:05.000000000 +0200 -+++ Makefile 2009-11-20 17:50:33.000000000 +0200 -@@ -101,7 +101,7 @@ - OVERWRITE=y - - # Include debug and macro symbols in the executables (-g) and profiling info (-pg) --DEBUG=-g3 -+#DEBUG=-g3 - - # Staging directory - # Files are copied here temporarily during the install process -@@ -135,7 +135,7 @@ - ASTMANDIR=$(mandir) - ifneq ($(findstring BSD,$(OSARCH)),) - ASTVARLIBDIR=$(prefix)/share/asterisk -- ASTVARRUNDIR=$(localstatedir)/run/asterisk -+ ASTVARRUNDIR=$(localstatedir)/run - else - ASTVARLIBDIR=$(localstatedir)/lib/asterisk - endif -@@ -225,9 +225,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 -@@ -235,7 +237,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 -@@ -416,15 +418,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: -@@ -445,47 +447,47 @@ - OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) - - installdirs: -- 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 -+ $(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 - - bininstall: _all installdirs $(SUBDIRS_INSTALL) -- $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ -+ $(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;\ -+ cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/scripts/safe_asterisk.out;\ -+ ${BSD_INSTALL_SCRIPT} contrib/scripts/safe_asterisk.out $(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_MAN) doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_MAN) contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_MAN) contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_MAN) 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): -@@ -521,7 +523,7 @@ - @exit 1 - endif - --install: badshell datafiles bininstall -+install: badshell datafiles bininstall samples - @if [ -x /usr/sbin/asterisk-post-install ]; then \ - /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ - fi -@@ -559,31 +561,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)" ; \ -@@ -670,20 +664,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 " + +" diff --git a/net/asterisk10/files/dtmf_debug.diff b/net/asterisk10/files/dtmf_debug.diff deleted file mode 100644 index 2a5b6bc9ea33..000000000000 --- a/net/asterisk10/files/dtmf_debug.diff +++ /dev/null @@ -1,226 +0,0 @@ ---- channels/chan_sip.c.orig 2009-05-12 21:18:44.000000000 +0300 -+++ channels/chan_sip.c 2009-05-26 12:50:22.000000000 +0300 -@@ -3891,6 +3891,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); - /* Re-invite RTP back to Asterisk. Needed if channel is masqueraded out of a native - RTP bridge (i.e., RTP not going through Asterisk): RTP bridge code might not be - able to do this if the masquerade happens before the bridge breaks (e.g., AMI -@@ -4168,6 +4169,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); -@@ -4195,6 +4197,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 -@@ -4621,8 +4625,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-04 20:05:28.000000000 +0200 -+++ include/asterisk/rtp.h 2009-05-26 12:50:22.000000000 +0300 -@@ -243,6 +243,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 2009-11-20 17:51:49.000000000 +0200 -+++ main/rtp.c 2009-11-20 17:53:11.000000000 +0200 -@@ -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 */ -@@ -170,6 +171,8 @@ - struct ast_rtp *bridged; /*!< Who we are Packet bridged to */ - int set_marker_bit:1; /*!< Whether to set the marker bit or not */ - unsigned int constantssrc:1; -+ char chan_name[100]; -+ char chan_id[100]; - }; - - /* Forward declarations */ -@@ -676,8 +679,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) { -@@ -691,12 +694,25 @@ - } - 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->dtmf_timeout = 0; - 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. - * -@@ -1101,6 +1117,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); -@@ -1108,10 +1128,6 @@ - /* Check what the payload value should be */ - rtpPT = ast_rtp_lookup_pt(rtp, payload); - -- /* 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); - -@@ -1306,11 +1322,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; -@@ -1319,9 +1336,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)) { -@@ -2287,8 +2307,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 */ -@@ -2331,8 +2352,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); - -@@ -3621,6 +3643,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) { -@@ -3681,6 +3713,7 @@ - if (argc != 3) - return RESULT_SHOWUSAGE; - rtpdebug = 0; -+ rtpdebugdtmf = 0; - ast_cli(fd,"RTP Debugging Disabled\n"); - return RESULT_SUCCESS; - } -@@ -3741,7 +3774,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[] = -@@ -3816,6 +3849,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/asterisk10/files/nocodecnego-patch-Makefile b/net/asterisk10/files/nocodecnego-patch-Makefile deleted file mode 100644 index c5df459f1b2c..000000000000 --- a/net/asterisk10/files/nocodecnego-patch-Makefile +++ /dev/null @@ -1,228 +0,0 @@ ---- Makefile.orig 2009-10-23 17:00:01.000000000 +0300 -+++ Makefile 2009-11-23 16:44:36.000000000 +0200 -@@ -101,7 +101,7 @@ - OVERWRITE=y - - # Include debug and macro symbols in the executables (-g) and profiling info (-pg) --DEBUG=-g3 -+#DEBUG=-g3 - - # Staging directory - # Files are copied here temporarily during the install process -@@ -135,7 +135,7 @@ - ASTMANDIR=$(mandir) - ifneq ($(findstring BSD,$(OSARCH)),) - ASTVARLIBDIR=$(prefix)/share/asterisk -- ASTVARRUNDIR=$(localstatedir)/run/asterisk -+ ASTVARRUNDIR=$(localstatedir)/run - else - ASTVARLIBDIR=$(localstatedir)/lib/asterisk - endif -@@ -225,9 +225,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 -@@ -235,7 +237,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 -@@ -410,21 +412,21 @@ - rm -f build_tools/menuselect-deps - - datafiles: _all -- if [ `$(ID) -u` = 0 ]; then \ -- CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ -- fi -+ #if [ `$(ID) -u` = 0 ]; then \ -+ # CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; \ -+ #fi - # 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: -@@ -445,47 +447,47 @@ - OLDHEADERS=$(filter-out $(NEWHEADERS),$(notdir $(wildcard $(DESTDIR)$(ASTHEADERDIR)/*.h))) - - installdirs: -- 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 -+ $(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 - - bininstall: _all installdirs $(SUBDIRS_INSTALL) -- $(INSTALL) -m 755 main/asterisk $(DESTDIR)$(ASTSBINDIR)/ -+ $(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;\ -+ cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > contrib/scripts/safe_asterisk.out;\ -+ ${BSD_INSTALL_SCRIPT} contrib/scripts/safe_asterisk.out $(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_MAN) doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_MAN) contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_MAN) contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8 -+ $(BSD_INSTALL_MAN) 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): -@@ -521,7 +523,7 @@ - @exit 1 - endif - --install: badshell datafiles bininstall -+install: badshell datafiles bininstall samples - @if [ -x /usr/sbin/asterisk-post-install ]; then \ - /usr/sbin/asterisk-post-install $(DESTDIR) . ; \ - fi -@@ -559,31 +561,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)" ; \ -@@ -629,20 +623,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 " + +" diff --git a/net/asterisk10/files/patch-Makefile.rules b/net/asterisk10/files/patch-Makefile.rules deleted file mode 100644 index f90430ec9ddd..000000000000 --- a/net/asterisk10/files/patch-Makefile.rules +++ /dev/null @@ -1,16 +0,0 @@ ---- Makefile.rules.orig 2009-09-28 22:09:25.000000000 +0300 -+++ Makefile.rules 2009-11-23 16:15:23.000000000 +0200 -@@ -37,11 +37,13 @@ - - OPTIMIZE?=-O6 - -+ifneq ($(OSARCH),FreeBSD) - ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) - _ASTCFLAGS+=$(OPTIMIZE) - else - _ASTCFLAGS+=-O0 - endif -+endif - - # shortcuts for common combinations of flags; these must be recursively expanded so that - # per-target settings will be applied diff --git a/net/asterisk10/files/patch-channels::chan_sip.c b/net/asterisk10/files/patch-channels::chan_sip.c deleted file mode 100644 index 9bb8267ffcc5..000000000000 --- a/net/asterisk10/files/patch-channels::chan_sip.c +++ /dev/null @@ -1,11 +0,0 @@ ---- channels/chan_sip.c.orig 2008-06-10 00:46:46.000000000 -0700 -+++ channels/chan_sip.c 2008-06-10 00:46:46.000000000 -0700 -@@ -496,7 +496,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 diff --git a/net/asterisk10/files/patch-include::asterisk::utils.h b/net/asterisk10/files/patch-include::asterisk::utils.h deleted file mode 100644 index a06f7d065c84..000000000000 --- a/net/asterisk10/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/asterisk10/files/patch-main::frame.c b/net/asterisk10/files/patch-main::frame.c deleted file mode 100644 index 232de08a9e21..000000000000 --- a/net/asterisk10/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/asterisk10/files/patch-rtp_timeout b/net/asterisk10/files/patch-rtp_timeout deleted file mode 100644 index 6f60c74cff41..000000000000 --- a/net/asterisk10/files/patch-rtp_timeout +++ /dev/null @@ -1,25 +0,0 @@ ---- channels/chan_sip.c.orig 2009-04-14 08:58:13.000000000 +0100 -+++ channels/chan_sip.c 2009-04-14 09:00:58.000000000 +0100 -@@ -16287,7 +16287,6 @@ - restartsearch: - /* Check for interfaces needing to be killed */ - ast_mutex_lock(&iflock); -- t = time(NULL); - /* don't scan the interface list if it hasn't been a reasonable period - of time since the last time we did it (when MWI is being sent, we can - get back to this point every millisecond or less) -@@ -16306,12 +16305,14 @@ - (sip->owner->_state == AST_STATE_UP) && - !sip->redirip.sin_addr.s_addr && - sip->t38.state != T38_ENABLED) { -+ t = time(NULL); - if (sip->lastrtptx && - ast_rtp_get_rtpkeepalive(sip->rtp) && - (t > sip->lastrtptx + ast_rtp_get_rtpkeepalive(sip->rtp))) { - /* Need to send an empty RTP packet */ - sip->lastrtptx = time(NULL); - ast_rtp_sendcng(sip->rtp, 0); -+ t = time(NULL); - } - if (sip->lastrtprx && - (ast_rtp_get_rtptimeout(sip->rtp) || ast_rtp_get_rtpholdtimeout(sip->rtp)) && diff --git a/net/asterisk10/files/patch-suppress_log_dups.diff b/net/asterisk10/files/patch-suppress_log_dups.diff deleted file mode 100644 index 115b69f21ca1..000000000000 --- a/net/asterisk10/files/patch-suppress_log_dups.diff +++ /dev/null @@ -1,270 +0,0 @@ -Index: main/logger.c -=================================================================== ---- main/logger.c (revision 188505) -+++ main/logger.c (working copy) -@@ -140,6 +140,17 @@ - AST_THREADSTORAGE(log_buf, log_buf_init); - #define LOG_BUF_INIT_SIZE 128 - -+/* -+ * Storage for previous log message to prevent log storms -+ */ -+static int stored_log_level; -+static int stored_log_dup_count = 0; -+static char *stored_log_msg = NULL; -+static const char *stored_log_file; -+static int stored_log_line; -+static const char *stored_log_function; -+static ast_mutex_t stored_log_msg_lock; -+ - static int make_components(char *s, int lineno) - { - char *w; -@@ -591,6 +602,8 @@ - char tmp[256]; - int res = 0; - -+ ast_mutex_init(&stored_log_msg_lock); -+ - /* auto rotate if sig SIGXFSZ comes a-knockin */ - (void) signal(SIGXFSZ,(void *) handle_SIGXFSZ); - -@@ -655,14 +668,14 @@ - return; - } - --static void __attribute__((format(printf, 5, 0))) ast_log_vsyslog(int level, const char *file, int line, const char *function, const char *fmt, va_list args) -+static void ast_log_syslog(int level, const char *file, int line, const char *function, const char *msg) - { - char buf[BUFSIZ]; - char *s; - - if (level >= SYSLOG_NLEVELS) { - /* we are locked here, so cannot ast_log() */ -- fprintf(stderr, "ast_log_vsyslog called with bogus level: %d\n", level); -+ fprintf(stderr, "ast_log_syslog called with bogus level: %d\n", level); - return; - } - if (level == __LOG_VERBOSE) { -@@ -676,27 +689,20 @@ - levels[level], (long)GETTID(), file, line, function); - } - s = buf + strlen(buf); -- vsnprintf(s, sizeof(buf) - strlen(buf), fmt, args); -+ snprintf(s, sizeof(buf) - strlen(buf), "%s", msg); - term_strip(s, s, strlen(s) + 1); - syslog(syslog_level_map[level], "%s", buf); - } - --/*! -- * \brief send log messages to syslog and/or the console -- */ --void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) -+static void __ast_log(int level, const char *file, int line, const char *function, char *msg, int msglen) - { - struct logchannel *chan; -- struct ast_dynamic_str *buf; - time_t t; - struct tm tm; - char date[256]; -+ char buf[2048]; -+ int res; - -- va_list ap; -- -- if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) -- return; -- - if (AST_LIST_EMPTY(&logchannels)) - { - /* -@@ -704,35 +710,12 @@ - * so just log to stdout - */ - if (level != __LOG_VERBOSE) { -- int res; -- va_start(ap, fmt); -- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); -- va_end(ap); -- if (res != AST_DYNSTR_BUILD_FAILED) { -- term_filter_escapes(buf->str); -- fputs(buf->str, stdout); -- } -+ term_filter_escapes(msg); -+ fputs(msg, stdout); - } - return; - } - -- /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug -- are non-zero; LOG_DEBUG messages can still be displayed if option_debug -- is zero, if option_verbose is non-zero (this allows for 'level zero' -- LOG_DEBUG messages to be displayed, if the logmask on any channel -- allows it) -- */ -- if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) -- return; -- -- /* Ignore anything that never gets logged anywhere */ -- if (!(global_logmask & (1 << level))) -- return; -- -- /* Ignore anything other than the currently debugged file if there is one */ -- if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) -- return; -- - time(&t); - ast_localtime(&t, &tm, NULL); - strftime(date, sizeof(date), dateformat, &tm); -@@ -740,13 +723,8 @@ - AST_LIST_LOCK(&logchannels); - - if (logfiles.event_log && level == __LOG_EVENT) { -- va_start(ap, fmt); -- -- fprintf(eventlog, "%s asterisk[%ld]: ", date, (long)getpid()); -- vfprintf(eventlog, fmt, ap); -+ fprintf(eventlog, "%s asterisk[%ld]: %s", date, (long)getpid(), msg); - fflush(eventlog); -- -- va_end(ap); - AST_LIST_UNLOCK(&logchannels); - return; - } -@@ -756,18 +734,15 @@ - break; - /* Check syslog channels */ - if (chan->type == LOGTYPE_SYSLOG && (chan->logmask & (1 << level))) { -- va_start(ap, fmt); -- ast_log_vsyslog(level, file, line, function, fmt, ap); -- va_end(ap); -+ ast_log_syslog(level, file, line, function, msg); - /* Console channels */ - } else if ((chan->logmask & (1 << level)) && (chan->type == LOGTYPE_CONSOLE)) { - char linestr[128]; - char tmp1[80], tmp2[80], tmp3[80], tmp4[80]; - - if (level != __LOG_VERBOSE) { -- int res; - sprintf(linestr, "%d", line); -- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, -+ snprintf(buf, sizeof(buf), - "[%s] %s[%ld]: %s:%s %s: ", - date, - term_color(tmp1, levels[level], colors[level], 0, sizeof(tmp1)), -@@ -776,23 +751,17 @@ - term_color(tmp3, linestr, COLOR_BRWHITE, 0, sizeof(tmp3)), - term_color(tmp4, function, COLOR_BRWHITE, 0, sizeof(tmp4))); - /*filter to the console!*/ -- term_filter_escapes(buf->str); -- ast_console_puts_mutable(buf->str); -- -- va_start(ap, fmt); -- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); -- va_end(ap); -- if (res != AST_DYNSTR_BUILD_FAILED) -- ast_console_puts_mutable(buf->str); -+ term_filter_escapes(buf); -+ ast_console_puts_mutable(buf); -+ ast_console_puts_mutable(msg); - } - /* File channels */ - } else if ((chan->logmask & (1 << level)) && (chan->fileptr)) { -- int res; -- ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf, -+ snprintf(buf, sizeof(buf), - "[%s] %s[%ld] %s: ", - date, levels[level], (long)GETTID(), file); -- res = fprintf(chan->fileptr, "%s", buf->str); -- if (res <= 0 && !ast_strlen_zero(buf->str)) { /* Error, no characters printed */ -+ res = fprintf(chan->fileptr, "%s", buf); -+ if (res <= 0 && !ast_strlen_zero(buf)) { /* Error, no characters printed */ - fprintf(stderr,"**** Asterisk Logging Error: ***********\n"); - if (errno == ENOMEM || errno == ENOSPC) { - fprintf(stderr, "Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->filename); -@@ -801,16 +770,10 @@ - manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno)); - chan->disabled = 1; - } else { -- int res; - /* No error message, continue printing */ -- va_start(ap, fmt); -- res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); -- va_end(ap); -- if (res != AST_DYNSTR_BUILD_FAILED) { -- term_strip(buf->str, buf->str, buf->len); -- fputs(buf->str, chan->fileptr); -- fflush(chan->fileptr); -- } -+ term_strip(msg, msg, msglen); -+ fputs(msg, chan->fileptr); -+ fflush(chan->fileptr); - } - } - } -@@ -825,6 +788,65 @@ - } - } - -+/*! -+ * \brief send log messages to syslog and/or the console -+ */ -+void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) -+{ -+ struct ast_dynamic_str *buf; -+ int res; -+ va_list ap; -+ -+ if (!(buf = ast_dynamic_str_thread_get(&log_buf, LOG_BUF_INIT_SIZE))) -+ return; -+ -+ va_start(ap, fmt); -+ res = ast_dynamic_str_thread_set_va(&buf, BUFSIZ, &log_buf, fmt, ap); -+ va_end(ap); -+ if (res == AST_DYNSTR_BUILD_FAILED) -+ return; -+ -+ /* don't display LOG_DEBUG messages unless option_verbose _or_ option_debug -+ are non-zero; LOG_DEBUG messages can still be displayed if option_debug -+ is zero, if option_verbose is non-zero (this allows for 'level zero' -+ LOG_DEBUG messages to be displayed, if the logmask on any channel -+ allows it) -+ */ -+ if (!option_verbose && !option_debug && (level == __LOG_DEBUG)) -+ return; -+ -+ /* Ignore anything that never gets logged anywhere */ -+ if (!(global_logmask & (1 << level))) -+ return; -+ -+ /* Ignore anything other than the currently debugged file if there is one */ -+ if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file)) -+ return; -+ -+ ast_mutex_lock(&stored_log_msg_lock); -+ if (stored_log_msg == NULL || stored_log_level != level || strcmp(buf->str, stored_log_msg) != 0) { -+ if (stored_log_dup_count > 0) { -+ char buf2[1024]; -+ -+ snprintf(buf2, sizeof(buf2), "Last message repeated %d times\n", stored_log_dup_count); -+ __ast_log(stored_log_level, stored_log_file, stored_log_line, stored_log_function, buf2, strlen(buf2)); -+ } -+ if (stored_log_msg != NULL) -+ ast_free(stored_log_msg); -+ stored_log_msg = ast_strdup(buf->str); -+ stored_log_level = level; -+ stored_log_dup_count = 0; -+ stored_log_file = file; -+ stored_log_line = line; -+ stored_log_function = function; -+ __ast_log(level, file, line, function, buf->str, buf->len); -+ } -+ else -+ ++stored_log_dup_count; -+ -+ ast_mutex_unlock(&stored_log_msg_lock); -+} -+ - void ast_backtrace(void) - { - #ifdef linux diff --git a/net/asterisk10/files/rtp_force_dtmf-codecnego.diff b/net/asterisk10/files/rtp_force_dtmf-codecnego.diff deleted file mode 100644 index a670364ba603..000000000000 --- a/net/asterisk10/files/rtp_force_dtmf-codecnego.diff +++ /dev/null @@ -1,86 +0,0 @@ ---- channels/chan_sip.c.orig 2009-11-20 17:56:30.000000000 +0200 -+++ channels/chan_sip.c 2009-11-20 17:59:43.000000000 +0200 -@@ -565,6 +565,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 */ -@@ -5329,6 +5332,7 @@ - int x; - int codec_index = 0; - int codec_pt_order[256]; -+ int dtmf_present = 0; - - /* Host information */ - struct ast_hostent audiohp; -@@ -5600,12 +5604,21 @@ - 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); -@@ -18369,6 +18382,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)); - -@@ -18431,6 +18447,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, "%30d", &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-04-25 08:53:52.000000000 -0700 -+++ configs/sip.conf.sample 2008-06-10 00:45:37.000000000 -0700 -@@ -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/ip-tos.txt 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/asterisk10/files/rtp_force_dtmf-nocodecnego.diff b/net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff deleted file mode 100644 index 9dcb7d8b134f..000000000000 --- a/net/asterisk10/files/rtp_force_dtmf-nocodecnego.diff +++ /dev/null @@ -1,69 +0,0 @@ ---- channels/chan_sip.c.orig 2009-11-23 17:28:47.000000000 +0200 -+++ channels/chan_sip.c 2009-11-23 17:29:29.000000000 +0200 -@@ -565,6 +565,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 */ -@@ -5593,6 +5596,12 @@ - - /* 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); -+ 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); -@@ -18366,6 +18375,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)); - -@@ -18428,6 +18440,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, "%30d", &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-08-16 01:33:42.000000000 +0300 -+++ configs/sip.conf.sample 2008-12-12 17:03:11.000000000 +0200 -@@ -49,6 +49,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/ip-tos.txt 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/asterisk10/files/sip_force_callid.diff b/net/asterisk10/files/sip_force_callid.diff deleted file mode 100644 index 09cf274581d1..000000000000 --- a/net/asterisk10/files/sip_force_callid.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- channels/chan_sip.c.orig 2009-05-12 21:18:44.000000000 +0300 -+++ channels/chan_sip.c 2009-05-26 12:58:10.000000000 +0300 -@@ -3061,6 +3061,8 @@ - } else if (!strcasecmp(ast_var_name(current), "SIPTRANSFER_REPLACES")) { - /* We're replacing a call. */ - p->options->replaces = ast_var_value(current); -+ } else if (!strcasecmp(ast_var_name(current), "SIP_FORCE_CALLID")) { -+ ast_string_field_set(p, callid, ast_var_value(current)); - } - } - diff --git a/net/asterisk10/files/sip_set_auth.diff b/net/asterisk10/files/sip_set_auth.diff deleted file mode 100644 index 1addc4f48add..000000000000 --- a/net/asterisk10/files/sip_set_auth.diff +++ /dev/null @@ -1,45 +0,0 @@ ---- channels/chan_sip.c.orig 2008-04-29 08:21:05.000000000 -0400 -+++ channels/chan_sip.c 2008-05-28 18:41:48.000000000 -0400 -@@ -15962,6 +15978,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); -@@ -15983,6 +16002,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) -@@ -16015,6 +16045,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 |