aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlmadsen <lmadsen@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-11 18:47:41 +0000
committerlmadsen <lmadsen@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-11 18:47:41 +0000
commit629e346ded280c47c87c53324d579c71776d45e1 (patch)
tree71c284f8531f2a84e7cb1b606b8448bae26034fd
parent6aec5f97f99b8da604a9c0c62cac1e0ed57e6fe7 (diff)
parent92eb620544cf824b432b625a165eeceb3a76370e (diff)
Create 1.4.30 from 1.4.30-rc3
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.4.30@251863 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--.version2
-rw-r--r--ChangeLog333
-rw-r--r--LICENSE11
-rw-r--r--Makefile3
-rw-r--r--README-SERIOUSLY.bestpractices.txt295
-rw-r--r--apps/app_echo.c3
-rw-r--r--apps/app_meetme.c4
-rw-r--r--apps/app_queue.c22
-rw-r--r--apps/app_voicemail.c12
-rw-r--r--asterisk-1.4.30-rc3-summary.html411
-rw-r--r--asterisk-1.4.30-rc3-summary.txt541
-rw-r--r--channels/chan_dahdi.c27
-rw-r--r--channels/chan_iax2.c18
-rw-r--r--channels/chan_local.c31
-rw-r--r--channels/chan_misdn.c32
-rw-r--r--channels/chan_sip.c62
-rw-r--r--configs/cdr.conf.sample6
-rw-r--r--configs/extensions.conf.sample4
-rw-r--r--doc/configuration.txt34
-rw-r--r--doc/imapstorage.txt6
-rw-r--r--doc/localchannel.txt437
-rw-r--r--main/ast_expr2.fl2
-rw-r--r--main/ast_expr2f.c2
-rw-r--r--main/asterisk.c16
-rw-r--r--main/channel.c34
-rw-r--r--main/loader.c47
-rw-r--r--main/logger.c2
-rw-r--r--main/rtp.c4
-rw-r--r--res/res_features.c4
-rw-r--r--res/res_monitor.c22
-rw-r--r--res/res_smdi.c6
-rw-r--r--sounds/Makefile4
32 files changed, 2228 insertions, 209 deletions
diff --git a/.version b/.version
index 5b3274b4a..0d9c5ec8a 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-1.4.30
+1.4.30-rc3
diff --git a/ChangeLog b/ChangeLog
index ce4b16300..bdacdc352 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,335 @@
-2010-02-04 Leif Madsen
+2010-03-04 Leif Madsen <lmadsen@digium.com>
+
+ * Asterisk 1.4.30-rc3 released
+
+2010-03-03 21:28 +0000 [r250613] Leif Madsen <lmadsen@digium.com>
+
+ * doc/localchannel.txt: Update existing Local channel
+ documentation. A complete re-write of the Local channel
+ documentation has been performed, with the existing information
+ from localchannel.txt and localchannel.tex merged in. (issue
+ #16637) Reported by: kobaz Patches: localchannel.tex uploaded by
+ lmadsen (license 10) localchannel.txt uploaded by lmadsen
+ (license 10) Tested by: lmadsen, jsmith, mmichelson
+
+2010-03-03 19:04 +0000 [r250480] Jeff Peeler <jpeeler@digium.com>
+
+ * channels/chan_dahdi.c: Make sure to clear red alarm after
+ polarity reversal. From the issue: The automatic overnight line
+ tests (or manual ones) used on UK (BT) lines causes a red alarm
+ on a dahdi / TDM400P connected channel. This is because the line
+ uses voltage tests (battery loss) and polarity reversal. The
+ polarity reversal causes chan_dahdi to initiate v23 CallerID
+ processing but during this the event DAHDI_EVENT_NOALARM is
+ ignored so that the alarm is never cleared. (closes issue #14163)
+ Reported by: jedi98 Patches: chan_dahdi-1.4-inalarm.diff uploaded
+ by jedi98 (license 653) Tested by: mattbrown, Chainsaw,
+ mikeeccleston
+
+2010-03-03 18:02 +0000 [r250394] David Vossel <dvossel@digium.com>
+
+ * channels/chan_iax2.c: fixes problem with duplicate TXREQ packets
+ When Asterisk receives an IAX2 TXREQ packet, try_transfer() will
+ call store_by_transfercallno() to link the chan_iax2_pvt struct
+ into iax_transfercallno_pvts. If a duplicate TXREQ packet is
+ received for the same call, the pvt struct will be linked into
+ iax_transfercallno_pvts multiple times. This patch fixes this.
+ Thanks rain for debugging this and providing a patch! (closes
+ issue #16904) Reported by: rain Patches:
+ iax2-double-txreq-fix.diff uploaded by rain (license 327) Tested
+ by: rain, dvossel
+
+2010-03-02 21:08 +0000 [r250041-250050] Leif Madsen <lmadsen@digium.com>
+
+ * doc/imapstorage.txt: Update IMAP documentation. Update the IMAP
+ documentation to make it clear that storing voicemails in the
+ same folder as a large number of emails could potentially cause
+ significant slow downs when writing or retrieving voicemails.
+ (closes issue #16704) Reported by: TimeHider Tested by: lmadsen,
+ TimeHider
+
+ * configs/cdr.conf.sample: Update documentation to clarify purpose
+ of unanswered option. (closes issue #16267) Reported by: elsto
+ Patches: cdr.conf.sample.patch.txt uploaded by lmadsen (license
+ 10) Tested by: davidw, elsto
+
+ * doc/configuration.txt: Update documentation to not imply we
+ support overriding options. (issue #16855) Reported by: davidw
+
+2010-03-02 19:36 +0000 [r249845-249946] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * apps/app_echo.c: revert ability to exit echo app caused a
+ regression, as only supported VOICE, not VIDEO etc. Left in small
+ formatting change. (issue #16880)
+
+ * apps/app_echo.c: fixes ability to exit echo app when called from
+ a ISDN channel, null frames prevent '#' exit. Now only echo back
+ VOICE and DTMF frames (issue #16880) Reported by: alecdavis
+ Patches: based on echo_exit_1-6-1.diff.txt uploaded by alecdavis
+ (license 585) Tested by: alecdavis
+
+2010-03-01 19:35 +0000 [r249671] Sean Bright <sean@malleable.com>
+
+ * apps/app_voicemail.c: Fix crash in app_voicemail related to
+ message counting. We were passing a 'struct inprocess **' and
+ treating it like a 'struct inprocess *' causing a segfault.
+ (closes issue #16921) Reported by: whardier Patches:
+ 20100301_issue16921.patch uploaded by seanbright (license 71)
+ Tested by: whardier
+
+2010-03-01 17:02 +0000 [r249536] Jeff Peeler <jpeeler@digium.com>
+
+ * channels/chan_local.c: Modify queued frames from local channels
+ to not set the other side to up In this case, attended transfers
+ were broken due to ast_feature_request_and_dial detecting the
+ channel being set to up before the answer frame could be read and
+ therefore failing to mark the channel as ready. This fix is a
+ regression fix for 244785, which should continue to work properly
+ as well. (closes issue #16816) Reported by: jamhed Tested by:
+ jamhed, corruptor
+
+2010-02-27 23:51 +0000 [r249365] Alec L Davis <sivad.a@paradise.net.nz>
+
+ * channels/chan_dahdi.c: overlap receiving: automatically send CALL
+ PROCEEDING when dialplan starts Following Q.931 5.2.4 When the
+ user has determined that sufficient call information has been
+ received the user shall stop T302 and send CALL PROCEEDING to the
+ network. Previously timeouts were possible if the dialplan took a
+ long time to issue any response back to the network. Verified
+ that our local TELCO also does the same. (issue #16789) Reported
+ by: alecdavis Patches: based on overlap_receiving_trunk.diff.txt
+ uploaded by alecdavis (license 585) Tested by: alecdavis (closes
+ issue #16789)
+
+2010-02-27 14:07 +0000 [r249234] Kevin P. Fleming <kpfleming@digium.com>
+
+ * channels/chan_iax2.c: add a reference to the now-published IAX2
+ RFC
+
+2010-02-26 17:04 +0000 [r249100] Mark Michelson <mmichelson@digium.com>
+
+ * channels/chan_sip.c: For T.38 reINVITEs treat a 606 the same as a
+ 488. (closes issue #16792) Reported by: vrban Patches:
+ t38_606.patch uploaded by vrban (license 756)
+
+2010-02-25 21:22 +0000 [r248860] Jeff Peeler <jpeeler@digium.com>
+
+ * res/res_monitor.c: Ensure that monitor recordings are written to
+ the correct location (again) This is an extension to 248757. As
+ such the dialplan test has been extended: exten => 5040, 1,
+ monitor(wav,tmp/jeff/monitor_test,b) exten => 5040, n,
+ dial(sip/5001) exten => 5041, 1,
+ monitor(wav,/tmp/jeff/monitor_test2,b) exten => 5041, n,
+ dial(sip/5001) exten => 5042, 1, monitor(wav,monitor_test3,b)
+ exten => 5042, n, dial(sip/5001) exten => 5043, 1,
+ monitor(wav,tmp/jeff/monitor_test3,m) exten => 5043, n,
+ changemonitor(monitor_test4) exten => 5043, n, dial(sip/5001)
+ exten => 5044, 1, monitor(wav,monitor_test4,m) exten => 5044, n,
+ changemonitor(tmp/jeff/monitor_test5) ; this looks to fail by
+ design and emits a warning exten => 5044, n, dial(sip/5001)
+
+2010-02-25 21:21 +0000 [r248859] Tilghman Lesher <tlesher@digium.com>
+
+ * main/asterisk.c: Some platforms clear /var/run at boot, which
+ makes connecting a remote console... difficult. Previously, we
+ only created the default /var/run/asterisk directory at install
+ time. While we could create it in the init script, that would not
+ work for those who start asterisk manually from the command line.
+ So the safest thing to do is to create it as part of the Asterisk
+ boot process. This also changes the ownership of the directory,
+ because the pid and ctl files are created after we setuid/setgid.
+ (closes issue #16802) Reported by: Brian Patches:
+ 20100224__issue16802.diff.txt uploaded by tilghman (license 14)
+ Tested by: tzafrir
+
+2010-02-25 18:06 +0000 [r248668-248757] Jeff Peeler <jpeeler@digium.com>
+
+ * res/res_monitor.c: Ensure that monitor recordings are written to
+ the correct location. Recordings should be placed in the monitor
+ directory when a non-absolute path is used. Exact dialplan used
+ for testing: exten => 5040, 1,
+ monitor(wav,tmp/jeff/monitor_test,b) exten => 5040, n,
+ dial(sip/5001) exten => 5041, 1,
+ monitor(wav,/tmp/jeff/monitor_test2,b) exten => 5041, n,
+ dial(sip/5001) exten => 5042, 1, monitor(wav,monitor_test3,b)
+ exten => 5042, n, dial(sip/5001) ABE-2101
+
+ * apps/app_voicemail.c: Make deletion of temporary greetings work
+ properly with IMAP_STORAGE This same patch was merged in 220833,
+ but was skipped in this branch erroneously. (closes issue #16170)
+ Reported by: francesco_r
+
+2010-02-24 21:02 +0000 [r248582] Tilghman Lesher <tlesher@digium.com>
+
+ * main/logger.c: Remove color code sequences from verbose messages
+ that go to logfiles. (closes issue #16786) Reported by: dodo
+ Patches: logger2.patch uploaded by dodo (license 989) Tested by:
+ tilghman
+
+2010-02-23 16:26 +0000 [r248396] David Vossel <dvossel@digium.com>
+
+ * channels/chan_sip.c: fixes invite with replaces deadlock (closes
+ issue #16862) Reported by: pwalker Patches: replaces_deadlock_1.4
+ uploaded by dvossel (license 671) Tested by: pwalker, dvossel
+
+2010-02-22 13:52 +0000 [r248268] Olle Johansson <oej@edvina.net>
+
+ * apps/app_meetme.c: Don't log to debug unless debug is turned on
+
+2010-02-20 22:25 +0000 [r248106] Olle Johansson <oej@edvina.net>
+
+ * main/rtp.c: Make sure we support RTCP compound messages with zero
+ reports
+
+2010-02-19 19:11 +0000 [r248012] Tilghman Lesher <tlesher@digium.com>
+
+ * main/loader.c, /: Backport crash fix from trunk to 1.4, whereby
+ 'core show gracefully' could crash Asterisk. (closes issue
+ #16470) Reported by: kjotte
+
+2010-02-19 17:18 +0000 [r247910] Richard Mudgett <rmudgett@digium.com>
+
+ * channels/chan_misdn.c: Merged revision 247904 from
+ https://origsvn.digium.com/svn/asterisk/be/branches/C.2-...
+ .......... r247904 | rmudgett | 2010-02-19 10:49:44 -0600 (Fri,
+ 19 Feb 2010) | 49 lines Make chan_misdn DTMF processing
+ consistent with other channel technologies. The processing of
+ DTMF tones on the receiving side of an ISDN channel is
+ inconsistent with the way it is handled in other channels,
+ especially DAHDI analog. This causes DTMF tones sent from an ISDN
+ phone to be doubled at the connected party. We are using the
+ following 2 options of misdn.conf 1) astdtmf=yes 2) senddtmf=yes
+ Option one is necessary because the asterisk DSP DTMF detection
+ is better than mISDN's internal DSP. Not as many false positives.
+ Option two is necessary to transmit DTMF tones end to end when
+ mISDN channels are connected to SIP channels with out of band
+ DTMF for example. The symptom is that DTMF tones sent by an ISDN
+ phone are doubled on the way through asterisk when two mISDN
+ channels are connected with a Local channel in between or if it
+ is bridged to an analog channel. The doubling of DTMF tones is
+ because DTMF is passed inband to asterisk by the mISDN channel
+ and passed out of band once again after the release of the DTMF
+ tone. Passing it inband is wrong. Neither an analog channel nor
+ SIP channel passes DTMF inband if configured to inband DTMF.
+ Analog and SIP channels filter out the DTMF tones because they
+ use the voice frames returned by ast_dsp_process. But chan_misdn
+ passes the unfiltered input voice frames instead. To overcome one
+ aspect of the problem, the doubling of DTMF tones when two mISDN
+ channels are directly bridged, someone made an 'optimization',
+ where in that case the DTMF tone passed out-of-band to the peer
+ channel is not translated to an inband tone at the transmit side.
+ This optimization is bad because it does not work in general. For
+ example, analog channels or mISDN channels when bridged through
+ an intermediary local channel will generate DTMF tones from
+ out-of-band information. Also, of course, it must not be done
+ when there is no inband DTMF available. This patch fixes the
+ issue. Now chan_misdn will filter the received inband DTMF signal
+ the same as other channel types. Another change included: No need
+ to build an extra translation path because ast_process_dsp does
+ it if required. Patches: misdn-dtmf.patch JIRA ABE-2080
+
+2010-02-18 19:38 +0000 [r247651] Matthew Nicholson <mnicholson@digium.com>
+
+ * res/res_features.c: Copy the calling party's account code to the
+ called party if they don't already have one. (closes issue
+ #16331) Reported by: bluefox Tested by: mnicholson
+
+2010-02-18 16:53 +0000 [r247502-247508] Leif Madsen <lmadsen@digium.com>
+
+ * README-SERIOUSLY.bestpractices.txt: Add additional link to best
+ practices document per jsmith.
+
+ * README-SERIOUSLY.bestpractices.txt (added): Add best practices
+ documentation. (issue #16808) Reported by: lmadsen (issue #16810)
+ Reported by: Nick_Lewis Tested by: lmadsen Review:
+ https://reviewboard.asterisk.org/r/507/
+
+2010-02-18 04:19 +0000 [r247422] Russell Bryant <russell@digium.com>
+
+ * Makefile, sounds/Makefile: Tweak argument handling for wget in
+ the sounds Makefile. 1) Fix the check to see if we are using wget
+ to not be full of fail. The configure script populates this
+ variable with the absolute path to wget if it is found, so it
+ didn't work. 2) Allow some extra arguments to be passed in for
+ wget. This is just a simple change to allow our Bamboo build
+ script to tell wget to be quiet and not fill up our logs with
+ download status output.
+
+2010-02-17 16:24 +0000 [r247168] Mark Michelson <mmichelson@digium.com>
+
+ * apps/app_queue.c: Make sure that when autofill is disabled that
+ callers not in the front of the queue cannot place calls. (closes
+ issue #16834) Reported by: kebl0155 Patches:
+ app_queue_no_autofill.v1.patch uploaded by kebl0155 (license 356)
+
+2010-02-15 23:42 +0000 [r246709] Tilghman Lesher <tlesher@digium.com>
+
+ * Makefile: Make the menuselect instructions correct by allowing
+ 'make menuselect' to actually solve dependency problems.
+ (Previously, it would fail out again with the same message about
+ running 'make menuselect', which was NOT at all helpful.)
+
+2010-02-12 23:30 +0000 [r246545] David Vossel <dvossel@digium.com>
+
+ * main/channel.c: lock channel during datastore removal On channel
+ destruction the channel's datastores are removed and destroyed.
+ Since there are public API calls to find and remove datastores on
+ a channel, a lock should be held whenever datastores are removed
+ and destroyed. This resolves a crash caused by a race condition
+ in app_chanspy.c. (closes issue #16678) Reported by:
+ tim_ringenbach Patches: datastore_destroy_race.diff uploaded by
+ tim ringenbach (license 540) Tested by: dvossel
+
+2010-02-12 18:52 +0000 [r246460] Jason Parker <jparker@digium.com>
+
+ * main/channel.c: Fix some silly formatting, and remove unnecessary
+ option_debug checks
+
+2010-02-10 17:44 +0000 [r246115] David Vossel <dvossel@digium.com>
+
+ * apps/app_queue.c: fixes random deadlock in app_queue with
+ use_weight during reload (closes issue #16677) Reported by:
+ tim_ringenbach Patches: app_queue_use_weight_deadlock.diff
+ uploaded by tim ringenbach (license 540)
+
+2010-02-10 13:37 +0000 [r245944] Tilghman Lesher <tlesher@digium.com>
+
+ * configs/extensions.conf.sample: Include examples of FILTER usage
+ in extension patterns where a "." may be a risk.
+
+2010-02-10 08:24 +0000 [r245909] Olle Johansson <oej@edvina.net>
+
+ * res/res_smdi.c: Make sure that res_smdi loads regardless of
+ configuration, since chan_dahdi depends on res_smdi
+
+2010-02-09 22:55 +0000 [r245792] David Vossel <dvossel@digium.com>
+
+ * channels/chan_iax2.c: Fixes iaxs and iaxsl size off by one issue.
+ 2^15 = 32768 which is the maximum allowed iax2 callnumber.
+ Creating the iaxs and iaxsl array of size 32768 means the maximum
+ callnumber is actually out of bounds. This causes a nasty crash.
+ (closes issue #15997) Reported by: exarv Patches: iax_fix.diff
+ uploaded by dvossel (license 671)
+
+2010-02-08 20:39 +0000 [r245496] Jason Parker <jparker@digium.com>
+
+ * main/ast_expr2.fl, main/ast_expr2f.c: Remove reference of
+ documentation in source directory. People don't always build
+ Asterisk from source (distro packages, anybody?).
+
+2010-02-08 11:57 +0000 [r245422] Olle Johansson <oej@edvina.net>
+
+ * res/res_features.c: Res_features depends on res_adsi in 1.4
+
+2010-02-05 18:32 +0000 [r245044] Kevin P. Fleming <kpfleming@digium.com>
+
+ * contrib/firmware (removed), LICENSE: Remove contrib/firmware
+ directory as it is empty Remove explicit license for IAXy
+ firmware as it is no longer included in the tree
+
+2010-02-05 17:03 +0000 [r244926] Sean Bright <sean@malleable.com>
- * Release Asterisk 1.4.30-rc1
+ * main/asterisk.c: Update main copyright date.
2010-02-04 23:20 +0000 [r244785] Jeff Peeler <jpeeler@digium.com>
diff --git a/LICENSE b/LICENSE
index 77ff5bb16..0e1a745b1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -7,15 +7,8 @@ source tree in the file COPYING.
This package also includes various components that are not part of
Asterisk itself; these components are in the 'contrib' directory
-and its subdirectories. Most of these components are also
-distributed under the GPL version 2 as well, except for the following:
-
-contrib/firmware/iax/iaxy.bin:
- This file is Copyright (C) Digium, Inc. and is licensed for
- use with Digium IAXy hardware devices only. It can be
- distributed freely as long as the distribution is in the
- original form present in this package (not reformatted or
- modified).
+and its subdirectories. These components are also distributed under the
+GPL version 2 as well.
Digium, Inc. (formerly Linux Support Services) holds copyright
and/or sufficient licenses to all components of the Asterisk
diff --git a/Makefile b/Makefile
index a71d7820a..c235f42b2 100644
--- a/Makefile
+++ b/Makefile
@@ -74,6 +74,7 @@ export TERMCAP_DIR
export TINFO_DIR
export GTK2_LIB
export GTK2_INCLUDE
+export WGET_EXTRA_ARGS
# even though we could use '-include makeopts' here, use a wildcard
# lookup anyway, so that make won't try to build makeopts if it doesn't
@@ -323,8 +324,10 @@ makeopts: configure
@exit 1
menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts build_tools/menuselect-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
+ifeq ($(filter %menuselect,$(MAKECMDGOALS)),)
menuselect/menuselect --check-deps $@
menuselect/menuselect --check-deps $@ $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS)
+endif
$(MOD_SUBDIRS_EMBED_LDSCRIPT):
+@echo "EMBED_LDSCRIPTS+="`$(SUBMAKE) -C $(@:-embed-ldscript=) SUBDIR=$(@:-embed-ldscript=) __embed_ldscript` >> makeopts.embed_rules
diff --git a/README-SERIOUSLY.bestpractices.txt b/README-SERIOUSLY.bestpractices.txt
new file mode 100644
index 000000000..0e2af3b4a
--- /dev/null
+++ b/README-SERIOUSLY.bestpractices.txt
@@ -0,0 +1,295 @@
+==================
+| Best Practices |
+==================
+
+The purpose of this document is to define best practices when working with
+Asterisk in order to minimize possible security breaches and to provide tried
+examples in field deployments. This is a living document and is subject to
+change over time as best practices are defined.
+
+--------
+Sections
+--------
+
+* Filtering Data:
+ How to protect yourself from redial attacks
+
+* Proper Device Naming:
+ Why to not use numbered extensions for devices
+
+* Secure Passwords:
+ Secure passwords limit your risk to brute force attacks
+
+* Reducing Pattern Match Typos:
+ Using the 'same' prefix, or using Goto()
+
+----------------
+Additional Links
+----------------
+
+Additional links that contain useful information about best practices or
+security are listed below.
+
+* Seven Steps to Better SIP Security:
+ http://blogs.digium.com/2009/03/28/sip-security/
+
+* Asterisk VoIP Security (webinar):
+ http://www.asterisk.org/security/webinar/
+
+
+==============
+Filtering Data
+==============
+
+In the Asterisk dialplan, several channel variables contain data potentially
+supplied by outside sources. This could lead to a potential security concern
+where those outside sources may send cleverly crafted strings of data which
+could be utilized, e.g. to place calls to unexpected locations.
+
+An example of this can be found in the use of pattern matching and the ${EXTEN}
+channel variable. Note that ${EXTEN} is not the only system created channel
+variable, so it is important to be aware of where the data you're using is
+coming from.
+
+For example, this common dialplan takes 2 or more characters of data, starting
+with a number 0-9, and then accepts any additional information supplied by the
+request.
+
+[NOTE: We use SIP in this example, but is not limited to SIP only; protocols
+ such as Jabber/XMPP or IAX2 are also susceptible to the same sort of
+ injection problem.]
+
+
+[incoming]
+exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
+exten => _X.,n,Dial(SIP/${EXTEN})
+exten => _X.,n,Hangup()
+
+This dialplan may be utilized to accept calls to extensions, which then dial a
+numbered device name configured in one of the channel configuration files (such
+as sip.conf, iax.conf, etc...) (see the section Proper Device Naming for more
+information on why this approach is flawed).
+
+The example we've given above looks harmless enough until you take into
+consideration that several channel technologies accept characters that could
+be utilized in a clever attack. For example, instead of just sending a request
+to dial extension 500 (which in our example above would create the string
+SIP/500 and is then used by the Dial() application to place a call), someone
+could potentially send a string like "500&SIP/itsp/14165551212".
+
+The string "500&SIP/itsp/14165551212" would then be contained within the
+${EXTEN} channel variable, which is then utilized by the Dial() application in
+our example, thereby giving you the dialplan line of:
+
+exten => _X.,n,Dial(SIP/500&SIP/itsp/14165551212)
+
+Our example above has now provided someone with a method to place calls out of
+your ITSP in a place where you didn't expect to allow it. There are a couple of
+ways in which you can mitigate this impact: stricter pattern matching, or using
+the FILTER() dialplan function.
+
+Strict Pattern Matching
+-----------------------
+
+The simple way to mitigate this problem is with a strict pattern match that does
+not utilize the period (.) or bang (!) characters to match on one-or-more
+characters or zero-or-more characters (respectively). To fine tune our example
+to only accept three digit extensions, we could change our pattern match to
+be:
+
+exten => _XXX,n,Dial(SIP/${EXTEN})
+
+In this way, we have minimized our impact because we're not allowing anything
+other than the numbers zero through nine. But in some cases we really do need to
+handle variable pattern matches, such as when dialing international numbers
+or when we want to handle something like a SIP URI. In this case, we'll need to
+utilize the FILTER() dialplan function.
+
+Using FILTER()
+--------------
+
+The FILTER() dialplan function is used to filter strings by only allowing
+characters that you have specified. This is a perfect candidate for controlling
+which characters you want to pass to the Dial() application, or any other
+application which will contain dynamic information passed to Asterisk from an
+external source. Lets take a look at how we can use FILTER() to control what
+data we allow.
+
+Using our previous example to accept any string length of 2 or more characters,
+starting with a number of zero through nine, we can use FILTER() to limit what
+we will accept to just numbers. Our example would then change to something like:
+
+[incoming]
+exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
+exten => _X.,n,Dial(SIP/${FILTER(0-9,${EXTEN})})
+exten => _X.,n,Hangup()
+
+Note how we've wrapped the ${EXTEN} channel variable with the FILTER() function
+which will then only pass back characters that fit into the numerical range that
+we've defined.
+
+Alternatively, if we didn't want to utilize the FILTER() function within the
+Dial() application directly, we could save the value to a channel variable,
+which has a side effect of being usable in other locations of your dialplan if
+necessary, and to handle error checking in a separate location.
+
+[incoming]
+exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
+exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
+exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
+exten => _X.,n,Hangup()
+
+Now we can use the ${SAFE_EXTEN} channel variable anywhere throughout the rest
+of our dialplan, knowing we've already filtered it. We could also perform an
+error check to verify that what we've received in ${EXTEN} also matches the data
+passed back by FILTER(), and to fail the call if things do not match.
+
+[incoming]
+exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
+exten => _X.,n,Set(SAFE_EXTEN=${FILTER(0-9,${EXTEN})})
+exten => _X.,n,GotoIf($[${EXTEN} != ${SAFE_EXTEN}]?error,1)
+exten => _X.,n,Dial(SIP/${SAFE_EXTEN})
+exten => _X.,n,Hangup()
+
+exten => error,1,Verbose(2,Values of EXTEN and SAFE_EXTEN did not match.)
+exten => error,n,Verbose(2,EXTEN: "${EXTEN}" -- SAFE_EXTEN: "${SAFE_EXTEN}")
+exten => error,n,Playback(silence/1&invalid)
+exten => error,n,Hangup()
+
+Another example would be using FILTER() to control the characters we accept when
+we're expecting to get a SIP URI for dialing.
+
+[incoming]
+exten => _[0-9a-zA-Z].,1,Verbose(2,Incoming call to extension ${EXTEN})
+exten => _[0-9a-zA-Z].,n,Dial(SIP/${FILTER(.@0-9a-zA-Z,${EXTEN})
+exten => _[0-9a-zA-Z].,n,Hangup()
+
+Of course the FILTER() function doesn't check the formatting of the incoming
+request. There is also the REGEX() dialplan function which can be used to
+determine if the string passed to it matches the regular expression you've
+created, and to take proper action on whether it matches or not. The creation of
+regular expressions is left as an exercise for the reader.
+
+More information about the FILTER() and REGEX() dialplan functions can be found
+by typing "core show function FILTER" and "core show function REGEX" from your
+Asterisk console.
+
+
+====================
+Proper Device Naming
+====================
+
+In Asterisk, the concept of an extension number being tied to a specific device
+does not exist. Asterisk is aware of devices it can call or receive calls from,
+and how you define in your dialplan how to reach those devices is up to you.
+
+Because it has become common practice to think of a specific device as having an
+extension number associated with it, it only becomes natural to think about
+naming your devices the same as the extension number you're providing it. But
+by doing this, you're limiting the powerful concept of separating user from
+extensions, and extensions from devices.
+
+It can also be a security hazard to name your devices with a number, as this can
+open you up to brute force attacks. Many of the current exploits deal with
+device configurations which utilize a number, and even worse, a password that
+matches the devices name. For example, take a look at this poorly created device
+in sip.conf:
+
+[1000]
+type=friend
+context=international_dialing
+secret=1000
+
+As implied by the context, we've permitted a device named 1000 with a password
+of 1000 to place calls internationally. If your PBX system is accessible via
+the internet, then your system will be vulnerable to expensive international
+calls. Even if your system is not accessible via the internet, people within
+your organization could get access to dialing rules you'd prefer to reserve only
+for certain people.
+
+A more secure example for the device would be to use something like the MAC
+address of the device, along with a strong password (see the section Secure
+Passwords). The following example would be more secure:
+
+[0004f2040001]
+type=friend
+context=international_dialing
+secret=aE3%B8*$jk^G
+
+Then in your dialplan, you would reference the device via the MAC address of the
+device (or if using the softphone, a MAC address of a network interface on the
+computer).
+
+Also note that you should NOT use this password, as it will likely be one of the
+first ones added to the dictionary for brute force attacks.
+
+
+================
+Secure Passwords
+================
+
+Secure passwords are necessary in many (if not all) environments, and Asterisk
+is certainly no exception, especially when it comes to expensive long distance
+calls that could potentially cost your company hundreds or thousands of dollars
+on an expensive monthly phone bill, with little to no recourse to fight the
+charges.
+
+Whenever you are positioned to add a password to your system, whether that is
+for a device configuration, a database connection, or any other secure
+connection, be sure to use a secure password. A good example of a secure
+password would be something like:
+
+aE3%B8*$jk^G
+
+Our password also contains 12 characters with a mixture of upper and
+lower case characters, numbers, and symbols. Because these passwords are likely
+to only be entered once, or loaded via a configuration file, there is
+no need to create simple passwords, even in testing. Some of the holes found in
+production systems used for exploitations involve finding the one test extension
+that contains a weak password that was forgotten prior to putting a system into
+production.
+
+Using a web search you can find several online password generators such as
+http://www.strongpasswordgenerator.com or there are several scripts that can be
+used to generate a strong password.
+
+
+============================
+Reducing Pattern Match Typos
+============================
+
+As of Asterisk 1.6.2, a new method for reducing the number of complex pattern
+matches you need to enter, which can reduce typos in your dialplan, has been
+implemented. Traditionally, a dialplan with a complex pattern match would look
+something like:
+
+exten => _[3-5]XXX,1,Verbose(Incoming call to ${EXTEN})
+exten => _[3-5]XXX,n,Set(DEVICE=${DB(device/mac_address/${EXTEN})})
+exten => _[3-5]XXX,n,Set(TECHNOLOGY=${DB(device/technology/${EXTEN})})
+exten => _[3-5]XXX,n,GotoIf($[${ISNULL(${TECHNOLOGY})} | ${ISNULL(${DEVICE})}]?error,1)
+exten => _[3-5]XXX,n,Dial(${TECHNOLOGY}/${DEVICE},${GLOBAL(TIMEOUT)})
+exten => _[3-5]XXX,n,Set(vmFlag=${IF($[${DIALSTATUS} = BUSY]?b:u)})
+exten => _[3-5]XXX,n,Voicemail(${EXTEN}@${GLOBAL(VOICEMAIL_CONTEXT)},${vmFlag})
+exten => _[3-5]XXX,n,Hangup()
+
+exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
+exten => error,n,Playback(silence/1&num-not-in-db)
+exten => error,n,Hangup()
+
+Of course there exists the possibility for a typo when retyping the pattern
+match _[3-5]XXX which will match on extensions 3000 through 5999. We can
+minimize this error by utilizing the same => prefix on all lines beyond the
+first one. Our same dialplan with using same => would look like the following:
+
+exten => _[3-5]XXX,1,Verbose(Incoming call to ${EXTEN})
+same => n,Set(DEVICE=${DB(device/mac_address/${EXTEN})})
+same => n,Set(TECHNOLOGY=${DB(device/technology/${EXTEN})})
+same => n,GotoIf($[${ISNULL(${TECHNOLOGY})} | ${ISNULL(${DEVICE})}]?error,1)
+same => n,Dial(${TECHNOLOGY}/${DEVICE},${GLOBAL(TIMEOUT)})
+same => n,Set(vmFlag=${IF($[${DIALSTATUS} = BUSY]?b:u)})
+same => n,Voicemail(${EXTEN}@${GLOBAL(VOICEMAIL_CONTEXT)},${vmFlag})
+same => n,Hangup()
+
+exten => error,1,Verbose(2,Unable to lookup technology or device for extension)
+same => n,Playback(silence/1&num-not-in-db)
+same => n,Hangup()
diff --git a/apps/app_echo.c b/apps/app_echo.c
index 14f7c6d65..b759a510b 100644
--- a/apps/app_echo.c
+++ b/apps/app_echo.c
@@ -65,8 +65,9 @@ static int echo_exec(struct ast_channel *chan, void *data)
while (ast_waitfor(chan, -1) > -1) {
struct ast_frame *f = ast_read(chan);
- if (!f)
+ if (!f) {
break;
+ }
f->delivery.tv_sec = 0;
f->delivery.tv_usec = 0;
if (ast_write(chan, f)) {
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index f05c4ef3a..39b3a57f8 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1847,7 +1847,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
close(fd);
goto outrun;
}
- ast_log(LOG_DEBUG, "Placed channel %s in %s conf %d\n", chan->name, dahdi_chan_name, conf->zapconf);
+ if (option_debug) {
+ ast_log(LOG_DEBUG, "Placed channel %s in %s conf %d\n", chan->name, dahdi_chan_name, conf->zapconf);
+ }
if (!sent_event) {
manager_event(EVENT_FLAG_CALL, "MeetmeJoin",
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 763f88f3a..4497e125f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2492,9 +2492,11 @@ static int is_our_turn(struct queue_ent *qe)
}
ao2_unlock(qe->parent);
-
- /* If the queue entry is within avl [the number of available members] calls from the top ... */
- if (ch && idx < avl) {
+ /* If the queue entry is within avl [the number of available members] calls from the top ...
+ * Autofill and position check added to support autofill=no (as only calls
+ * from the front of the queue are valid when autofill is disabled)
+ */
+ if (ch && idx < avl && (qe->parent->autofill || qe->pos == 1)) {
if (option_debug)
ast_log(LOG_DEBUG, "It's our turn (%s).\n", qe->chan->name);
res = 1;
@@ -2822,6 +2824,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
int callcompletedinsl;
struct ao2_iterator memi;
struct ast_datastore *datastore, *transfer_ds;
+ const int need_weight = use_weight;
ast_channel_lock(qe->chan);
datastore = ast_channel_datastore_find(qe->chan, &dialed_interface_info, NULL);
@@ -2875,7 +2878,8 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
}
/* Hold the lock while we setup the outgoing calls */
- if (use_weight)
+
+ if (need_weight)
AST_LIST_LOCK(&queues);
ao2_lock(qe->parent);
if (option_debug)
@@ -2896,7 +2900,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ao2_iterator_destroy(&memi);
ao2_ref(cur, -1);
ao2_unlock(qe->parent);
- if (use_weight)
+ if (need_weight)
AST_LIST_UNLOCK(&queues);
goto out;
}
@@ -2905,7 +2909,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ao2_iterator_destroy(&memi);
ao2_ref(cur, -1);
ao2_unlock(qe->parent);
- if (use_weight)
+ if (need_weight)
AST_LIST_UNLOCK(&queues);
free(tmp);
goto out;
@@ -2915,7 +2919,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ao2_iterator_destroy(&memi);
ao2_ref(cur, -1);
ao2_unlock(qe->parent);
- if (use_weight)
+ if (need_weight)
AST_LIST_UNLOCK(&queues);
free(tmp);
goto out;
@@ -2953,7 +2957,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ao2_iterator_destroy(&memi);
ao2_ref(cur, -1);
ao2_unlock(qe->parent);
- if (use_weight)
+ if (need_weight)
AST_LIST_UNLOCK(&queues);
free(tmp);
goto out;
@@ -2994,7 +2998,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
++qe->pending;
ao2_unlock(qe->parent);
ring_one(qe, outgoing, &numbusies);
- if (use_weight)
+ if (need_weight)
AST_LIST_UNLOCK(&queues);
lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed);
/* The ast_channel_datastore_remove() function could fail here if the
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ce8509cab..4fa755417 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -133,7 +133,7 @@ static int init_mailstream (struct vm_state *vms, int box);
static void write_file (char *filename, char *buffer, unsigned long len);
/*static void status (MAILSTREAM *stream); */ /* No need for this. */
static char *get_header_by_tag(char *header, char *tag);
-static void vm_imap_delete(int msgnum, struct ast_vm_user *vmu);
+static void vm_imap_delete(char *file, int msgnum, struct ast_vm_user *vmu);
static char *get_user_by_mailbox(char *mailbox);
static struct vm_state *get_vm_state_by_imapuser(char *user, int interactive);
static struct vm_state *get_vm_state_by_mailbox(const char *mailbox, const char *context, int interactive);
@@ -439,7 +439,7 @@ static int inprocess_count(const char *context, const char *mailbox, int delta)
strcpy(arg->mailbox, mailbox); /* SAFE */
strcpy(arg->context, context); /* SAFE */
ao2_lock(inprocess_container);
- if ((i = ao2_find(inprocess_container, &arg, 0))) {
+ if ((i = ao2_find(inprocess_container, arg, 0))) {
int ret = ast_atomic_fetchadd_int(&i->count, delta);
ao2_unlock(inprocess_container);
ao2_ref(i, -1);
@@ -477,7 +477,7 @@ static char odbc_table[80];
#define EXISTS(a,b,c,d) (ast_fileexists(c,NULL,d) > 0)
#define RENAME(a,b,c,d,e,f,g,h) (rename_file(g,h));
#define COPY(a,b,c,d,e,f,g,h) (copy_file(g,h));
-#define DELETE(a,b,c,d) (vm_imap_delete(b,d))
+#define DELETE(a,b,c,d) (vm_imap_delete(a,b,d))
#else
#define RETRIEVE(a,b,c)
#define DISPOSE(a,b)
@@ -1062,14 +1062,15 @@ static void free_user(struct ast_vm_user *vmu)
/* All IMAP-specific functions should go in this block. This
* keeps them from being spread out all over the code */
#ifdef IMAP_STORAGE
-static void vm_imap_delete(int msgnum, struct ast_vm_user *vmu)
+static void vm_imap_delete(char *file, int msgnum, struct ast_vm_user *vmu)
{
char arg[10];
struct vm_state *vms;
unsigned long messageNum;
- /* Greetings aren't stored in IMAP, so we can't delete them there */
+ /* Greetings aren't stored in IMAP, so we delete them from disk */
if (msgnum < 0) {
+ ast_filedelete(file, NULL);
return;
}
@@ -1091,6 +1092,7 @@ static void vm_imap_delete(int msgnum, struct ast_vm_user *vmu)
snprintf (arg, sizeof(arg), "%lu",messageNum);
ast_mutex_lock(&vms->lock);
mail_setflag (vms->mailstream,arg,"\\DELETED");
+ mail_expunge(vms->mailstream);
ast_mutex_unlock(&vms->lock);
}
diff --git a/asterisk-1.4.30-rc3-summary.html b/asterisk-1.4.30-rc3-summary.html
new file mode 100644
index 000000000..6524e7378
--- /dev/null
+++ b/asterisk-1.4.30-rc3-summary.html
@@ -0,0 +1,411 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.4.30-rc3</title></head>
+<body>
+<h1 align="center"><a name="top">Release Summary</a></h1>
+<h3 align="center">asterisk-1.4.30-rc3</h3>
+<h3 align="center">Date: 2010-03-04</h3>
+<h3 align="center">&lt;asteriskteam@digium.com&gt;</h3>
+<hr/>
+<h2 align="center">Table of Contents</h2>
+<ol>
+ <li><a href="#summary">Summary</a></li>
+ <li><a href="#contributors">Contributors</a></li>
+ <li><a href="#issues">Closed Issues</a></li>
+ <li><a href="#commits">Other Changes</a></li>
+ <li><a href="#diffstat">Diffstat</a></li>
+</ol>
+<hr/>
+<a name="summary"><h2 align="center">Summary</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
+<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.4.29.</p>
+<hr/>
+<a name="contributors"><h2 align="center">Contributors</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
+<table width="100%" border="0">
+<tr>
+<td width="33%"><h3>Coders</h3></td>
+<td width="33%"><h3>Testers</h3></td>
+<td width="33%"><h3>Reporters</h3></td>
+</tr>
+<tr valign="top">
+<td>
+17 tilghman<br/>
+8 jpeeler<br/>
+8 lmadsen<br/>
+8 oej<br/>
+6 seanbright<br/>
+5 alecdavis<br/>
+4 dvossel<br/>
+3 qwell<br/>
+3 russell<br/>
+2 kpfleming<br/>
+2 tim<br/>
+1 dodo<br/>
+1 gknispel<br/>
+1 jedi98<br/>
+1 kebl0155<br/>
+1 mmichelson<br/>
+1 mnicholson<br/>
+1 rain<br/>
+1 rmudgett<br/>
+1 syspert<br/>
+1 tomo1657<br/>
+1 vrban<br/>
+1 Yasuhiro<br/>
+</td>
+<td>
+4 dvossel<br/>
+3 atis<br/>
+3 kobaz<br/>
+1 alecdavis<br/>
+1 Chainsaw<br/>
+1 corruptor<br/>
+1 davidw<br/>
+1 elsto<br/>
+1 jamhed<br/>
+1 jsutton<br/>
+1 litnimax<br/>
+1 lmadsen<br/>
+1 mattbrown<br/>
+1 mav3rick<br/>
+1 mikeeccleston<br/>
+1 mnicholson<br/>
+1 pwalker<br/>
+1 rain<br/>
+1 tilghman<br/>
+1 TimeHider<br/>
+1 tzafrir<br/>
+1 whardier<br/>
+</td>
+<td>
+2 tim_ringenbach<br/>
+1 alecdavis<br/>
+1 alexr1<br/>
+1 bluefox<br/>
+1 Brian<br/>
+1 davidw<br/>
+1 dodo<br/>
+1 elsto<br/>
+1 exarv<br/>
+1 francesco_r<br/>
+1 jamhed<br/>
+1 jedi98<br/>
+1 kebl0155<br/>
+1 kjotte<br/>
+1 kobaz<br/>
+1 litnimax<br/>
+1 mav3rick<br/>
+1 pwalker<br/>
+1 rain<br/>
+1 romain_proformatique<br/>
+1 sohosys<br/>
+1 syspert<br/>
+1 TimeHider<br/>
+1 tomo1657<br/>
+1 valon24<br/>
+1 vrban<br/>
+1 whardier<br/>
+1 Yasuhiro Konishi<br/>
+1 ZX81<br/>
+</td>
+</tr>
+</table>
+<hr/>
+<a name="issues"><h2 align="center">Closed Issues</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p>
+<h3>Category: Applications/General</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16554">#16554</a>: [patch] Huge memory leak<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241543">241543</a><br/>
+Reporter: mav3rick<br/>
+Testers: mav3rick<br/>
+Coders: seanbright<br/>
+<br/>
+<h3>Category: Applications/app_chanspy</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16525">#16525</a>: [patch] Cannot spy on channel when a local channel is involved<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244070">244070</a><br/>
+Reporter: kobaz<br/>
+Testers: kobaz, atis<br/>
+Coders: tilghman<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16678">#16678</a>: [patch] segfault on chanspy due to race in main/channel.c<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=246545">246545</a><br/>
+Reporter: tim_ringenbach<br/>
+Testers: dvossel<br/>
+Coders: tim<br/>
+<br/>
+<h3>Category: Applications/app_queue</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16488">#16488</a>: [patch] When setting a soundfile for announce with a length longer then 80 chars a storage overlay happens<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243570">243570</a><br/>
+Reporter: syspert<br/>
+Coders: syspert<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16677">#16677</a>: [patch] deadlock in app_queue with use_weight during reload<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=246115">246115</a><br/>
+Reporter: tim_ringenbach<br/>
+Coders: tim<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16834">#16834</a>: [patch] [regression] autofill=no always IGNORED.<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=247168">247168</a><br/>
+Reporter: kebl0155<br/>
+Coders: kebl0155<br/>
+<br/>
+<h3>Category: Applications/app_transfer</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16331">#16331</a>: [patch] A blind transfer results in a call with empty accountcode in a specific circumstance<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=247651">247651</a><br/>
+Reporter: bluefox<br/>
+Testers: mnicholson<br/>
+Coders: mnicholson<br/>
+<br/>
+<h3>Category: Applications/app_voicemail</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16271">#16271</a>: [patch] message limit (maxmsg) can be exceeded in 1.6.x creating orphan voicemail<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=240414">240414</a><br/>
+Reporter: sohosys<br/>
+Testers: jsutton<br/>
+Coders: tilghman<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16415">#16415</a>: [patch] Message forwarding with prepention does not backup original message and length as intended<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244242">244242</a><br/>
+Reporter: tomo1657<br/>
+Coders: tomo1657<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16921">#16921</a>: [patch] VoiceMail(vmbox@context,s) -> Regularly segfaults asterisk<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249671">249671</a><br/>
+Reporter: whardier<br/>
+Testers: whardier<br/>
+Coders: seanbright<br/>
+<br/>
+<h3>Category: Applications/app_voicemail/IMAP</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16170">#16170</a>: [patch] temporary greetings can't be erased in 1.4<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248668">248668</a><br/>
+Reporter: francesco_r<br/>
+Coders: jpeeler<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16704">#16704</a>: Lags when using imap<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=250050">250050</a><br/>
+Reporter: TimeHider<br/>
+Testers: lmadsen, TimeHider<br/>
+Coders: lmadsen<br/>
+<br/>
+<h3>Category: Channels/chan_agent</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16321">#16321</a>: [patch] [regression] asterisk deadlocks and calls will stop queueing.<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241227">241227</a><br/>
+Reporter: valon24<br/>
+Coders: jpeeler<br/>
+<br/>
+<h3>Category: Channels/chan_dahdi</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=14163">#14163</a>: [patch] UK (BT) lines produce uncleared red alarm on TDM400P during line tests<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=250480">250480</a><br/>
+Reporter: jedi98<br/>
+Testers: mattbrown, Chainsaw, mikeeccleston<br/>
+Coders: jedi98<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16789">#16789</a>: [patch] Overlap receiving timeout, plus dialplan latency, causes network to retry SETUP<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249365">249365</a><br/>
+Reporter: alecdavis<br/>
+Testers: alecdavis<br/>
+Coders: alecdavis<br/>
+<br/>
+<h3>Category: Channels/chan_iax2</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=15997">#15997</a>: [patch] segfault in 1.6.1.6 in _ao2_find, called from chan_iax2 after approx. 75.000 calls<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=245792">245792</a><br/>
+Reporter: exarv<br/>
+Coders: dvossel<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16904">#16904</a>: [patch] [regression] Duplicate TXREQ packets will cause chan_iax2 to reject an unrelated call in the future<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=250394">250394</a><br/>
+Reporter: rain<br/>
+Testers: rain, dvossel<br/>
+Coders: rain<br/>
+<br/>
+<h3>Category: Channels/chan_local</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=14992">#14992</a>: [patch] [regression] #0013747 not fixed for local channel (Indications are not passed from old peer to new peer during masquerad<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244785">244785</a><br/>
+Reporter: davidw<br/>
+Coders: jpeeler<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16581">#16581</a>: Chan Local Fails to bridge from originate<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244070">244070</a><br/>
+Reporter: ZX81<br/>
+Testers: kobaz, atis<br/>
+Coders: tilghman<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16681">#16681</a>: [regression] .call file not connecting to context: when channel: answers<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244070">244070</a><br/>
+Reporter: alexr1<br/>
+Testers: kobaz, atis<br/>
+Coders: tilghman<br/>
+<br/>
+<h3>Category: Channels/chan_sip/T.38</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16792">#16792</a>: [patch] 606 Not Acceptable is also a valid response to reject a T.38 re-INVITE<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249100">249100</a><br/>
+Reporter: vrban<br/>
+Coders: vrban<br/>
+<br/>
+<h3>Category: Channels/chan_sip/Transfers</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16862">#16862</a>: [patch] [regression] One-legged Transfer (INVITE / Replaces) not working anymore<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248396">248396</a><br/>
+Reporter: pwalker<br/>
+Testers: pwalker, dvossel<br/>
+Coders: dvossel<br/>
+<br/>
+<h3>Category: Core/BuildSystem</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16666">#16666</a>: [patch] Check on ac_cv_pthread_once_needsbraces fails<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241932">241932</a><br/>
+Reporter: romain_proformatique<br/>
+Coders: seanbright<br/>
+<br/>
+<h3>Category: Core/General</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16786">#16786</a>: [patch] Remove coloring escape sequences from log files.<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248582">248582</a><br/>
+Reporter: dodo<br/>
+Testers: tilghman<br/>
+Coders: dodo<br/>
+<br/>
+<h3>Category: Core/PBX</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16802">#16802</a>: [patch] Unable to open pid file '/var/run/asterisk/asterisk.pid': No such file or directory<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248859">248859</a><br/>
+Reporter: Brian<br/>
+Testers: tzafrir<br/>
+Coders: tilghman<br/>
+<br/>
+<h3>Category: Documentation</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16267">#16267</a>: [patch] unanswered has no effect<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=250043">250043</a><br/>
+Reporter: elsto<br/>
+Testers: davidw, elsto<br/>
+Coders: lmadsen<br/>
+<br/>
+<h3>Category: Features/Parking</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16429">#16429</a>: [patch] Callee on outside line can take parking and forwarding rights<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243390">243390</a><br/>
+Reporter: Yasuhiro Konishi<br/>
+Testers: dvossel<br/>
+Coders: Yasuhiro<br/>
+<br/>
+<h3>Category: General</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16470">#16470</a>: [patch] 'core stop when convenient' causes segfault<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248012">248012</a><br/>
+Reporter: kjotte<br/>
+Coders: tilghman<br/>
+<br/>
+<h3>Category: PBX/General</h3><br/>
+<a href="https://issues.asterisk.org/view.php?id=16513">#16513</a>: [patch] Transferee can hear silence on attended transfer when tranferer hangs up (MOH stops to play)<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244151">244151</a><br/>
+Reporter: litnimax<br/>
+Testers: litnimax<br/>
+Coders: gknispel<br/>
+<br/>
+<a href="https://issues.asterisk.org/view.php?id=16816">#16816</a>: [patch] Attended transfer broken in 1.6.2.2<br/>
+Revision: <a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249536">249536</a><br/>
+Reporter: jamhed<br/>
+Testers: jamhed, corruptor<br/>
+Coders: jpeeler<br/>
+<br/>
+<hr/>
+<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
+<table width="100%" border="1">
+<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=240547">240547</a></td><td>russell</td><td>Fix a spelling error in the asterisk.conf sample.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=240768">240768</a></td><td>oej</td><td>Fix muted compilation in 1.4 only</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=240891">240891</a></td><td>dvossel</td><td>updated transmit_silence option documentation in asterisk.conf</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241015">241015</a></td><td>seanbright</td><td>Plug a memory leak when reading configs with their comments.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16554">#16554</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241228">241228</a></td><td>qwell</td><td>Allow parallel make (-j) to work properly.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16489">#16489</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241458">241458</a></td><td>alecdavis</td><td>Update CDR variables as pbx starts</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16638">#16638</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241544">241544</a></td><td>seanbright</td><td>Modify fix for issue 16554 to be more inline with what is already in trunk.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16554">#16554</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241626">241626</a></td><td>dvossel</td><td>fixes parsing error in Makefile.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=241765">241765</a></td><td>tilghman</td><td>Guard against division by zero.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242142">242142</a></td><td>alecdavis</td><td>Add Dialed Number Identifier (DNID) field to cdr.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242226">242226</a></td><td>oej</td><td>Initialize notify_types to NULL</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242423">242423</a></td><td>tilghman</td><td>Rebuild from flex, bison sources when necessary.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=14629">#14629</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242520">242520</a></td><td>tilghman</td><td>Only rebuild bison and flex source files on demand, if bison and flex are detected by the configure script.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242683">242683</a></td><td>tilghman</td><td>Make the build of the Asterisk expression parser match that of the AEL parser.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242723">242723</a></td><td>tilghman</td><td>Oops, should have used CMD_PREFIX, not ECHO_PREFIX, for the commands.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242728">242728</a></td><td>tilghman</td><td>Buildbot pointed out an error (thanks, buildbot!)</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242850">242850</a></td><td>oej</td><td>Report error when writing to functions returns error in AMI setvar action</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242851">242851</a></td><td>oej</td><td>Remove debugging that indeed should have been gone before commit. Sorry.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242852">242852</a></td><td>tilghman</td><td>Restore FreeBSD to able-to-compile-ish-mode</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242966">242966</a></td><td>tilghman</td><td>Only rebuild parsers by an option in menuselect</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=242969">242969</a></td><td>tilghman</td><td>Err, and use the new menuselect define, too.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243258">243258</a></td><td>jpeeler</td><td>Remove unnecessary code in ast_read as issue 16058 has been fully solved now.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243486">243486</a></td><td>mmichelson</td><td>Use a safe list traversal while checking for duplicate vars in pbx_builtin_setvar_helper.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243691">243691</a></td><td>jpeeler</td><td>Revert 243570, I should have looked at this closer. Will reopen the issue, but</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16488">#16488</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243779">243779</a></td><td>russell</td><td>Fix a bogus third argument to ast_copy_string().</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243862">243862</a></td><td>lmadsen</td><td>Update location of bug tracker in documentation.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=243863">243863</a></td><td>lmadsen</td><td>Oops, correct wrong link (https vs. http) in previous commit.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=244926">244926</a></td><td>seanbright</td><td>Update main copyright date.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=245044">245044</a></td><td>kpfleming</td><td>Remove contrib/firmware directory as it is empty</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=245422">245422</a></td><td>oej</td><td>Res_features depends on res_adsi in 1.4</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=245496">245496</a></td><td>qwell</td><td>Remove reference of documentation in source directory.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=245909">245909</a></td><td>oej</td><td>Make sure that res_smdi loads regardless of configuration, since chan_dahdi depends on res_smdi</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=245944">245944</a></td><td>tilghman</td><td>Include examples of FILTER usage in extension patterns where a "." may be a risk.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=246460">246460</a></td><td>qwell</td><td>Fix some silly formatting, and remove unnecessary option_debug checks</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=246709">246709</a></td><td>tilghman</td><td>Make the menuselect instructions correct by allowing 'make menuselect' to actually solve dependency problems.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=247422">247422</a></td><td>russell</td><td>Tweak argument handling for wget in the sounds Makefile.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=247502">247502</a></td><td>lmadsen</td><td>Add best practices documentation.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16808">#16808</a>, <a href="https://issues.asterisk.org/view.php?id=16810">#16810</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=247508">247508</a></td><td>lmadsen</td><td>Add additional link to best practices document per jsmith.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=247910">247910</a></td><td>rmudgett</td><td>Merged revision 247904 from</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248106">248106</a></td><td>oej</td><td>Make sure we support RTCP compound messages with zero reports</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248268">248268</a></td><td>oej</td><td>Don't log to debug unless debug is turned on</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248757">248757</a></td><td>jpeeler</td><td>Ensure that monitor recordings are written to the correct location.</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=248860">248860</a></td><td>jpeeler</td><td>Ensure that monitor recordings are written to the correct location (again)</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249234">249234</a></td><td>kpfleming</td><td>add a reference to the now-published IAX2 RFC</td>
+<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249845">249845</a></td><td>alecdavis</td><td>fixes ability to exit echo app</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16880">#16880</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=249946">249946</a></td><td>alecdavis</td><td>revert ability to exit echo app</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16880">#16880</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=250041">250041</a></td><td>lmadsen</td><td>Update documentation to not imply we support overriding options.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16855">#16855</a></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.4?view=revision&revision=250613">250613</a></td><td>lmadsen</td><td>Update existing Local channel documentation.</td>
+<td><a href="https://issues.asterisk.org/view.php?id=16637">#16637</a></td></tr></table>
+<hr/>
+<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
+<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
+<pre>
+BUGS | 2
+LICENSE | 11
+Makefile | 15 -
+README-SERIOUSLY.bestpractices.txt | 295 ++++++++++++++++++++++++
+apps/app_echo.c | 3
+apps/app_meetme.c | 4
+apps/app_queue.c | 22 +
+apps/app_voicemail.c | 123 +++++++++-
+build_tools/cflags.xml | 5
+build_tools/menuselect-deps.in | 2
+channels/chan_agent.c | 23 +
+channels/chan_dahdi.c | 27 ++
+channels/chan_iax2.c | 18 +
+channels/chan_local.c | 7
+channels/chan_misdn.c | 32 --
+channels/chan_sip.c | 73 ++++--
+configs/cdr.conf.sample | 6
+configs/extensions.conf.sample | 4
+configure.ac | 50 ++++
+doc/configuration.txt | 34 +-
+doc/imapstorage.txt | 6
+doc/localchannel.txt | 437 ++++++++++++++++++++++++++++++++++---
+funcs/func_math.c | 6
+include/asterisk/autoconfig.h.in | 51 ++--
+main/Makefile | 20 +
+main/ast_expr2.fl | 2
+main/ast_expr2f.c | 2
+main/asterisk.c | 16 +
+main/cdr.c | 1
+main/channel.c | 77 ++----
+main/config.c | 23 +
+main/loader.c | 47 ++-
+main/logger.c | 2
+main/manager.c | 18 +
+main/pbx.c | 9
+main/rtp.c | 4
+makeopts.in | 2
+pbx/Makefile | 18 +
+pbx/ael/ael_lex.c | 13 -
+pbx/pbx_spool.c | 4
+res/res_features.c | 75 ++++--
+res/res_monitor.c | 22 -
+res/res_smdi.c | 6
+sounds/Makefile | 4
+utils/Makefile | 4
+45 files changed, 1326 insertions(+), 299 deletions(-)
+</pre><br/>
+<hr/>
+</body>
+</html>
diff --git a/asterisk-1.4.30-rc3-summary.txt b/asterisk-1.4.30-rc3-summary.txt
new file mode 100644
index 000000000..71a3f740d
--- /dev/null
+++ b/asterisk-1.4.30-rc3-summary.txt
@@ -0,0 +1,541 @@
+ Release Summary
+
+ asterisk-1.4.30-rc3
+
+ Date: 2010-03-04
+
+ <asteriskteam@digium.com>
+
+ ----------------------------------------------------------------------
+
+ Table of Contents
+
+ 1. Summary
+ 2. Contributors
+ 3. Closed Issues
+ 4. Other Changes
+ 5. Diffstat
+
+ ----------------------------------------------------------------------
+
+ Summary
+
+ [Back to Top]
+
+ This release includes only bug fixes. The changes included were made only
+ to address problems that have been identified in this release series.
+ Users should be able to safely upgrade to this version if this release
+ series is already in use. Users considering upgrading from a previous
+ release series are strongly encouraged to review the UPGRADE.txt document
+ as well as the CHANGES document for information about upgrading to this
+ release series.
+
+ The data in this summary reflects changes that have been made since the
+ previous release, asterisk-1.4.29.
+
+ ----------------------------------------------------------------------
+
+ Contributors
+
+ [Back to Top]
+
+ This table lists the people who have submitted code, those that have
+ tested patches, as well as those that reported issues on the issue tracker
+ that were resolved in this release. For coders, the number is how many of
+ their patches (of any size) were committed into this release. For testers,
+ the number is the number of times their name was listed as assisting with
+ testing a patch. Finally, for reporters, the number is the number of
+ issues that they reported that were closed by commits that went into this
+ release.
+
+ Coders Testers Reporters
+ 17 tilghman 4 dvossel 2 tim_ringenbach
+ 8 jpeeler 3 atis 1 alecdavis
+ 8 lmadsen 3 kobaz 1 alexr1
+ 8 oej 1 alecdavis 1 bluefox
+ 6 seanbright 1 Chainsaw 1 Brian
+ 5 alecdavis 1 corruptor 1 davidw
+ 4 dvossel 1 davidw 1 dodo
+ 3 qwell 1 elsto 1 elsto
+ 3 russell 1 jamhed 1 exarv
+ 2 kpfleming 1 jsutton 1 francesco_r
+ 2 tim 1 litnimax 1 jamhed
+ 1 dodo 1 lmadsen 1 jedi98
+ 1 gknispel 1 mattbrown 1 kebl0155
+ 1 jedi98 1 mav3rick 1 kjotte
+ 1 kebl0155 1 mikeeccleston 1 kobaz
+ 1 mmichelson 1 mnicholson 1 litnimax
+ 1 mnicholson 1 pwalker 1 mav3rick
+ 1 rain 1 rain 1 pwalker
+ 1 rmudgett 1 tilghman 1 rain
+ 1 syspert 1 TimeHider 1 romain_proformatique
+ 1 tomo1657 1 tzafrir 1 sohosys
+ 1 vrban 1 whardier 1 syspert
+ 1 Yasuhiro 1 TimeHider
+ 1 tomo1657
+ 1 valon24
+ 1 vrban
+ 1 whardier
+ 1 Yasuhiro Konishi
+ 1 ZX81
+
+ ----------------------------------------------------------------------
+
+ Closed Issues
+
+ [Back to Top]
+
+ This is a list of all issues from the issue tracker that were closed by
+ changes that went into this release.
+
+ Category: Applications/General
+
+ #16554: [patch] Huge memory leak
+ Revision: 241543
+ Reporter: mav3rick
+ Testers: mav3rick
+ Coders: seanbright
+
+ Category: Applications/app_chanspy
+
+ #16525: [patch] Cannot spy on channel when a local channel is involved
+ Revision: 244070
+ Reporter: kobaz
+ Testers: kobaz, atis
+ Coders: tilghman
+
+ #16678: [patch] segfault on chanspy due to race in main/channel.c
+ Revision: 246545
+ Reporter: tim_ringenbach
+ Testers: dvossel
+ Coders: tim
+
+ Category: Applications/app_queue
+
+ #16488: [patch] When setting a soundfile for announce with a length longer
+ then 80 chars a storage overlay happens
+ Revision: 243570
+ Reporter: syspert
+ Coders: syspert
+
+ #16677: [patch] deadlock in app_queue with use_weight during reload
+ Revision: 246115
+ Reporter: tim_ringenbach
+ Coders: tim
+
+ #16834: [patch] [regression] autofill=no always IGNORED.
+ Revision: 247168
+ Reporter: kebl0155
+ Coders: kebl0155
+
+ Category: Applications/app_transfer
+
+ #16331: [patch] A blind transfer results in a call with empty accountcode
+ in a specific circumstance
+ Revision: 247651
+ Reporter: bluefox
+ Testers: mnicholson
+ Coders: mnicholson
+
+ Category: Applications/app_voicemail
+
+ #16271: [patch] message limit (maxmsg) can be exceeded in 1.6.x creating
+ orphan voicemail
+ Revision: 240414
+ Reporter: sohosys
+ Testers: jsutton
+ Coders: tilghman
+
+ #16415: [patch] Message forwarding with prepention does not backup
+ original message and length as intended
+ Revision: 244242
+ Reporter: tomo1657
+ Coders: tomo1657
+
+ #16921: [patch] VoiceMail(vmbox@context,s) -> Regularly segfaults asterisk
+ Revision: 249671
+ Reporter: whardier
+ Testers: whardier
+ Coders: seanbright
+
+ Category: Applications/app_voicemail/IMAP
+
+ #16170: [patch] temporary greetings can't be erased in 1.4
+ Revision: 248668
+ Reporter: francesco_r
+ Coders: jpeeler
+
+ #16704: Lags when using imap
+ Revision: 250050
+ Reporter: TimeHider
+ Testers: lmadsen, TimeHider
+ Coders: lmadsen
+
+ Category: Channels/chan_agent
+
+ #16321: [patch] [regression] asterisk deadlocks and calls will stop
+ queueing.
+ Revision: 241227
+ Reporter: valon24
+ Coders: jpeeler
+
+ Category: Channels/chan_dahdi
+
+ #14163: [patch] UK (BT) lines produce uncleared red alarm on TDM400P
+ during line tests
+ Revision: 250480
+ Reporter: jedi98
+ Testers: mattbrown, Chainsaw, mikeeccleston
+ Coders: jedi98
+
+ #16789: [patch] Overlap receiving timeout, plus dialplan latency, causes
+ network to retry SETUP
+ Revision: 249365
+ Reporter: alecdavis
+ Testers: alecdavis
+ Coders: alecdavis
+
+ Category: Channels/chan_iax2
+
+ #15997: [patch] segfault in 1.6.1.6 in _ao2_find, called from chan_iax2
+ after approx. 75.000 calls
+ Revision: 245792
+ Reporter: exarv
+ Coders: dvossel
+
+ #16904: [patch] [regression] Duplicate TXREQ packets will cause chan_iax2
+ to reject an unrelated call in the future
+ Revision: 250394
+ Reporter: rain
+ Testers: rain, dvossel
+ Coders: rain
+
+ Category: Channels/chan_local
+
+ #14992: [patch] [regression] #0013747 not fixed for local channel
+ (Indications are not passed from old peer to new peer during masquerad
+ Revision: 244785
+ Reporter: davidw
+ Coders: jpeeler
+
+ #16581: Chan Local Fails to bridge from originate
+ Revision: 244070
+ Reporter: ZX81
+ Testers: kobaz, atis
+ Coders: tilghman
+
+ #16681: [regression] .call file not connecting to context: when channel:
+ answers
+ Revision: 244070
+ Reporter: alexr1
+ Testers: kobaz, atis
+ Coders: tilghman
+
+ Category: Channels/chan_sip/T.38
+
+ #16792: [patch] 606 Not Acceptable is also a valid response to reject a
+ T.38 re-INVITE
+ Revision: 249100
+ Reporter: vrban
+ Coders: vrban
+
+ Category: Channels/chan_sip/Transfers
+
+ #16862: [patch] [regression] One-legged Transfer (INVITE / Replaces) not
+ working anymore
+ Revision: 248396
+ Reporter: pwalker
+ Testers: pwalker, dvossel
+ Coders: dvossel
+
+ Category: Core/BuildSystem
+
+ #16666: [patch] Check on ac_cv_pthread_once_needsbraces fails
+ Revision: 241932
+ Reporter: romain_proformatique
+ Coders: seanbright
+
+ Category: Core/General
+
+ #16786: [patch] Remove coloring escape sequences from log files.
+ Revision: 248582
+ Reporter: dodo
+ Testers: tilghman
+ Coders: dodo
+
+ Category: Core/PBX
+
+ #16802: [patch] Unable to open pid file '/var/run/asterisk/asterisk.pid':
+ No such file or directory
+ Revision: 248859
+ Reporter: Brian
+ Testers: tzafrir
+ Coders: tilghman
+
+ Category: Documentation
+
+ #16267: [patch] unanswered has no effect
+ Revision: 250043
+ Reporter: elsto
+ Testers: davidw, elsto
+ Coders: lmadsen
+
+ Category: Features/Parking
+
+ #16429: [patch] Callee on outside line can take parking and forwarding
+ rights
+ Revision: 243390
+ Reporter: Yasuhiro Konishi
+ Testers: dvossel
+ Coders: Yasuhiro
+
+ Category: General
+
+ #16470: [patch] 'core stop when convenient' causes segfault
+ Revision: 248012
+ Reporter: kjotte
+ Coders: tilghman
+
+ Category: PBX/General
+
+ #16513: [patch] Transferee can hear silence on attended transfer when
+ tranferer hangs up (MOH stops to play)
+ Revision: 244151
+ Reporter: litnimax
+ Testers: litnimax
+ Coders: gknispel
+
+ #16816: [patch] Attended transfer broken in 1.6.2.2
+ Revision: 249536
+ Reporter: jamhed
+ Testers: jamhed, corruptor
+ Coders: jpeeler
+
+ ----------------------------------------------------------------------
+
+ Commits Not Associated with an Issue
+
+ [Back to Top]
+
+ This is a list of all changes that went into this release that did not
+ directly close an issue from the issue tracker. The commits may have been
+ marked as being related to an issue. If that is the case, the issue
+ numbers are listed here, as well.
+
+ +------------------------------------------------------------------------+
+ | Revision | Author | Summary | Issues |
+ | | | | Referenced |
+ |----------+------------+-----------------------------------+------------|
+ | 240547 | russell | Fix a spelling error in the | |
+ | | | asterisk.conf sample. | |
+ |----------+------------+-----------------------------------+------------|
+ | 240768 | oej | Fix muted compilation in 1.4 only | |
+ |----------+------------+-----------------------------------+------------|
+ | 240891 | dvossel | updated transmit_silence option | |
+ | | | documentation in asterisk.conf | |
+ |----------+------------+-----------------------------------+------------|
+ | 241015 | seanbright | Plug a memory leak when reading | #16554 |
+ | | | configs with their comments. | |
+ |----------+------------+-----------------------------------+------------|
+ | 241228 | qwell | Allow parallel make (-j) to work | #16489 |
+ | | | properly. | |
+ |----------+------------+-----------------------------------+------------|
+ | 241458 | alecdavis | Update CDR variables as pbx | #16638 |
+ | | | starts | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Modify fix for issue 16554 to be | |
+ | 241544 | seanbright | more inline with what is already | #16554 |
+ | | | in trunk. | |
+ |----------+------------+-----------------------------------+------------|
+ | 241626 | dvossel | fixes parsing error in Makefile. | |
+ |----------+------------+-----------------------------------+------------|
+ | 241765 | tilghman | Guard against division by zero. | |
+ |----------+------------+-----------------------------------+------------|
+ | 242142 | alecdavis | Add Dialed Number Identifier | |
+ | | | (DNID) field to cdr. | |
+ |----------+------------+-----------------------------------+------------|
+ | 242226 | oej | Initialize notify_types to NULL | |
+ |----------+------------+-----------------------------------+------------|
+ | 242423 | tilghman | Rebuild from flex, bison sources | #14629 |
+ | | | when necessary. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Only rebuild bison and flex | |
+ | 242520 | tilghman | source files on demand, if bison | |
+ | | | and flex are detected by the | |
+ | | | configure script. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Make the build of the Asterisk | |
+ | 242683 | tilghman | expression parser match that of | |
+ | | | the AEL parser. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Oops, should have used | |
+ | 242723 | tilghman | CMD_PREFIX, not ECHO_PREFIX, for | |
+ | | | the commands. | |
+ |----------+------------+-----------------------------------+------------|
+ | 242728 | tilghman | Buildbot pointed out an error | |
+ | | | (thanks, buildbot!) | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Report error when writing to | |
+ | 242850 | oej | functions returns error in AMI | |
+ | | | setvar action | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Remove debugging that indeed | |
+ | 242851 | oej | should have been gone before | |
+ | | | commit. Sorry. | |
+ |----------+------------+-----------------------------------+------------|
+ | 242852 | tilghman | Restore FreeBSD to | |
+ | | | able-to-compile-ish-mode | |
+ |----------+------------+-----------------------------------+------------|
+ | 242966 | tilghman | Only rebuild parsers by an option | |
+ | | | in menuselect | |
+ |----------+------------+-----------------------------------+------------|
+ | 242969 | tilghman | Err, and use the new menuselect | |
+ | | | define, too. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Remove unnecessary code in | |
+ | 243258 | jpeeler | ast_read as issue 16058 has been | |
+ | | | fully solved now. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Use a safe list traversal while | |
+ | 243486 | mmichelson | checking for duplicate vars in | |
+ | | | pbx_builtin_setvar_helper. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Revert 243570, I should have | |
+ | 243691 | jpeeler | looked at this closer. Will | #16488 |
+ | | | reopen the issue, but | |
+ |----------+------------+-----------------------------------+------------|
+ | 243779 | russell | Fix a bogus third argument to | |
+ | | | ast_copy_string(). | |
+ |----------+------------+-----------------------------------+------------|
+ | 243862 | lmadsen | Update location of bug tracker in | |
+ | | | documentation. | |
+ |----------+------------+-----------------------------------+------------|
+ | 243863 | lmadsen | Oops, correct wrong link (https | |
+ | | | vs. http) in previous commit. | |
+ |----------+------------+-----------------------------------+------------|
+ | 244926 | seanbright | Update main copyright date. | |
+ |----------+------------+-----------------------------------+------------|
+ | 245044 | kpfleming | Remove contrib/firmware directory | |
+ | | | as it is empty | |
+ |----------+------------+-----------------------------------+------------|
+ | 245422 | oej | Res_features depends on res_adsi | |
+ | | | in 1.4 | |
+ |----------+------------+-----------------------------------+------------|
+ | 245496 | qwell | Remove reference of documentation | |
+ | | | in source directory. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Make sure that res_smdi loads | |
+ | 245909 | oej | regardless of configuration, | |
+ | | | since chan_dahdi depends on | |
+ | | | res_smdi | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Include examples of FILTER usage | |
+ | 245944 | tilghman | in extension patterns where a "." | |
+ | | | may be a risk. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Fix some silly formatting, and | |
+ | 246460 | qwell | remove unnecessary option_debug | |
+ | | | checks | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Make the menuselect instructions | |
+ | 246709 | tilghman | correct by allowing 'make | |
+ | | | menuselect' to actually solve | |
+ | | | dependency problems. | |
+ |----------+------------+-----------------------------------+------------|
+ | 247422 | russell | Tweak argument handling for wget | |
+ | | | in the sounds Makefile. | |
+ |----------+------------+-----------------------------------+------------|
+ | 247502 | lmadsen | Add best practices documentation. | #16808, |
+ | | | | #16810 |
+ |----------+------------+-----------------------------------+------------|
+ | 247508 | lmadsen | Add additional link to best | |
+ | | | practices document per jsmith. | |
+ |----------+------------+-----------------------------------+------------|
+ | 247910 | rmudgett | Merged revision 247904 from | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Make sure we support RTCP | |
+ | 248106 | oej | compound messages with zero | |
+ | | | reports | |
+ |----------+------------+-----------------------------------+------------|
+ | 248268 | oej | Don't log to debug unless debug | |
+ | | | is turned on | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Ensure that monitor recordings | |
+ | 248757 | jpeeler | are written to the correct | |
+ | | | location. | |
+ |----------+------------+-----------------------------------+------------|
+ | | | Ensure that monitor recordings | |
+ | 248860 | jpeeler | are written to the correct | |
+ | | | location (again) | |
+ |----------+------------+-----------------------------------+------------|
+ | 249234 | kpfleming | add a reference to the | |
+ | | | now-published IAX2 RFC | |
+ |----------+------------+-----------------------------------+------------|
+ | 249845 | alecdavis | fixes ability to exit echo app | #16880 |
+ |----------+------------+-----------------------------------+------------|
+ | 249946 | alecdavis | revert ability to exit echo app | #16880 |
+ |----------+------------+-----------------------------------+------------|
+ | 250041 | lmadsen | Update documentation to not imply | #16855 |
+ | | | we support overriding options. | |
+ |----------+------------+-----------------------------------+------------|
+ | 250613 | lmadsen | Update existing Local channel | #16637 |
+ | | | documentation. | |
+ +------------------------------------------------------------------------+
+
+ ----------------------------------------------------------------------
+
+ Diffstat Results
+
+ [Back to Top]
+
+ This is a summary of the changes to the source code that went into this
+ release that was generated using the diffstat utility.
+
+ BUGS | 2
+ LICENSE | 11
+ Makefile | 15 -
+ README-SERIOUSLY.bestpractices.txt | 295 ++++++++++++++++++++++++
+ apps/app_echo.c | 3
+ apps/app_meetme.c | 4
+ apps/app_queue.c | 22 +
+ apps/app_voicemail.c | 123 +++++++++-
+ build_tools/cflags.xml | 5
+ build_tools/menuselect-deps.in | 2
+ channels/chan_agent.c | 23 +
+ channels/chan_dahdi.c | 27 ++
+ channels/chan_iax2.c | 18 +
+ channels/chan_local.c | 7
+ channels/chan_misdn.c | 32 --
+ channels/chan_sip.c | 73 ++++--
+ configs/cdr.conf.sample | 6
+ configs/extensions.conf.sample | 4
+ configure.ac | 50 ++++
+ doc/configuration.txt | 34 +-
+ doc/imapstorage.txt | 6
+ doc/localchannel.txt | 437 ++++++++++++++++++++++++++++++++++---
+ funcs/func_math.c | 6
+ include/asterisk/autoconfig.h.in | 51 ++--
+ main/Makefile | 20 +
+ main/ast_expr2.fl | 2
+ main/ast_expr2f.c | 2
+ main/asterisk.c | 16 +
+ main/cdr.c | 1
+ main/channel.c | 77 ++----
+ main/config.c | 23 +
+ main/loader.c | 47 ++-
+ main/logger.c | 2
+ main/manager.c | 18 +
+ main/pbx.c | 9
+ main/rtp.c | 4
+ makeopts.in | 2
+ pbx/Makefile | 18 +
+ pbx/ael/ael_lex.c | 13 -
+ pbx/pbx_spool.c | 4
+ res/res_features.c | 75 ++++--
+ res/res_monitor.c | 22 -
+ res/res_smdi.c | 6
+ sounds/Makefile | 4
+ utils/Makefile | 4
+ 45 files changed, 1326 insertions(+), 299 deletions(-)
+
+ ----------------------------------------------------------------------
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 67d0d1736..257a888f4 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -5959,7 +5959,20 @@ static void *ss_thread(void *data)
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num)) {
/* Start the real PBX */
ast_copy_string(chan->exten, exten, sizeof(chan->exten));
- if (p->dsp) ast_dsp_digitreset(p->dsp);
+ if (p->dsp) {
+ ast_dsp_digitreset(p->dsp);
+ }
+ if (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) {
+ if (p->pri->pri) {
+ if (!pri_grab(p, p->pri)) {
+ pri_proceeding(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 0);
+ p->proceeding = 1;
+ pri_rel(p->pri);
+ } else {
+ ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
+ }
+ }
+ }
dahdi_enable_ec(p);
ast_setstate(chan, AST_STATE_RING);
res = ast_pbx_run(chan);
@@ -6640,6 +6653,9 @@ static void *ss_thread(void *data)
if (i & DAHDI_IOMUX_SIGEVENT) {
res = dahdi_get_event(p->subs[index].dfd);
ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
+ if (res == DAHDI_EVENT_NOALARM) {
+ p->inalarm = 0;
+ }
if (p->cid_signalling == CID_SIG_V23_JP) {
#ifdef DAHDI_EVENT_RINGBEGIN
@@ -6743,6 +6759,9 @@ static void *ss_thread(void *data)
if (i & DAHDI_IOMUX_SIGEVENT) {
res = dahdi_get_event(p->subs[index].dfd);
ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
+ if (res == DAHDI_EVENT_NOALARM) {
+ p->inalarm = 0;
+ }
res = 0;
/* Let us detect distinctive ring */
@@ -6848,6 +6867,9 @@ static void *ss_thread(void *data)
if (i & DAHDI_IOMUX_SIGEVENT) {
res = dahdi_get_event(p->subs[index].dfd);
ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
+ if (res == DAHDI_EVENT_NOALARM) {
+ p->inalarm = 0;
+ }
/* If we get a PR event, they hung up while processing calerid */
if ( res == DAHDI_EVENT_POLARITY && p->hanguponpolarityswitch && p->polarity == POLARITY_REV) {
ast_log(LOG_DEBUG, "Hanging up due to polarity reversal on channel %d while detecting callerid\n", p->channel);
@@ -6919,6 +6941,9 @@ static void *ss_thread(void *data)
if (i & DAHDI_IOMUX_SIGEVENT) {
res = dahdi_get_event(p->subs[index].dfd);
ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
+ if (res == DAHDI_EVENT_NOALARM) {
+ p->inalarm = 0;
+ }
res = 0;
/* Let us detect callerid when the telco uses distinctive ring */
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index ac58c7703..26da02344 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -19,6 +19,7 @@
/*! \file
*
* \brief Implementation of Inter-Asterisk eXchange Version 2
+ * as specified in RFC 5456
*
* \author Mark Spencer <markster@digium.com>
*
@@ -912,8 +913,8 @@ static void __attribute__((format(printf, 1, 2))) jb_debug_output(const char *fm
ast_verbose("%s", buf);
}
-/* XXX We probably should use a mutex when working with this XXX */
-static struct chan_iax2_pvt *iaxs[IAX_MAX_CALLS];
+/* IAX_MAX_CALLS + 1 to avoid the off by one error case when accessing the max call number */
+static struct chan_iax2_pvt *iaxs[IAX_MAX_CALLS + 1];
static ast_mutex_t iaxsl[ARRAY_LEN(iaxs)];
/*!
@@ -936,7 +937,7 @@ static struct ao2_container *iax_transfercallno_pvts;
/* Flag to use with trunk calls, keeping these calls high up. It halves our effective use
but keeps the division between trunked and non-trunked better. */
-#define TRUNK_CALL_START ARRAY_LEN(iaxs) / 2
+#define TRUNK_CALL_START IAX_MAX_CALLS / 2
static int maxtrunkcall = TRUNK_CALL_START;
static int maxnontrunkcall = 1;
@@ -7087,9 +7088,14 @@ static int try_transfer(struct chan_iax2_pvt *pvt, struct iax_ies *ies)
memcpy(&pvt->transfer, &new, sizeof(pvt->transfer));
inet_aton(newip, &pvt->transfer.sin_addr);
pvt->transfer.sin_family = AF_INET;
- pvt->transferring = TRANSFER_BEGIN;
pvt->transferid = ies->transferid;
- store_by_transfercallno(pvt);
+ /* only store by transfercallno if this is a new transfer,
+ * just in case we get a duplicate TXREQ */
+ if (pvt->transferring == TRANSFER_NONE) {
+ store_by_transfercallno(pvt);
+ }
+ pvt->transferring = TRANSFER_BEGIN;
+
if (ies->transferid)
iax_ie_append_int(&ied, IAX_IE_TRANSFERID, ies->transferid);
send_command_transfer(pvt, AST_FRAME_IAX, IAX_COMMAND_TXCNT, 0, ied.buf, ied.pos);
@@ -7196,7 +7202,7 @@ static int complete_transfer(int callno, struct iax_ies *ies)
pvt->voiceformat = 0;
pvt->svideoformat = -1;
pvt->videoformat = 0;
- pvt->transfercallno = -1;
+ pvt->transfercallno = 0;
memset(&pvt->rxcore, 0, sizeof(pvt->rxcore));
memset(&pvt->offset, 0, sizeof(pvt->offset));
/* reset jitterbuffer */
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 410151f1a..01897a532 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -212,37 +212,8 @@ static int local_queue_frame(struct local_pvt *p, int isoutbound, struct ast_fra
}
if (other) {
- if (f->frametype == AST_FRAME_CONTROL) {
- switch (f->subclass) {
- case AST_CONTROL_RINGING:
+ if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_RINGING) {
ast_setstate(other, AST_STATE_RINGING);
- break;
- case AST_CONTROL_ANSWER:
- ast_setstate(other, AST_STATE_UP);
- break;
- case AST_CONTROL_BUSY:
- ast_setstate(other, AST_STATE_BUSY);
- break;
-
- /* not going to handle these */
- case AST_CONTROL_HANGUP:
- case AST_CONTROL_RING:
- case AST_CONTROL_TAKEOFFHOOK:
- case AST_CONTROL_OFFHOOK:
- case AST_CONTROL_CONGESTION:
- case AST_CONTROL_FLASH:
- case AST_CONTROL_WINK:
- case AST_CONTROL_OPTION:
- case AST_CONTROL_RADIO_KEY:
- case AST_CONTROL_RADIO_UNKEY:
- case AST_CONTROL_PROGRESS:
- case AST_CONTROL_PROCEEDING:
- case AST_CONTROL_HOLD:
- case AST_CONTROL_UNHOLD:
- case AST_CONTROL_VIDUPDATE:
- case AST_CONTROL_SRCUPDATE:
- break;
- }
}
ast_queue_frame(other, f);
ast_channel_unlock(other);
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 4ec3236ef..9d60ac384 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -301,13 +301,6 @@ struct chan_list {
struct ast_dsp *dsp;
/*!
- * \brief Allocated audio frame sample translator
- * \note ast_translator_build_path() creates the translator path.
- * \note Must use ast_translator_free_path() to clean up.
- */
- struct ast_trans_pvt *trans;
-
- /*!
* \brief Associated Asterisk channel structure.
*/
struct ast_channel * ast;
@@ -2117,8 +2110,6 @@ static int read_config(struct chan_list *ch, int orig)
else
ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT );
}
- if (!ch->trans)
- ch->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
}
/* AOCD initialization */
@@ -2374,11 +2365,6 @@ static int misdn_digit_end(struct ast_channel *ast, char digit, unsigned int dur
}
break;
default:
- /* Do not send Digits in CONNECTED State, when
- * the other side is too mISDN. */
- if (p->other_ch )
- return 0;
-
if ( bc->send_dtmf )
send_digit_to_chan(p,digit);
break;
@@ -2705,21 +2691,17 @@ static int misdn_hangup(struct ast_channel *ast)
static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame *frame)
{
- struct ast_frame *f,*f2;
+ struct ast_frame *f;
- if (tmp->trans) {
- f2 = ast_translate(tmp->trans, frame, 0);
- f = ast_dsp_process(tmp->ast, tmp->dsp, f2);
+ if (tmp->dsp) {
+ f = ast_dsp_process(tmp->ast, tmp->dsp, frame);
} else {
- chan_misdn_log(0, tmp->bc->port, "No T-Path found\n");
+ chan_misdn_log(0, tmp->bc->port, "No DSP-Path found\n");
return NULL;
}
if (!f || (f->frametype != AST_FRAME_DTMF)) {
- if (f) {
- ast_frfree(f);
- }
- return frame;
+ return f;
}
ast_log(LOG_DEBUG, "Detected inband DTMF digit: %c\n", f->subclass);
@@ -3635,8 +3617,6 @@ static void cl_dequeue_chan(struct chan_list **list, struct chan_list *chan)
if (chan->dsp)
ast_dsp_free(chan->dsp);
- if (chan->trans)
- ast_translator_free_path(chan->trans);
ast_mutex_lock(&cl_te_lock);
if (!*list) {
@@ -5684,8 +5664,6 @@ static int misdn_set_opt_exec(struct ast_channel *chan, void *data)
ch->dsp = ast_dsp_new();
if (ch->dsp)
ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT| DSP_FEATURE_FAX_DETECT);
- if (!ch->trans)
- ch->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
}
if (ch->ast_dsp) {
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 82516a21c..618fdd7ca 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13092,6 +13092,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
}
break;
case 488: /* Not acceptable here */
+ case 606: /* Not Acceptable */
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (reinvite && p->udptl) {
/* If this is a T.38 call, we should go back to
@@ -13646,6 +13647,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
handle_response_invite(p, resp, rest, req, seqno);
break;
case 488: /* Not acceptable here - codec error */
+ case 606: /* Not Acceptable */
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, seqno);
break;
@@ -14763,6 +14765,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
int gotdest;
const char *p_replaces;
char *replace_id = NULL;
+ int refer_locked = 0;
const char *required;
unsigned int required_profile = 0;
struct ast_channel *c = NULL; /* New channel */
@@ -14786,7 +14789,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
p->invitestate = INV_COMPLETED;
if (!p->lastinvite)
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- return -1;
+ res = -1;
+ goto request_invite_cleanup;
}
}
@@ -14806,7 +14810,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
transmit_response(p, "482 Loop Detected", req);
p->invitestate = INV_COMPLETED;
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
} else {
/* This is a spiral. What we need to do is to just change the outgoing INVITE
* so that it now routes to the new Request URI. Since we created the INVITE ourselves
@@ -14831,7 +14836,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
*/
ast_string_field_set(p->owner, call_forward, peerorhost);
ast_queue_control(p->owner, AST_CONTROL_BUSY);
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
}
}
@@ -14870,7 +14876,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
if (option_debug)
ast_log(LOG_DEBUG, "Got INVITE on call where we already have pending INVITE, deferring that - %s\n", p->callid);
/* Don't destroy dialog here */
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
}
}
@@ -14888,7 +14895,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
ast_log(LOG_DEBUG, "INVITE w Replaces on existing call? Refusing action. [%s]\n", p->callid);
transmit_response_reliable(p, "400 Bad request", req); /* The best way to not not accept the transfer */
/* Do not destroy existing call */
- return -1;
+ res = -1;
+ goto request_invite_cleanup;
}
if (sipdebug && option_debug > 2)
@@ -14902,7 +14910,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
append_history(p, "Xfer", "INVITE/Replace Failed. Out of memory.");
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
p->invitestate = INV_COMPLETED;
- return -1;
+ res = -1;
+ goto request_invite_cleanup;
}
/* Todo: (When we find phones that support this)
@@ -14938,6 +14947,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-existent call id (%s)!\n", replace_id);
transmit_response_reliable(p, "481 Call Leg Does Not Exist (Replaces)", req);
error = 1;
+ } else {
+ refer_locked = 1;
}
/* At this point, bot the pvt and the owner of the call to be replaced is locked */
@@ -14977,8 +14988,10 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
ast_channel_unlock(p->refer->refer_call->owner);
}
}
+ refer_locked = 0;
p->invitestate = INV_COMPLETED;
- return -1;
+ res = -1;
+ goto request_invite_cleanup;
}
}
@@ -15010,7 +15023,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
transmit_response_reliable(p, "488 Not acceptable here", req);
if (!p->lastinvite)
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- return -1;
+ res = -1;
+ goto request_invite_cleanup;
}
ast_queue_control(p->owner, AST_CONTROL_SRCUPDATE);
} else {
@@ -15040,7 +15054,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
res = check_user(p, req, SIP_INVITE, e, XMIT_RELIABLE, sin);
if (res == AUTH_CHALLENGE_SENT) {
p->invitestate = INV_COMPLETED; /* Needs to restart in another INVITE transaction */
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
}
if (res < 0) { /* Something failed in authentication */
if (res == AUTH_FAKE_AUTH) {
@@ -15053,7 +15068,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
p->invitestate = INV_COMPLETED;
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
ast_string_field_free(p, theirtag);
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
+
}
/* We have a succesful authentication, process the SDP portion if there is one */
@@ -15065,7 +15082,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
if (option_debug)
ast_log(LOG_DEBUG, "No compatible codecs for this SIP call.\n");
- return -1;
+ res = -1;
+ goto request_invite_cleanup;
}
if (ast_test_flag(&p->flags[1], SIP_PAGE2_CONSTANT_SSRC)) {
if (p->rtp) {
@@ -15102,7 +15120,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
p->invitestate = INV_COMPLETED;
}
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
}
gotdest = get_destination(p, NULL); /* Get destination right away */
get_rdnis(p, NULL); /* Get redirect information */
@@ -15129,7 +15148,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
p->invitestate = INV_COMPLETED;
update_call_counter(p, DEC_CALL_LIMIT);
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- return 0;
+ res = 0;
+ goto request_invite_cleanup;
} else {
/* If no extension was specified, use the s one */
/* Basically for calling to IP/Host name only */
@@ -15169,7 +15189,10 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
/* Go and take over the target call */
if (sipdebug && option_debug > 3)
ast_log(LOG_DEBUG, "Sending this call to the invite/replcaes handler %s\n", p->callid);
- return handle_invite_replaces(p, req, debug, ast_test_flag(req, SIP_PKT_IGNORE), seqno, sin, nounlock);
+
+ res = handle_invite_replaces(p, req, debug, ast_test_flag(req, SIP_PKT_IGNORE), seqno, sin, nounlock);
+ refer_locked = 0;
+ goto request_invite_cleanup;
}
@@ -15357,6 +15380,17 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
}
}
return res;
+
+request_invite_cleanup:
+
+ if (refer_locked && p->refer && p->refer->refer_call) {
+ ast_mutex_unlock(&p->refer->refer_call->lock);
+ if (p->refer->refer_call->owner) {
+ ast_channel_unlock(p->refer->refer_call->owner);
+ }
+ }
+
+ return res;
}
/*! \brief Find all call legs and bridge transferee with target
diff --git a/configs/cdr.conf.sample b/configs/cdr.conf.sample
index 693b28092..5e5ebb0d9 100644
--- a/configs/cdr.conf.sample
+++ b/configs/cdr.conf.sample
@@ -21,6 +21,12 @@
; mode, you will see one CDR, with one of the call targets on one side, and the originating
; channel on the other, and then one CDR for each channel attempted. This may seem
; redundant, but cannot be helped.
+;
+; In brief, this option controls the reporting of unanswered calls which only have an A
+; party. Calls which get offered to an outgoing line, but are unanswered, are still
+; logged, and that is the intended behaviour. (It also results in some B side CDRs being
+; output, as they have the B side channel as their source channel, and no destination
+; channel.)
;unanswered = no
; Define the CDR batch mode, where instead of posting the CDR at the end of
diff --git a/configs/extensions.conf.sample b/configs/extensions.conf.sample
index c9447cf6b..0b900fd3d 100644
--- a/configs/extensions.conf.sample
+++ b/configs/extensions.conf.sample
@@ -308,7 +308,7 @@ exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxt
; International long distance through trunk
;
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
-exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
+exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0123456789,${EXTEN:${GLOBAL(TRUNKMSD)}})})
[trunkld]
;
@@ -578,7 +578,7 @@ include => demo
; An extension like the one below can be used for FWD, Nikotel, sipgate etc.
; Note that you must have a [sipprovider] section in sip.conf
;
-;exten => _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,,r)
+;exten => _41X.,1,Dial(SIP/${FILTER(0123456789,${EXTEN:2})}@sipprovider,,r)
; Real extensions would go here. Generally you want real extensions to be
; 4 or 5 digits long (although there is no such requirement) and start with a
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 39e906101..7f86d060f 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -118,32 +118,40 @@ previously based upon) were included in the new section. For example
consider the following:
[foo]
-permit=192.168.0.2
-host=asdf
-deny=192.168.0.1
+disallow=all
+allow=ulaw
+allow=alaw
[bar]
-permit=192.168.1.2
-host=jkl
-deny=192.168.1.1
+allow=gsm
+allow=g729
+permit=192.168.2.1
[baz](foo,bar)
+type=friend
permit=192.168.3.1
+context=incoming
host=bnm
-The [baz] section will be processed as though it had been written in the
+The [baz] section will be processed as though it had been written in the
following way:
[baz]
-permit=192.168.0.2
-host=asdf
-deny=192.168.0.1
-permit=192.168.1.2
-host=jkl
-deny=192.168.1.1
+disallow=all
+allow=ulaw
+allow=alaw
+allow=gsm
+allow=g729
+permit=192.168.2.1
+type=friend
permit=192.168.3.1
+context=incoming
host=bnm
+It should also be noted that there are no guaranteed overriding semantics,
+meaning that if you define something in one template, you should not expect to
+be able to override it by defining it again in another template.
+
Additional Examples:
--------------------
diff --git a/doc/imapstorage.txt b/doc/imapstorage.txt
index 5c601278d..521c59129 100644
--- a/doc/imapstorage.txt
+++ b/doc/imapstorage.txt
@@ -144,6 +144,12 @@ IMAP folders at the same level of hierarchy as the INBOX. These will be
used as alternate folders for storing voicemail messages to mimic the
behavior of the current (file-based) voicemail system.
+Please note that it is not recommended to store your voicemails in the top
+level folder where your users will keep their emails, especially if there
+are a large number of emails. A large number of emails in the same folder(s)
+that you're storing your voicemails could cause a large delay as Asterisk must
+parse through all the emails. For example a mailbox with 100 emails in it could
+take up to 60 seconds to receive a response.
==================================
Separate vs. Shared Email Accounts
diff --git a/doc/localchannel.txt b/doc/localchannel.txt
index 33b9fbc2f..c70181541 100644
--- a/doc/localchannel.txt
+++ b/doc/localchannel.txt
@@ -1,51 +1,424 @@
-The Local channel
------------------
+==================
+| Local Channels |
+==================
-chan_local is a pseudo-channel. Use of this channel simply loops calls back into the dialplan in a different context. Useful for recursive routing.
+In Asterisk, Local channels are a method used to treat an extension in the
+dialplan as if it were an external device. In essense, Asterisk will send the
+call back into the dialplan as the destination of the call, versus sending the
+call to a device.
-* Syntax:
+Two of the most common areas where Local channels are used include members
+configured for queues, and in use with callfiles. There are also other uses
+where you want to ring two destinations, but with different information, such as
+different callerID for each outgoing request.
- Local/extension@context[/nm]
-Adding "/n" at the end of the string will make the Local channel not do a native transfer (the "n" stands for "n"o release) upon the remote end answering the line. This is an esoteric, but important feature if you expect the Local channel to handle calls exactly like a normal channel. If you do not have the "no release" feature set, then as soon as the destination (inside of the Local channel) answers the line and one audio frame passes, the variables and dial plan will revert back to that of the original call, and the Local channel will become a zombie and be removed from the active channels list. This is desirable in some circumstances, but can result in unexpected dialplan behavior if you are doing fancy things with variables in your call handling.
+Examples
+========
-Adding "/m" at the end will cause chan_local to forward music on hold start and stop requests. Normally chan_local acts on them and it is started or stopped on the Local channel itself.
+Local channels are best demonstrated through the use of an example. Our first
+example isn't terribly useful, but will demonstrate how Local channels can
+execute dialplan logic by dialing from the Dial() application.
-* Purpose:
-The Local channel construct can be used to establish dialing into any part of the dialplan.
+-----------------------------
+Trivial Local channel example
+-----------------------------
-Imagine you have a TE410P in your box. You want to do something for which you must use a Dial statement (for instance when dropping files in /var/spool/outgoing) but you do want to be able to use your dialplans least-cost-routes or other intelligent stuff. What you could do before we had chan_local was create a cross-link between two ports of the TE410P and then Dial out one port and in the other. This way you could control where the call was going.
+In our dialplan (extensions.conf), we can Dial() another part of the dialplan
+through the use Local channels. To do this, we can use the following dialplan:
-Of course, this was a nasty hack, and to make it more sensible, chan_local was built.
+[devices]
+exten => 201,1,Verbose(2,Dial another part of the dialplan via the Local chan)
+exten => 201,n,Verbose(2,Outside channel: ${CHANNEL})
+exten => 201,n,Dial(Local/201@extensions)
+exten => 201,n,Hangup()
-The "Local" channel driver allows you to convert an arbitrary extension into a channel. It is used in a variety of places, including agents, etc.
+[extensions]
+exten => 201,1,Verbose(2,Made it to the Local channel)
+exten => 201,n,Verbose(2,Inside channel: ${CHANNEL})
+exten => 201,n,Dial(SIP/some-named-extension,30)
+exten => 201,n,Hangup()
-This also allows us to hop to contexts like a GoSub routine; See examples below.
+The output of the dialplan would look something like the following. The output
+has been broken up with some commentary to explain what we're looking at.
-Examples:
----------
+ -- Executing [201@devices:1] Verbose("SIP/my_desk_phone-00000014", "2,Dial another part of the dialplan via the Local chan") in new stack
+ == Dial another part of the dialplan via the Local chan
-[inbound] ; here falls all incoming calls
-exten => s,1,Answer
-exten => s,2,Dial(local/200@internal,30,r)
-exten => s,3,Playback(sorrynoanswer)
-exten => s,4,Hangup
+We dial extension 201 from SIP/my_desk_phone which has entered the [devices]
+context. The first line simply outputs some information via the Verbose()
+application.
-[internal] ; here where our phones falls for default
-exten => 200,1,Dial(sip/blah)
-exten => 200,102,VoiceMail(${EXTEN}@default)
-
-exten => 201,1,Dial(zap/1)
-exten => 201,102,VoiceMail(${EXTEN}@default)
-exten => _0.,1,Dial(Zap/g1/${EXTEN:1}) ; outgoing calls with 0+number
+ -- Executing [201@devices:2] Verbose("SIP/my_desk_phone-00000014", "2,Outside channel: SIP/my_desk_phone-00000014") in new stack
+ == Outside channel: SIP/my_desk_phone-00000014
+The next line is another Verbose() application statement that tells us our
+current channel name. We can see that the channel executing the current dialplan
+is a desk phone (aptly named 'my_desk_phone').
-Caveats:
-If you use chan_local from a call-file and you want to pass channel variables into your context, make sure you append the '/n', because otherwise chan_local will 'optimize' itself out of the call-path, and the variables will get lost. i.e.
- Local/00531234567@pbx becomes Local/00531234567@pbx/n
+ -- Executing [201@devices:3] Dial("SIP/my_desk_phone-00000014", "Local/201@extensions") in new stack
+ -- Called 201@extensions
-----------
-2004-01-17
+Now the third step in our dialplan executes the Dial() application which calls
+extension 201 in the [extensions] context of our dialplan. There is no
+requirement that we use the same extension number -- we could have just as
+easily used a named extension, or some other number. Remember that we're dialing
+another channel, but instead of dialing a device, we're "dialing" another part
+of the dialplan.
+
+
+ -- Executing [201@extensions:1] Verbose("Local/201@extensions-7cf4;2", "2,Made it to the Local channel") in new stack
+ == Made it to the Local channel
+
+Now we've verified we've dialed another part of the dialplan. We can see the
+channel executing the dialplan has changed to Local/201@extensions-7cf4;2. The
+part '-7cf4;2' is just the unique identifier, and will be different for you.
+
+
+ -- Executing [201@extensions:2] Verbose("Local/201@extensions-7cf4;2", "2,Inside channel: Local/201@extensions-7cf4;2") in new stack
+ == Inside channel: Local/201@extensions-7cf4;2
+
+Here we use the Verbose() application to see what our current channel name is.
+As you can see the current channel is a Local channel which we created from our
+SIP channel.
+
+
+ -- Executing [201@extensions:3] Dial("Local/201@extensions-7cf4;2", "SIP/some-named-extension,30") in new stack
+
+And from here, we're using another Dial() application to call a SIP device
+configured in sip.conf as [some-named-extension].
+
+Now that we understand a simple example of calling the Local channel, let's
+expand upon this example by using Local channels to call two devices at the same
+time, but delay calling one of the devices.
+
+---------------------
+Delay dialing devices
+---------------------
+
+Lets say when someone calls extension 201, we want to ring both the desk phone
+and their cellphone at the same time, but we want to wait about 6 seconds to
+start dialing the cellphone. This is useful in a situation when someone might be
+sitting at their desk, but don't want both devices ringing at the same time, but
+also doesn't want to wait for the full ring cycle to execute on their desk phone
+before rolling over to their cellphone.
+
+The dialplan for this would look something like the following:
+
+[devices]
+exten => 201,1,Verbose(2,Call desk phone and cellphone but with delay)
+exten => 201,n,Dial(Local/deskphone-201@extensions&Local/cellphone-201@extensions,30)
+exten => 201,n,Voicemail(201@default,${IF($[${DIALSTATUS} = BUSY]?b:u)})
+exten => 201,n,Hangup()
+
+[extensions]
+; Dial the desk phone
+exten => deskphone-201,1,Verbose(2,Dialing desk phone of extension 201)
+exten => deskphone-201,n,Dial(SIP/0004f2040001) ; SIP device with MAC address
+ ; of 0004f2040001
+
+; Dial the cellphone
+exten => cellphone-201,1,Verbose(2,Dialing cellphone of extension 201)
+exten => cellphone-201,n,Verbose(2,-- Waiting 6 seconds before dialing)
+exten => cellphone-201,n,Wait(6)
+exten => cellphone-201,n,Dial(DAHDI/g0/14165551212)
+
+
+When someone dials extension 201 in the [devices] context, it will execute the
+Dial() application, and call two Local channels at the same time:
+
+ * Local/deskphone-201@extensions
+ * Local/cellphone-201@extensions
+
+It will then ring both of those extensions for 30 seconds before rolling over to
+the Voicemail() application and playing the appropriate voicemail recording
+depending on whether the ${DIALSTATUS} variable returned BUSY or not.
+
+When reaching the deskphone-201 extension, we execute the Dial() application
+which calls the SIP device configured as '0004f204001' (the MAC address of the
+device). When reaching the cellphone-201 extension, we dial the cellphone via
+the DAHDI channel using group zero (g0) and dialing phone number 1-416-555-1212.
+
+
+-----------------------------------------------
+Dialing destinations with different information
+-----------------------------------------------
+
+With Asterisk, we can place a call to multiple destinations by separating the
+technology/destination pair with an ampersand (&). For example, the following
+Dial() line would ring two separate destinations for 30 seconds:
+
+exten => 201,1,Dial(SIP/0004f2040001&DAHDI/g0/14165551212,30)
+
+That line would dial both the SIP/0004f2040001 device (likely a SIP device on
+the network) and dial the phone number 1-416-555-1212 via a DAHDI interface. In
+our example though, we would be sending the same callerID information to both
+end points, but perhaps we want to send a different callerID to one of the
+destinations?
+
+We can send different callerIDs to each of the destinations if we want by using
+the Local channel. The following example shows how this is possible because we
+would Dial() two different Local channels from our top level Dial(), and that
+would then execute some dialplan before sending the call off to the final
+destinations.
+
+[devices]
+exten => 201,1,NoOp()
+exten => 201,n,Dial(Local/201@internal&Local/201@external,30)
+exten => 201,n,Voicemail(201@default,${IF($[${DEVICE_STATE} = BUSY]?b:u)})
+exten => 201,n,Hangup()
+
+[internal]
+exten => 201,1,Verbose(2,Placing internal call for extension 201)
+exten => 201,n,Set(CALLERID(name)=From Sales)
+exten => 201,n,Dial(SIP/0004f2040001,30)
+
+[external]
+exten => 201,1,Verbose(2,Placing external call for extension 201)
+exten => 201,n,Set(CALLERID(name)=Acme Cleaning)
+exten => 201,n,Dial(DAHDI/g0/14165551212)
+
+
+With the dialplan above, we've sent two different callerIDs to the destinations:
+
+ * "From Sales" was sent to the local device SIP/0004f2040001
+ * "Acme Cleaning" was sent to the remote number 1-416-555-1212 via DAHDI
+
+Because each of the channels is independent from the other, you could perform
+any other call manipulation you need. Perhaps the 1-416-555-1212 number is a
+cell phone and you know you can only ring that device for 18 seconds before the
+voicemail would pick up. You could then limit the length of time the external
+number is dialed, but still allow the internal device to be dialed for a longer
+period of time.
+
+----------------------------------
+Using callfiles and Local channels
+----------------------------------
+
+Another example is to use callfiles and Local channels so that you can execute
+some dialplan prior to performing a Dial(). We'll construct a callfile which
+will then utilize a Local channel to lookup a bit of information in the AstDB
+and then place a call via the channel configured in the AstDB.
+
+First, lets construct our callfile that will use the Local channel to do some
+lookups prior to placing our call. More information on constructing callfiles is
+located in the doc/callfiles.txt file of your Asterisk source.
+
+Our callfile will simply look like the following:
+
+Channel: Local/201@devices
+Application: Playback
+Data: silence/1&tt-weasels
+
+Add the callfile information to a file such as 'callfile.new' or some other
+appropriately named file.
+
+Our dialplan will perform a lookup in the AstDB to determine which device to
+call, and will then call the device, and upon answer, Playback() the silence/1
+(1 second of silence) and the tt-weasels sound files.
+
+Before looking at our dialplan, lets put some data into AstDB that we can then
+lookup from the dialplan. From the Asterisk CLI, run the following command:
+
+*CLI> database put phones 201/device SIP/0004f2040001
+
+We've now put the device destination (SIP/0004f2040001) into the 201/device key
+within the phones family. This will allow us to lookup the device location for
+extension 201 from the database.
+
+We can then verify our entry in the database using the 'database show' CLI
+command:
+
+*CLI> database show
+/phones/201/device : SIP/0004f2040001
+
+Now lets create the dialplan that will allow us to call SIP/0004f2040001 when we
+request extension 201 from the [extensions] context via our Local channel.
+
+[devices]
+exten => 201,1,NoOp()
+exten => 201,n,Set(DEVICE=${DB(phones/${EXTEN}/device)})
+exten => 201,n,GotoIf($[${ISNULL(${DEVICE})}]?hangup) ; if nothing returned,
+ ; then hangup
+exten => 201,n,Dial(${DEVICE},30)
+exten => 201,n(hangup(),Hangup()
+
+
+Then, we can perform a call to our device using the callfile by moving it into
+the /var/spool/asterisk/outgoing/ directory.
+
+# mv callfile.new /var/spool/asterisks/outgoing
+
+Then after a moment, you should see output on your console similar to the
+following, and your device ringing. Information about what is going on during
+the output has also been added throughout.
+
+ -- Attempting call on Local/201@devices for application Playback(silence/1&tt-weasels) (Retry 1)
+
+You'll see the line above as soon as Asterisk gets the request from the
+callfile.
+
+ -- Executing [201@devices:1] NoOp("Local/201@devices-ecf0;2", "") in new stack
+ -- Executing [201@devices:2] Set("Local/201@devices-ecf0;2", "DEVICE=SIP/0004f2040001") in new stack
+
+This is where we performed our lookup in the AstDB. The value of
+SIP/0004f2040001 was then returned and saved to the DEVICE channel variable.
+
+ -- Executing [201@devices:3] GotoIf("Local/201@devices-ecf0;2", "0?hangup") in new stack
+
+We perform a check to make sure ${DEVICE} isn't NULL. If it is, we'll just
+hangup here.
+
+ -- Executing [201@devices:4] Dial("Local/201@devices-ecf0;2", "SIP/0004f2040001,30") in new stack
+ -- Called 000f2040001
+ -- SIP/0004f2040001-00000022 is ringing
+
+Now we call our device SIP/0004f2040001 from the Local channel.
+
+ -- SIP/0004f2040001-00000022 answered Local/201@devices-ecf0;2
+
+We answer the call.
+
+ > Channel Local/201@devices-ecf0;1 was answered.
+ > Launching Playback(silence/1&tt-weasels) on Local/201@devices-ecf0;1
+
+We then start playing back the files.
+
+ -- <Local/201@devices-ecf0;1> Playing 'silence/1.slin' (language 'en')
+ == Spawn extension (devices, 201, 4) exited non-zero on 'Local/201@devices-ecf0;2'
+
+At this point we now see the Local channel has been optimized out of the call
+path. This is important as we'll see in examples later. By default, the Local
+channel will try to optimize itself out of the call path as soon as it can. Now
+that the call has been established and audio is flowing, it gets out of the way.
+
+ -- <SIP/0004f2040001-00000022> Playing 'tt-weasels.ulaw' (language 'en')
+[Mar 1 13:35:23] NOTICE[16814]: pbx_spool.c:349 attempt_thread: Call completed to Local/201@devices
+
+We can now see the tt-weasels file is played directly to the destination
+(instead of through the Local channel which was optimized out of the call path)
+and then a NOTICE stating the call was completed.
+
+
+Understanding When To Use /n
+============================
+
+By default, the Local channel will try to optimize itself out of the call path.
+This means that once the Local channel has established the call between the
+destination and Asterisk, the Local channel will get out of the way and let
+Asterisk and the end point talk directly, instead of flowing through the Local
+channel.
+
+This can have some adverse effects when you're expecting information to be
+available during the call that gets associated with the Local channel. When the
+Local channel is optimized out of the call path, any Dial() flags, or channel
+variables associated with the Local channel are also destroyed and are no longer
+available to Asterisk.
+
+We can force the Local channel to remain in the call path by utilizing the /n
+directive. By adding /n to the end of the channel definition, we can keep the
+Local channel in the call path, along with any channel variables, or other
+channel specific information.
+
+For example, if we were calling a Local channel from the Dial() application, we
+could change:
+
+Dial(Local/201@devices)
+
+...into the following line:
+
+Dial(Local/201@devices/n)
+
+By adding /n to the end, our Local channel will now stay in the call path and
+not go away.
+
+Lets take a look at an example that demonstrates when the use of the /n
+directive is necessary. If we spawn a Local channel which then performs another
+Dial() to a SIP channel, but we use the L() option (which is used to limit the
+amount of time a call can be active, along with warning tones when the time is
+nearly up), it will be associated with the Local channel, which is then
+optimized out of the call path, and thus won't perform as expected.
+
+Here is an overview of our call flow, and the information associated with the
+channels:
+
+1) SIP device PHONE_A calls Asterisk via a SIP INVITE
+
+2) Asterisk accepts the INVITE and then starts processing dialplan logic
+
+3) Our dialplan calls Dial(Local/2@services) <-- notice no /n
+
+4) The Local channel then executes dialplan at extension 2 within the services
+ context
+
+5) Extension 2 within [services] then performs another Dial() to a SIP channel
+ with the line: Dial(SIP/PHONE_B,,L(60000:450000:15000))
+
+6) The call is then placed to SIP/PHONE_B which then answers the call.
+
+7) The Local channel containing the information for tracking the time allowance
+ of the call is then optimized out of the call path, losing all information
+ about when to terminate the call.
+
+8) SIP/PHONE_A and SIP/PHONE_B then continue talking indefinitely.
+
+Now, if we were to modify our dialplan at step three (3) then we would force the
+Local channel to stay in the call path, and the L() option associated with the
+Dial() from the Local channel would remain, and our warning sounds and timing
+would work as expected.
+
+There are two workarounds for the above described scenario:
+
+1) Use Dial(Local/2@services/n) to cause the Local channel to remain in the call
+ path so that the L() option used inside the Local channel is not discarded
+ when optimization is performed.
+
+2) Place the L() option outside of the Local channel so that when it is
+ optimized out of the call path, the information required to make L() work is
+ associated with the outside channel. For example:
+
+ Dial(Local/2@services,,L(60000:45000:15000))
+
+
+Local channel modifiers
+=======================
+
+There are additional modifiers for the Local channel as well. They include:
+
+ * 'n' -- Adding "/n" at the end of the string will make the Local channel not
+ do a native transfer (the "n" stands for "n"o release) upon the remote
+ end answering the line. This is an esoteric, but important feature if
+ you expect the Local channel to handle calls exactly like a normal
+ channel. If you do not have the "no release" feature set, then as soon
+ as the destination (inside of the Local channel) answers the line and
+ one audio frame passes, the variables and dial plan will revert back
+ to that of the original call, and the Local channel will become a
+ zombie and be removed from the active channels list. This is desirable
+ in some circumstances, but can result in unexpected dialplan behavior
+ if you are doing fancy things with variables in your call handling.
+
+ * 'j' -- Adding "/j" at the end of the string allows you to use the generic
+ jitterbuffer on incoming calls going to Asterisk applications. For
+ example, this would allow you to use a jitterbuffer for an incoming
+ SIP call to Voicemail by putting a Local channel in the middle. The
+ 'j' option must be used in conjunction with the 'n' option to make
+ sure that the Local channel does not get optimized out of the call.
+
+ This option is available starting in the Asterisk 1.6.0 branch.
+
+ * 'm' -- Using the "/m" option will cause the Local channel to forward music on
+ hold (MoH) start and stop requests. Normally the Local channel acts on
+ them and it is started or stopped on the Local channel itself. This
+ options allows those requests to be forwarded through the Local
+ channel.
+
+ This option is available starting in the Asterisk 1.4 branch.
+
+ * 'b' -- The "/b" option causes the Local channel to return the actual channel
+ that is behind it when queried. This is useful for transfer scenarios
+ as the actual channel will be transferred, not the Local channel.
+
+ This option is available starting in the Asterisk 1.6.0 branch.
diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl
index 68ccb4a17..ad0000736 100644
--- a/main/ast_expr2.fl
+++ b/main/ast_expr2.fl
@@ -415,7 +415,7 @@ int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
(extra_error_message_supplied?extra_error_message:""), s2, parseio->string,spacebuf2);
#endif
#ifndef STANDALONE
- ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
+ ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt.\n");
#endif
free(s2);
return(0);
diff --git a/main/ast_expr2f.c b/main/ast_expr2f.c
index 0a0b09450..b43123372 100644
--- a/main/ast_expr2f.c
+++ b/main/ast_expr2f.c
@@ -2534,7 +2534,7 @@ int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
(extra_error_message_supplied?extra_error_message:""), s2, parseio->string,spacebuf2);
#endif
#ifndef STANDALONE
- ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
+ ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt.\n");
#endif
free(s2);
return(0);
diff --git a/main/asterisk.c b/main/asterisk.c
index d4bf3e963..5730bc6fe 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -139,7 +139,7 @@ int daemon(int, int); /* defined in libresolv of all places */
/*! \brief Welcome message when starting a CLI interface */
#define WELCOME_MESSAGE \
- ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2009 Digium, Inc. and others.\n"); \
+ ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2010 Digium, Inc. and others.\n"); \
ast_verbose("Created by Mark Spencer <markster@digium.com>\n"); \
ast_verbose("Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.\n"); \
ast_verbose("This is free software, with components licensed under the GNU General Public\n"); \
@@ -2463,7 +2463,7 @@ static int show_version(void)
}
static int show_cli_help(void) {
- printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2009, Digium, Inc. and others.\n");
+ printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2010, Digium, Inc. and others.\n");
printf("Usage: asterisk [OPTIONS]\n");
printf("Valid Options:\n");
printf(" -V Display version number and exit\n");
@@ -2868,6 +2868,12 @@ int main(int argc, char *argv[])
if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
runuser = ast_config_AST_RUN_USER;
+ /* It's common on some platforms to clear /var/run at boot. Create the
+ * socket file directory before we drop privileges. */
+ if (mkdir(ast_config_AST_RUN_DIR, 0755) && errno != EEXIST) {
+ ast_log(LOG_WARNING, "Unable to create socket file directory. Remote consoles will not be able to connect! (%s)\n", strerror(x));
+ }
+
#ifndef __CYGWIN__
if (isroot)
@@ -2880,6 +2886,9 @@ int main(int argc, char *argv[])
ast_log(LOG_WARNING, "No such group '%s'!\n", rungroup);
exit(1);
}
+ if (chown(ast_config_AST_RUN_DIR, -1, gr->gr_gid)) {
+ ast_log(LOG_WARNING, "Unable to chgrp run directory to %d (%s)\n", (int) gr->gr_gid, rungroup);
+ }
if (setgid(gr->gr_gid)) {
ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", (int)gr->gr_gid, rungroup);
exit(1);
@@ -2902,6 +2911,9 @@ int main(int argc, char *argv[])
ast_log(LOG_WARNING, "No such user '%s'!\n", runuser);
exit(1);
}
+ if (chown(ast_config_AST_RUN_DIR, pw->pw_uid, -1)) {
+ ast_log(LOG_WARNING, "Unable to chown run directory to %d (%s)\n", (int) pw->pw_uid, runuser);
+ }
#ifdef HAVE_CAP
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0)) {
ast_log(LOG_WARNING, "Unable to keep capabilities.\n");
diff --git a/main/channel.c b/main/channel.c
index 6f4745617..a4ffd629d 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -1286,9 +1286,11 @@ void ast_channel_free(struct ast_channel *chan)
}
/* Get rid of each of the data stores on the channel */
+ ast_channel_lock(chan);
while ((datastore = AST_LIST_REMOVE_HEAD(&chan->datastores, entry)))
/* Free the data store */
ast_channel_datastore_free(datastore);
+ ast_channel_unlock(chan);
/* Lock and unlock the channel just to be sure nobody has it locked still
due to a reference that was stored in a datastore. (i.e. app_chanspy) */
@@ -5086,17 +5088,15 @@ int __ast_channel_unlock(struct ast_channel *chan, const char *filename, int lin
ast_log(LOG_DEBUG, ":::=== Still have %d locks (recursive)\n", count);
#endif
if (!res)
- if (option_debug)
- ast_log(LOG_DEBUG, "::::==== Channel %s was unlocked\n", chan->name);
- if (res == EINVAL) {
- if (option_debug)
- ast_log(LOG_DEBUG, "::::==== Channel %s had no lock by this thread. Failed unlocking\n", chan->name);
- }
+ ast_log(LOG_DEBUG, "::::==== Channel %s was unlocked\n", chan->name);
+ if (res == EINVAL) {
+ ast_log(LOG_DEBUG, "::::==== Channel %s had no lock by this thread. Failed unlocking\n", chan->name);
}
- if (res == EPERM) {
- /* We had no lock, so okay any way*/
- if (option_debug > 3)
- ast_log(LOG_DEBUG, "::::==== Channel %s was not locked at all \n", chan->name);
+ }
+ if (res == EPERM) {
+ /* We had no lock, so okay any way*/
+ if (option_debug > 3)
+ ast_log(LOG_DEBUG, "::::==== Channel %s was not locked at all \n", chan->name);
res = 0;
}
return res;
@@ -5126,13 +5126,11 @@ int __ast_channel_lock(struct ast_channel *chan, const char *filename, int linen
if (!res)
ast_log(LOG_DEBUG, "::::==== Channel %s was locked\n", chan->name);
if (res == EDEADLK) {
- /* We had no lock, so okey any way */
- if (option_debug > 3)
+ /* We had no lock, so okey any way */
ast_log(LOG_DEBUG, "::::==== Channel %s was not locked by us. Lock would cause deadlock.\n", chan->name);
}
if (res == EINVAL) {
- if (option_debug > 3)
- ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name);
+ ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name);
}
}
return res;
@@ -5162,15 +5160,13 @@ int __ast_channel_trylock(struct ast_channel *chan, const char *filename, int li
ast_log(LOG_DEBUG, "::::==== Channel %s was locked\n", chan->name);
if (res == EBUSY) {
/* We failed to lock */
- if (option_debug > 2)
- ast_log(LOG_DEBUG, "::::==== Channel %s failed to lock. Not waiting around...\n", chan->name);
+ ast_log(LOG_DEBUG, "::::==== Channel %s failed to lock. Not waiting around...\n", chan->name);
}
if (res == EDEADLK) {
/* We had no lock, so okey any way*/
- if (option_debug > 2)
- ast_log(LOG_DEBUG, "::::==== Channel %s was not locked. Lock would cause deadlock.\n", chan->name);
+ ast_log(LOG_DEBUG, "::::==== Channel %s was not locked. Lock would cause deadlock.\n", chan->name);
}
- if (res == EINVAL && option_debug > 2)
+ if (res == EINVAL)
ast_log(LOG_DEBUG, "::::==== Channel %s lock failed. No mutex.\n", chan->name);
}
return res;
diff --git a/main/loader.c b/main/loader.c
index 98284b178..5d79e5371 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -449,26 +449,39 @@ static struct ast_module *load_dynamic_module(const char *resource_in, enum modu
void ast_module_shutdown(void)
{
struct ast_module *mod;
- AST_LIST_HEAD_NOLOCK_STATIC(local_module_list, ast_module);
-
- /* We have to call the unload() callbacks in reverse order that the modules
- * exist in the module list so it is the reverse order of how they were
- * loaded. */
+ int somethingchanged = 1, final = 0;
AST_LIST_LOCK(&module_list);
- while ((mod = AST_LIST_REMOVE_HEAD(&module_list, entry)))
- AST_LIST_INSERT_HEAD(&local_module_list, mod, entry);
- AST_LIST_UNLOCK(&module_list);
- while ((mod = AST_LIST_REMOVE_HEAD(&local_module_list, entry))) {
- if (mod->info->unload)
- mod->info->unload();
- /* Since this should only be called when shutting down "gracefully",
- * all channels should be down before we get to this point, meaning
- * there will be no module users left. */
- AST_LIST_HEAD_DESTROY(&mod->users);
- free(mod);
- }
+ /*!\note Some resources, like timers, are started up dynamically, and thus
+ * may be still in use, even if all channels are dead. We must therefore
+ * check the usecount before asking modules to unload. */
+ do {
+ if (!somethingchanged) {
+ /*!\note If we go through the entire list without changing
+ * anything, ignore the usecounts and unload, then exit. */
+ final = 1;
+ }
+
+ /* Reset flag before traversing the list */
+ somethingchanged = 0;
+
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&module_list, mod, entry) {
+ if (!final && mod->usecount) {
+ continue;
+ }
+ AST_LIST_REMOVE_CURRENT(&module_list, entry);
+ if (mod->info->unload) {
+ mod->info->unload();
+ }
+ AST_LIST_HEAD_DESTROY(&mod->users);
+ free(mod);
+ somethingchanged = 1;
+ }
+ AST_LIST_TRAVERSE_SAFE_END;
+ } while (somethingchanged && !final);
+
+ AST_LIST_UNLOCK(&module_list);
}
int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode force)
diff --git a/main/logger.c b/main/logger.c
index e1913eed3..99ab0b288 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -785,7 +785,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf,
"[%s] %s[%ld] %s: ",
date, levels[level], (long)GETTID(), file);
- res = fprintf(chan->fileptr, "%s", buf->str);
+ res = fprintf(chan->fileptr, "%s", term_strip(buf->str, buf->str, strlen(buf->str) + 1));
if (res <= 0 && !ast_strlen_zero(buf->str)) { /* Error, no characters printed */
fprintf(stderr,"**** Asterisk Logging Error: ***********\n");
if (errno == ENOMEM || errno == ENOSPC) {
diff --git a/main/rtp.c b/main/rtp.c
index a124bb745..4f54b71a5 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -944,6 +944,10 @@ struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp)
}
i += 2; /* Advance past header and ssrc */
+ if (rc == 0 && pt == RTCP_PT_RR) { /* We're receiving a receiver report with no reports, which is ok */
+ position += (length + 1);
+ continue;
+ }
switch (pt) {
case RTCP_PT_SR:
diff --git a/res/res_features.c b/res/res_features.c
index f1430a2de..fa938087a 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>chan_local</depend>
+ <depend>res_adsi</depend>
***/
#include "asterisk.h"
@@ -1786,6 +1787,9 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
if (peer_cdr && !ast_strlen_zero(peer_cdr->userfield)) {
ast_copy_string(bridge_cdr->userfield, peer_cdr->userfield, sizeof(bridge_cdr->userfield));
}
+ if (peer_cdr && ast_strlen_zero(peer->accountcode)) {
+ ast_cdr_setaccount(peer, chan->accountcode);
+ }
} else {
/* better yet, in a xfer situation, find out why the chan cdr got zapped (pun unintentional) */
bridge_cdr = ast_cdr_alloc(); /* this should be really, really rare/impossible? */
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 30aa8105a..803bca2d1 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -157,20 +157,20 @@ int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
/* Determine file names */
if (!ast_strlen_zero(fname_base)) {
int directory = strchr(fname_base, '/') ? 1 : 0;
- const char *absolute = *fname_base == '/' ? "" : "/";
+ const char *absolute = *fname_base == '/' ? "" : ast_config_AST_MONITOR_DIR;
/* try creating the directory just in case it doesn't exist */
if (directory) {
char *name = strdup(fname_base);
- snprintf(tmp, sizeof(tmp), "mkdir -p \"%s\"",dirname(name));
+ snprintf(tmp, sizeof(tmp), "mkdir -p \"%s/%s\"", absolute, dirname(name));
free(name);
ast_safe_system(tmp);
}
- snprintf(monitor->read_filename, FILENAME_MAX, "%s%s%s-in",
- directory ? "" : ast_config_AST_MONITOR_DIR, absolute, fname_base);
- snprintf(monitor->write_filename, FILENAME_MAX, "%s%s%s-out",
- directory ? "" : ast_config_AST_MONITOR_DIR, absolute, fname_base);
- snprintf(monitor->filename_base, FILENAME_MAX, "%s%s%s",
- directory ? "" : ast_config_AST_MONITOR_DIR, absolute, fname_base);
+ snprintf(monitor->read_filename, FILENAME_MAX, "%s/%s-in",
+ absolute, fname_base);
+ snprintf(monitor->write_filename, FILENAME_MAX, "%s/%s-out",
+ absolute, fname_base);
+ snprintf(monitor->filename_base, FILENAME_MAX, "%s/%s",
+ absolute, fname_base);
} else {
ast_mutex_lock(&monitorlock);
snprintf(monitor->read_filename, FILENAME_MAX, "%s/audio-in-%ld",
@@ -377,12 +377,12 @@ int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, i
if (chan->monitor) {
int directory = strchr(fname_base, '/') ? 1 : 0;
- const char *absolute = *fname_base == '/' ? "" : "/";
+ const char *absolute = *fname_base == '/' ? "" : ast_config_AST_MONITOR_DIR;
char tmpstring[sizeof(chan->monitor->filename_base)] = "";
int i, fd[2] = { -1, -1 }, doexit = 0;
/* before continuing, see if we're trying to rename the file to itself... */
- snprintf(tmpstring, sizeof(tmpstring), "%s%s%s", directory ? "" : ast_config_AST_MONITOR_DIR, absolute, fname_base);
+ snprintf(tmpstring, sizeof(tmpstring), "%s/%s", absolute, fname_base);
/*!\note We cannot just compare filenames, due to symlinks, relative
* paths, and other possible filesystem issues. We could use
@@ -427,7 +427,7 @@ int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, i
/* try creating the directory just in case it doesn't exist */
if (directory) {
char *name = strdup(fname_base);
- snprintf(tmp, sizeof(tmp), "mkdir -p %s",dirname(name));
+ snprintf(tmp, sizeof(tmp), "mkdir -p \"%s/%s\"", absolute, dirname(name));
free(name);
ast_safe_system(tmp);
}
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 55179d78d..447eefaa6 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -1361,9 +1361,11 @@ static int load_module(void)
unload_module();
return res;
} else if (res == 1) {
- unload_module();
ast_log(LOG_WARNING, "No SMDI interfaces are available to listen on, not starting SMDI listener.\n");
- return AST_MODULE_LOAD_DECLINE;
+ /*! \note Since chan_dahdi depends on this module, we need to load the module in inactive state
+ instead of AST_MODULE_LOAD_DECLINE. This is fixed in later releases of Asterisk.
+ */
+ return AST_MODULE_LOAD_SUCCESS;
}
return 0;
diff --git a/sounds/Makefile b/sounds/Makefile
index 6052c8adf..63ca8fe5a 100644
--- a/sounds/Makefile
+++ b/sounds/Makefile
@@ -53,8 +53,8 @@ MM:=$(subst -G722,-g722,$(MM))
MOH:=$(MM:MOH-%=asterisk-moh-%.tar.gz)
MOH_TAGS:=$(MM:MOH-%=$(MOH_DIR)/.asterisk-moh-%)
# If "fetch" is used, --continue is not a valid option.
-ifeq ($(WGET),wget)
-WGET_ARGS:=--continue
+ifneq ($(findstring wget,$(WGET)),)
+WGET_ARGS:=--continue $(WGET_EXTRA_ARGS)
endif
all: $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)