[asterisk-commits] file: branch file/sorcery r378416 - in /team/file/sorcery: ./ addons/ apps/ a...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 3 10:12:37 CST 2013
Author: file
Date: Thu Jan 3 10:12:19 2013
New Revision: 378416
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378416
Log:
Multiple revisions 377925,377966,377971-377975,377977,377981,377986,377994,378000-378002,378006,378011,378029,378039,378063-378064,378072,378074,378081,378091,378095,378122,378166,378220,378248-378249,378259,378288,378322,378374,378377,378384,378410,378412
........
r377925 | newtonr | 2012-12-12 18:43:40 -0400 (Wed, 12 Dec 2012) | 18 lines
Incremented EXTRA_SOUNDS_VERSION in sounds/Makefile to 1.4.12 for new Extra Sounds releases
See CHANGES-* files in English extra 1.4.12 tarballs for new sound prompts added.
(closes ASTERISK-20328)
Reported by: Matt Jordan
(closes AST-755)
Reported by: John Bigelow
........
Merged revisions 377922 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377923 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377924 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r377966 | kmoore | 2012-12-13 10:28:57 -0400 (Thu, 13 Dec 2012) | 23 lines
Ensure Min-SE is included in outbound INVITEs
Asterisk now includes Min-SE in outbound INVITEs when the value is not
90 (the default) and session timers are not disabled. This has the
effect of Asterisk following RFC4028 more closely with regard to 422
responses and preventing situations in which Asterisk would be forced
to temporarily accept a call to tear it down based on a Session-Expires
below the locally configured Min-SE.
(issue SWP-5051)
Review: https://reviewboard.asterisk.org/r/2222/
Reported-by: Kinsey Moore
Patch-by: Kinsey Moore
........
Merged revisions 377946 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377947 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377948 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r377971 | beagles | 2012-12-13 11:22:27 -0400 (Thu, 13 Dec 2012) | 9 lines
This change adds a SIP peer configuration feature to allow the peer's
configured codecs to take precedence on an outgoing call.
This change introduces a new peer configuration property named
'ignore_requested_pref' that causes the requested codec to be ignored when
determining the preferred codec for an outgoing call leg. The consequence is
that Asterisk's usual efforts to prefer avoiding transcoding can be overridden
on a peer-by-peer basis where appropriate.
........
r377972 | dlee | 2012-12-13 11:24:22 -0400 (Thu, 13 Dec 2012) | 5 lines
Fixed configure.ac to look for proper uuid.h file
Introduced in r377846, the configure script was looking for uuid.h instead
of uuid/uuid.h.
........
r377973 | mmichelson | 2012-12-13 11:37:45 -0400 (Thu, 13 Dec 2012) | 6 lines
The UUID commit removed changes made in res_clialiases.c
This puts back in the changes that are designed to work
around a memory leak fix in the CLI code.
........
r377974 | seanbright | 2012-12-13 11:37:55 -0400 (Thu, 13 Dec 2012) | 6 lines
Use the UUID API to generate and validate UUIDs for res_calendar_exchange.
Currently the res_calendar_exchange module uses its own method of generating
UUIDs using ast_random(). Now that we have a UUID API we should use that
instead.
........
r377975 | mmichelson | 2012-12-13 11:40:03 -0400 (Thu, 13 Dec 2012) | 3 lines
Re-add taskprocessor cleanup code that was removed by the UUID merge.
........
r377977 | russell | 2012-12-13 12:18:52 -0400 (Thu, 13 Dec 2012) | 7 lines
Remove compile time check HAVE_DEV_URANDOM.
The code was doing a runtime check, anyway. The compile time check isn't
always valid (cross-compiling, packages).
Review: https://reviewboard.asterisk.org/r/2245/
........
r377981 | dlee | 2012-12-13 12:43:40 -0400 (Thu, 13 Dec 2012) | 1 line
Bail configure if it can't find libuuid.
........
r377986 | wedhorn | 2012-12-13 14:28:41 -0400 (Thu, 13 Dec 2012) | 14 lines
Fix skinny debug tab completion
Review the syntax of the 'skinny debug' command to show more than
just 'show' for options to 'skinny debug' command.
(closes issue ASTERISK-20789)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
skinny-debug.diff uploaded by snuffy (license 5024)
........
Merged revisions 377985 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r377994 | dlee | 2012-12-13 17:15:44 -0400 (Thu, 13 Dec 2012) | 1 line
Fixed svn merge property breakage from r377986
........
r378000 | seanbright | 2012-12-13 17:20:32 -0400 (Thu, 13 Dec 2012) | 8 lines
Make generate_exchange_uuid() always return the passed ast_str pointer.
I changed this code earlier to return NULL if it wasn't able to generate a UUID,
whereas the earlier code would always return the ast_str that was passed in.
Switch back to returning the ast_str, only set it to the empty string instead if
UUID generation fails. We still do a validity check later which will catch this
and blow up if necessary.
........
r378001 | wedhorn | 2012-12-13 17:25:31 -0400 (Thu, 13 Dec 2012) | 9 lines
Minor fixes for chan_skinny
Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and
correct len of 2 strcmp in skinny_setdebug(). (see opticron's review
on https://reviewboard.asterisk.org/r/2240/)
........
Merged revisions 377991 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378002 | rmudgett | 2012-12-13 17:28:15 -0400 (Thu, 13 Dec 2012) | 35 lines
confbridge: Fix MOH on simultaneous user entry to a new conference.
When two users entered a new conference simultaneously, one of the callers
hears MOH. This happened if two unmarked users entered simultaneously and
also if a waitmarked and a marked user entered simultaneously.
* Created a confbridge internal MOH API to eliminate the inlined MOH
handling code. Note that the conference mixing bridge needs to be locked
when actually starting/stopping MOH because there is a small window
between the conference join unsuspend MOH and actually joining the mixing
bridge.
* Created the concept of suspended MOH so it can be interrupted while
conference join announcements to the user and DTMF features can operate.
* Suspend any MOH until the user is about to actually join the mixing
bridge of the conference. This way any pre-join file playback does not
need to worry about MOH.
* Made post-join actions only play deferred entry announcement files.
Changing the user/conference state during that time is not protected or
controlled by the state machine.
(closes issue ASTERISK-20606)
Reported by: Eugenia Belova
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/2232/
........
Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377993 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378006 | wedhorn | 2012-12-13 21:02:15 -0400 (Thu, 13 Dec 2012) | 8 lines
Add g722 codec support to skinny
(closes issue ASTERISK-20788)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
skinny-g722.diff uploaded by snuffy (license 5024)
........
r378011 | wedhorn | 2012-12-13 21:55:43 -0400 (Thu, 13 Dec 2012) | 15 lines
Fix skinny to recognise vmexten in general section of conf
Fixup the vmexten so if globally set in general section will be honored by
chan_skinny. Also get rid of the 'global_' part of variable name to match
regexten.
(closes issue ASTERISK-20790)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
skinny-vm.diff uploaded by snuffy (license 5024)
........
Merged revisions 378010 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378029 | rmudgett | 2012-12-14 16:22:36 -0400 (Fri, 14 Dec 2012) | 1 line
app_queue: Make update_status() not return anything.
........
r378039 | rmudgett | 2012-12-14 17:35:44 -0400 (Fri, 14 Dec 2012) | 26 lines
app_queue: Revert bad ringinuse=no patch.
With the option ringinuse=no set, the patch committed for ASTERISK-16115
causes non-SIP queue members to never be called because the device state
is checked after a channel is created to determine if the member is busy.
These queue members always get the "Member %s is busy, cannot dial"
message.
Most channel drivers other than chan_sip use the default device state
handling. The default device-state state is considered in use or unknown
if the channel exists or not respectively.
(closes issue ASTERISK-20801)
Reported by: rmudgett
Patches:
jira_asterisk_16115_revert_r370418_v1.8.patch (license #5621) patch uploaded by rmudgett
........
Merged revisions 378036 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378037 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378038 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378063 | jrose | 2012-12-14 18:34:18 -0400 (Fri, 14 Dec 2012) | 8 lines
Features: BRIDGE_FEATURES variable automixmonitor support and use proper party
BRIDGE_FEATURES did not previously support the automixmonitor feature. Now it
does. In addition, the BRIDGE_FEATURES variable would not apply features to
the proper party based on whether the feature option letter was in caps or
in lowercase (both ways would apply it to the caller). Now uppercase applies
to the caller while lowercase applies to the callee (like with the dial option)
........
r378064 | rmudgett | 2012-12-14 18:45:03 -0400 (Fri, 14 Dec 2012) | 4 lines
chan_agent: Remove some duplicated code.
No need to check for an agent twice. Santa does that.
........
r378072 | rmudgett | 2012-12-17 16:34:25 -0400 (Mon, 17 Dec 2012) | 9 lines
chan_local: Misc lock and ref tweaks.
* awesome_locking() does not need to thrash the pvt lock as much.
* local_setoption() does not need to check for NULL pvt on cleanup since
it will never be NULL.
* Made ref the pvt before locking for consistency.
........
r378074 | qwell | 2012-12-17 16:59:51 -0400 (Mon, 17 Dec 2012) | 10 lines
Make libasteriskssl.so symlink use a relative path.
This was causing issues when using DESTDIR, since the path to which the link
pointed is not likely to exist (and not useful to exist) on the target system.
(issue ASTNOW-284)
........
Merged revisions 378073 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378081 | rmudgett | 2012-12-17 17:22:21 -0400 (Mon, 17 Dec 2012) | 7 lines
chan_local: Parse dial string consistently.
* Fix local_alloc() unexpected limitation of exten and context length from
a combined length of 80 characters to a normal 80 characters each.
* Made local_alloc() and local_devicestate() parse the same way.
........
r378091 | rmudgett | 2012-12-17 19:02:54 -0400 (Mon, 17 Dec 2012) | 22 lines
Make chan_local module references tied to local_pvt lifetime.
The chan_local module references were manually tied to the existence of
the ;1 and ;2 channel links.
* Made chan_local module references tied to the existence of the local_pvt
structure as well as automatically take care of the module references.
* Tweaked the wording of the local_fixup() failure warning message to make
sense.
Review: https://reviewboard.asterisk.org/r/2181/
........
Merged revisions 378088 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378089 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378090 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378095 | rmudgett | 2012-12-17 19:10:42 -0400 (Mon, 17 Dec 2012) | 11 lines
Fix potential double free when unloading a module.
........
Merged revisions 378092 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378093 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378094 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378122 | kmoore | 2012-12-18 13:48:36 -0400 (Tue, 18 Dec 2012) | 17 lines
Add test events for time limit-related hangups
This patch adds hangup-related test events in order to support testing
of time-limited bridges. This aids in testing the S() and L() bridge
options.
(issue SWP-4713)
........
Merged revisions 378119 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378120 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378121 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378166 | rmudgett | 2012-12-20 17:51:03 -0400 (Thu, 20 Dec 2012) | 8 lines
Give the causes[] a struct name.
........
Merged revisions 378164 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378165 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378220 | kmoore | 2012-12-31 10:46:06 -0400 (Mon, 31 Dec 2012) | 18 lines
Ensure chan_sip rejects encrypted streams without crypto info
This ensures that Asterisk rejects encrypted media streams (RTP/SAVP
audio and video) that are missing cryptographic keys and ensures that
the incoming SDP is consistent with RFC4568 as far as having a crypto
attribute present for any SAVP streams.
Review: https://reviewboard.asterisk.org/r/2204/
........
Merged revisions 378217 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378218 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378219 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378248 | seanbright | 2013-01-01 13:03:59 -0400 (Tue, 01 Jan 2013) | 2 lines
Bail out early when building an ast_trans_pvt and the translator doesn't supply a 'newpvt'
........
r378249 | seanbright | 2013-01-01 13:10:42 -0400 (Tue, 01 Jan 2013) | 2 lines
Revert 378248. I changed the logic of this function unitentionally, pointed out by file.
........
r378259 | lathama | 2013-01-01 15:02:52 -0400 (Tue, 01 Jan 2013) | 5 lines
Add UUID packages now required to configure
In ASTERISK-20726 UUID was added to Asterisk. This commit is to add the dependancies to the install script
........
r378288 | mjordan | 2013-01-02 11:39:42 -0400 (Wed, 02 Jan 2013) | 36 lines
Resolve crashes due to large stack allocations when using TCP
Asterisk had several places where messages received over various network
transports may be copied in a single stack allocation. In the case of TCP,
since multiple packets in a stream may be concatenated together, this can
lead to large allocations that overflow the stack.
This patch modifies those portions of Asterisk using TCP to either
favor heap allocations or use an upper bound to ensure that the stack will not
overflow:
* For SIP, the allocation now has an upper limit
* For HTTP, the allocation is now a heap allocation instead of a stack
allocation
* For XMPP (in res_jabber), the allocation has been eliminated since it was
unnecesary.
Note that the HTTP portion of this issue was independently found by Brandon
Edwards of Exodus Intelligence.
(issue ASTERISK-20658)
Reported by: wdoekes, Brandon Edwards
Tested by: mmichelson, wdoekes
patches:
ASTERISK-20658_res_jabber.c.patch uploaded by mmichelson (license 5049)
issueA20658_http_postvars_use_malloc2.patch uploaded by wdoekes (license 5674)
issueA20658_limit_sip_packet_size3.patch uploaded by wdoekes (license 5674)
........
Merged revisions 378269 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378286 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378287 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378322 | mjordan | 2013-01-02 14:11:59 -0400 (Wed, 02 Jan 2013) | 33 lines
Prevent exhaustion of system resources through exploitation of event cache
Asterisk maintains an internal cache for devices in the event subsystem. The
device state cache holds the state of each device known to Asterisk, such that
consumers of device state information can query for the last known state for
a particular device, even if it is not part of an active call. The concept of
a device in Asterisk can include entities that do not have a physical
representation. One way that this occurred was when anonymous calls are allowed
in Asterisk. A device was automatically created and stored in the cache for
each anonymous call that occurred; this was possible in the SIP and IAX2
channel drivers and through channel drivers that utilized the
res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
are never removed from the system, allowing anonymous calls to potentially
exhaust a system's resources.
This patch changes the event cache subsystem and device state management to
no longer cache devices that are not associated with a physical entity.
(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore
patches:
event-cachability-3.diff uploaded by jcolp (license 5000)
........
Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378374 | rmudgett | 2013-01-02 17:23:16 -0400 (Wed, 02 Jan 2013) | 33 lines
Fix AMI redirect action with two channels failing to redirect both channels.
The AMI redirect action can fail to redirect two channels that are bridged
together. There is a race between the AMI thread redirecting the two
channels and the bridge thread noticing that a channel is hungup from the
redirects.
* Made the bridge wait for both channels to be redirected before exiting.
* Made the AMI redirect check that all required headers are present before
proceeding with the redirection.
* Made the AMI redirect require that any supplied ExtraChannel exist
before proceeding. Previously the code fell back to a single channel
redirect operation.
(closes issue ASTERISK-18975)
Reported by: Ben Klang
(closes issue ASTERISK-19948)
Reported by: Brent Dalgleish
Patches:
jira_asterisk_19948_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Thomas Sevestre, Deepak Lohani, Kayode
Review: https://reviewboard.asterisk.org/r/2243/
........
Merged revisions 378356 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378358 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378377 | mjordan | 2013-01-02 18:10:32 -0400 (Wed, 02 Jan 2013) | 24 lines
Prevent crashes from occurring when reading from data sources with large values
When reading configuration data from an Asterisk .conf file or when pulling
data from an Asterisk RealTime backend, Asterisk was copying the data on the
stack for manipulation. Unfortunately, it is possible to read configuration
data or realtime data from some data source that provides a large blob of
characters. This could potentially cause a crash via a stack overflow.
This patch prevents large sets of data from being read from an ARA backend or
from an Asterisk conf file.
(issue ASTERISK-20658)
Reported by: wdoekes
Tested by: wdoekes, mmichelson
patches:
* issueA20658_dont_process_overlong_config_lines.patch uploaded by wdoekes (license 5674)
* issueA20658_func_realtime_limit.patch uploaded by wdoekes (license 5674)
........
Merged revisions 378375 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378376 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378384 | mjordan | 2013-01-02 18:19:32 -0400 (Wed, 02 Jan 2013) | 11 lines
Clean up app_mysql's application entry points to properly parse arguments
When parsing arguments, application entry points should not attempt to
directly modify the parameters to the function. This patch properly duplicates
the passed in parameters before attempting to parse them.
(issue ASTERISK-20658)
Reported by: wdoekes
patches:
issueA20658_sanitize_app_mysql.patch uploaded by wdoekes (license 5674)
........
r378410 | mjordan | 2013-01-03 11:37:31 -0400 (Thu, 03 Jan 2013) | 13 lines
Prevent crashes in res_xmpp when receiving large messages
Similar to r378287, res_xmpp was marshaling data read from an external source
onto the stack. For a sufficiently large message, this could cause a stack
overflow. This patch modifies res_xmpp in a similar fashion to res_jabber by
removing the stack allocation, as it was unnecessary.
(issue ASTERISK-20658)
Reported by: wdoekes
........
Merged revisions 378409 from http://svn.asterisk.org/svn/asterisk/branches/11
........
r378412 | file | 2013-01-03 11:40:21 -0400 (Thu, 03 Jan 2013) | 11 lines
Prevent exhaustion of system resources through exploitation of event cache
This patch changes res_xmpp to no longer cache events under certain circumstances.
(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore
........
Merged revisions 378411 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 377925,377966,377971-377975,377977,377981,377986,377994,378000-378002,378006,378011,378029,378039,378063-378064,378072,378074,378081,378091,378095,378122,378166,378220,378248-378249,378259,378288,378322,378374,378377,378384,378410,378412 from http://svn.asterisk.org/svn/asterisk/trunk
Modified:
team/file/sorcery/ (props changed)
team/file/sorcery/CHANGES
team/file/sorcery/UPGRADE.txt
team/file/sorcery/addons/app_mysql.c
team/file/sorcery/apps/app_confbridge.c
team/file/sorcery/apps/app_meetme.c
team/file/sorcery/apps/app_queue.c
team/file/sorcery/apps/confbridge/conf_state.c
team/file/sorcery/apps/confbridge/conf_state_empty.c
team/file/sorcery/apps/confbridge/conf_state_multi_marked.c
team/file/sorcery/apps/confbridge/include/confbridge.h
team/file/sorcery/channels/chan_agent.c
team/file/sorcery/channels/chan_dahdi.c
team/file/sorcery/channels/chan_iax2.c
team/file/sorcery/channels/chan_local.c
team/file/sorcery/channels/chan_sip.c
team/file/sorcery/channels/chan_skinny.c
team/file/sorcery/channels/sip/include/sip.h
team/file/sorcery/configs/sip.conf.sample
team/file/sorcery/configure
team/file/sorcery/configure.ac
team/file/sorcery/contrib/scripts/install_prereq
team/file/sorcery/funcs/func_devstate.c
team/file/sorcery/funcs/func_realtime.c
team/file/sorcery/include/asterisk/autoconfig.h.in
team/file/sorcery/include/asterisk/bridging.h
team/file/sorcery/include/asterisk/channel.h
team/file/sorcery/include/asterisk/devicestate.h
team/file/sorcery/include/asterisk/event_defs.h
team/file/sorcery/main/Makefile
team/file/sorcery/main/ccss.c
team/file/sorcery/main/channel.c
team/file/sorcery/main/channel_internal_api.c
team/file/sorcery/main/config.c
team/file/sorcery/main/devicestate.c
team/file/sorcery/main/event.c
team/file/sorcery/main/features.c
team/file/sorcery/main/http.c
team/file/sorcery/main/loader.c
team/file/sorcery/main/manager.c
team/file/sorcery/main/taskprocessor.c
team/file/sorcery/main/utils.c
team/file/sorcery/res/res_calendar.c
team/file/sorcery/res/res_calendar_exchange.c
team/file/sorcery/res/res_clialiases.c
team/file/sorcery/res/res_jabber.c
team/file/sorcery/res/res_xmpp.c
team/file/sorcery/sounds/Makefile
Propchange: team/file/sorcery/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Propchange: team/file/sorcery/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 3 10:12:19 2013
@@ -1,1 +1,1 @@
-/trunk:1-377918
+/trunk:1-378413
Modified: team/file/sorcery/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/file/sorcery/CHANGES?view=diff&rev=378416&r1=378415&r2=378416
==============================================================================
--- team/file/sorcery/CHANGES (original)
+++ team/file/sorcery/CHANGES Thu Jan 3 10:12:19 2013
@@ -30,6 +30,16 @@
than 15 characters and no longer shows authorization requirement for commands.
'Manager Show Command' now displays the privileges needed for using a given
manager command instead.
+
+Features
+-------------------
+ * The BRIDGE_FEATURES channel variable would previously only set features for
+ the calling party and would set this feature regardless of whether the
+ feature was in caps or in lowercase. Use of a caps feature for a letter
+ will now apply the feature to the calling party while use of a lowercase
+ letter will apply that feature to the called party.
+
+ * Add support for automixmonitor to the BRIDGE_FEATURES channel variable.
Logging
-------------------
Modified: team/file/sorcery/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/file/sorcery/UPGRADE.txt?view=diff&rev=378416&r1=378415&r2=378416
==============================================================================
--- team/file/sorcery/UPGRADE.txt (original)
+++ team/file/sorcery/UPGRADE.txt Thu Jan 3 10:12:19 2013
@@ -64,6 +64,9 @@
- Asterisk has always had code to ignore dash '-' characters that are not
part of a character set in the dialplan extensions. The code now
consistently ignores these characters when matching dialplan extensions.
+ - BRIDGE_FEATURES channel variable is now casesensitive for feature letter codes.
+ Uppercase variants apply them to the calling party while lowercase variants
+ apply them to the called party.
From 10 to 11:
Modified: team/file/sorcery/addons/app_mysql.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sorcery/addons/app_mysql.c?view=diff&rev=378416&r1=378415&r2=378416
==============================================================================
--- team/file/sorcery/addons/app_mysql.c (original)
+++ team/file/sorcery/addons/app_mysql.c Thu Jan 3 10:12:19 2013
@@ -292,16 +292,17 @@
return res;
}
-static int aMYSQL_set(struct ast_channel *chan, char *data)
-{
- char *var, *tmp;
+static int aMYSQL_set(struct ast_channel *chan, const char *data)
+{
+ char *var, *tmp, *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(set);
AST_APP_ARG(variable);
AST_APP_ARG(value);
);
- AST_NONSTANDARD_APP_ARGS(args, data, ' ');
+ parse = ast_strdupa(data);
+ AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
if (args.argc == 3) {
var = ast_alloca(6 + strlen(args.variable) + 1);
@@ -317,7 +318,7 @@
}
/* MYSQL operations */
-static int aMYSQL_connect(struct ast_channel *chan, char *data)
+static int aMYSQL_connect(struct ast_channel *chan, const char *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(connect);
@@ -333,8 +334,9 @@
const char *ctimeout;
unsigned int port = 0;
char *port_str;
-
- AST_NONSTANDARD_APP_ARGS(args, data, ' ');
+ char *parse = ast_strdupa(data);
+
+ AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
if (args.argc < 6) {
ast_log(LOG_WARNING, "MYSQL_connect is missing some arguments\n");
@@ -385,7 +387,7 @@
return 0;
}
-static int aMYSQL_query(struct ast_channel *chan, char *data)
+static int aMYSQL_query(struct ast_channel *chan, const char *data)
{
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(query);
@@ -397,8 +399,9 @@
MYSQL_RES *mysqlres;
int connid;
int mysql_query_res;
-
- AST_NONSTANDARD_APP_ARGS(args, data, ' ');
+ char *parse = ast_strdupa(data);
+
+ AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
if (args.argc != 4 || (connid = atoi(args.connid)) == 0) {
ast_log(LOG_WARNING, "missing some arguments\n");
@@ -426,7 +429,7 @@
return -1;
}
-static int aMYSQL_nextresult(struct ast_channel *chan, char *data)
+static int aMYSQL_nextresult(struct ast_channel *chan, const char *data)
{
MYSQL *mysql;
MYSQL_RES *mysqlres;
@@ -436,8 +439,9 @@
AST_APP_ARG(connid);
);
int connid = -1;
-
- AST_NONSTANDARD_APP_ARGS(args, data, ' ');
+ char *parse = ast_strdupa(data);
+
+ AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
sscanf(args.connid, "%30d", &connid);
if (args.argc != 3 || connid <= 0) {
@@ -466,7 +470,7 @@
}
-static int aMYSQL_fetch(struct ast_channel *chan, char *data)
+static int aMYSQL_fetch(struct ast_channel *chan, const char *data)
{
MYSQL_RES *mysqlres;
MYSQL_ROW mysqlrow;
@@ -518,13 +522,14 @@
return -1;
}
-static int aMYSQL_clear(struct ast_channel *chan, char *data)
+static int aMYSQL_clear(struct ast_channel *chan, const char *data)
{
MYSQL_RES *mysqlres;
int id;
- strsep(&data, " "); /* eat the first token, we already know it :P */
- id = safe_scan_int(&data, " \n", -1);
+ char *parse = ast_strdupa(data);
+ strsep(&parse, " "); /* eat the first token, we already know it :P */
+ id = safe_scan_int(&parse, " \n", -1);
if ((mysqlres = find_identifier(id, AST_MYSQL_ID_RESID)) == NULL) {
ast_log(LOG_WARNING, "Invalid result identifier %d passed in aMYSQL_clear\n", id);
} else {
@@ -535,13 +540,14 @@
return 0;
}
-static int aMYSQL_disconnect(struct ast_channel *chan, char *data)
+static int aMYSQL_disconnect(struct ast_channel *chan, const char *data)
{
MYSQL *mysql;
int id;
- strsep(&data, " "); /* eat the first token, we already know it :P */
-
- id = safe_scan_int(&data, " \n", -1);
+ char *parse = ast_strdupa(data);
+ strsep(&parse, " "); /* eat the first token, we already know it :P */
+
+ id = safe_scan_int(&parse, " \n", -1);
if ((mysql = find_identifier(id, AST_MYSQL_ID_CONNID)) == NULL) {
ast_log(LOG_WARNING, "Invalid connection identifier %d passed in aMYSQL_disconnect\n", id);
} else {
@@ -584,19 +590,19 @@
ast_mutex_lock(&_mysql_mutex);
if (strncasecmp("connect", data, strlen("connect")) == 0) {
- result = aMYSQL_connect(chan, ast_strdupa(data));
+ result = aMYSQL_connect(chan, data);
} else if (strncasecmp("query", data, strlen("query")) == 0) {
- result = aMYSQL_query(chan, ast_strdupa(data));
+ result = aMYSQL_query(chan, data);
} else if (strncasecmp("nextresult", data, strlen("nextresult")) == 0) {
- result = aMYSQL_nextresult(chan, ast_strdupa(data));
+ result = aMYSQL_nextresult(chan, data);
} else if (strncasecmp("fetch", data, strlen("fetch")) == 0) {
- result = aMYSQL_fetch(chan, ast_strdupa(data));
+ result = aMYSQL_fetch(chan, data);
} else if (strncasecmp("clear", data, strlen("clear")) == 0) {
- result = aMYSQL_clear(chan, ast_strdupa(data));
+ result = aMYSQL_clear(chan, data);
} else if (strncasecmp("disconnect", data, strlen("disconnect")) == 0) {
- result = aMYSQL_disconnect(chan, ast_strdupa(data));
+ result = aMYSQL_disconnect(chan, data);
} else if (strncasecmp("set", data, 3) == 0) {
- result = aMYSQL_set(chan, ast_strdupa(data));
+ result = aMYSQL_set(chan, data);
} else {
ast_log(LOG_WARNING, "Unknown argument to MYSQL application : %s\n", data);
result = -1;
Modified: team/file/sorcery/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sorcery/apps/app_confbridge.c?view=diff&rev=378416&r1=378415&r2=378416
==============================================================================
--- team/file/sorcery/apps/app_confbridge.c (original)
+++ team/file/sorcery/apps/app_confbridge.c Thu Jan 3 10:12:19 2013
@@ -909,6 +909,94 @@
return 0;
}
+void conf_moh_stop(struct conference_bridge_user *user)
+{
+ user->playing_moh = 0;
+ if (!user->suspended_moh) {
+ int in_bridge;
+
+ /*
+ * Locking the ast_bridge here is the only way to hold off the
+ * call to ast_bridge_join() in confbridge_exec() from
+ * interfering with the bridge and MOH operations here.
+ */
+ ast_bridge_lock(user->conference_bridge->bridge);
+
+ /*
+ * Temporarily suspend the user from the bridge so we have
+ * control to stop MOH if needed.
+ */
+ in_bridge = !ast_bridge_suspend(user->conference_bridge->bridge, user->chan);
+ ast_moh_stop(user->chan);
+ if (in_bridge) {
+ ast_bridge_unsuspend(user->conference_bridge->bridge, user->chan);
+ }
+
+ ast_bridge_unlock(user->conference_bridge->bridge);
+ }
+}
+
+void conf_moh_start(struct conference_bridge_user *user)
+{
+ user->playing_moh = 1;
+ if (!user->suspended_moh) {
+ int in_bridge;
+
+ /*
+ * Locking the ast_bridge here is the only way to hold off the
+ * call to ast_bridge_join() in confbridge_exec() from
+ * interfering with the bridge and MOH operations here.
+ */
+ ast_bridge_lock(user->conference_bridge->bridge);
+
+ /*
+ * Temporarily suspend the user from the bridge so we have
+ * control to start MOH if needed.
+ */
+ in_bridge = !ast_bridge_suspend(user->conference_bridge->bridge, user->chan);
+ ast_moh_start(user->chan, user->u_profile.moh_class, NULL);
+ if (in_bridge) {
+ ast_bridge_unsuspend(user->conference_bridge->bridge, user->chan);
+ }
+
+ ast_bridge_unlock(user->conference_bridge->bridge);
+ }
+}
+
+/*!
+ * \internal
+ * \brief Unsuspend MOH for the conference user.
+ *
+ * \param user Conference user to unsuspend MOH on.
+ *
+ * \return Nothing
+ */
+static void conf_moh_unsuspend(struct conference_bridge_user *user)
+{
+ ao2_lock(user->conference_bridge);
+ if (--user->suspended_moh == 0 && user->playing_moh) {
+ ast_moh_start(user->chan, user->u_profile.moh_class, NULL);
+ }
+ ao2_unlock(user->conference_bridge);
+}
+
+/*!
+ * \internal
+ * \brief Suspend MOH for the conference user.
+ *
+ * \param user Conference user to suspend MOH on.
+ *
+ * \return Nothing
+ */
+static void conf_moh_suspend(struct conference_bridge_user *user)
+{
+ ao2_lock(user->conference_bridge);
+ if (user->suspended_moh++ == 0 && user->playing_moh) {
+ ast_moh_stop(user->chan);
+ }
+ ao2_unlock(user->conference_bridge);
+}
+
int conf_handle_first_marked_common(struct conference_bridge_user *cbu)
{
if (!ast_test_flag(&cbu->u_profile, USER_OPT_QUIET) && play_prompt_to_user(cbu, conf_get_sound(CONF_SOUND_PLACE_IN_CONF, cbu->b_profile.sounds))) {
@@ -919,18 +1007,11 @@
int conf_handle_inactive_waitmarked(struct conference_bridge_user *cbu)
{
- /* Be sure we are muted so we can't talk to anybody else waiting */
- cbu->features.mute = 1;
/* If we have not been quieted play back that they are waiting for the leader */
if (!ast_test_flag(&cbu->u_profile, USER_OPT_QUIET) && play_prompt_to_user(cbu,
conf_get_sound(CONF_SOUND_WAIT_FOR_LEADER, cbu->b_profile.sounds))) {
/* user hungup while the sound was playing */
return -1;
- }
- /* Start music on hold if needed */
- if (ast_test_flag(&cbu->u_profile, USER_OPT_MUSICONHOLD)) {
- ast_moh_start(cbu->chan, cbu->u_profile.moh_class, NULL);
- cbu->playing_moh = 1;
}
return 0;
}
@@ -962,7 +1043,7 @@
void conf_handle_first_join(struct conference_bridge *conference_bridge)
{
- ast_devstate_changed(AST_DEVICE_INUSE, "confbridge:%s", conference_bridge->name);
+ ast_devstate_changed(AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE, "confbridge:%s", conference_bridge->name);
}
void conf_handle_second_active(struct conference_bridge *conference_bridge)
@@ -970,11 +1051,8 @@
/* If we are the second participant we may need to stop music on hold on the first */
struct conference_bridge_user *first_participant = AST_LIST_FIRST(&conference_bridge->active_list);
- /* Temporarily suspend the above participant from the bridge so we have control to stop MOH if needed */
- if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD) && !ast_bridge_suspend(conference_bridge->bridge, first_participant->chan)) {
- first_participant->playing_moh = 0;
- ast_moh_stop(first_participant->chan);
- ast_bridge_unsuspend(conference_bridge->bridge, first_participant->chan);
+ if (ast_test_flag(&first_participant->u_profile, USER_OPT_MUSICONHOLD)) {
+ conf_moh_stop(first_participant);
}
if (!ast_test_flag(&first_participant->u_profile, USER_OPT_STARTMUTED)) {
first_participant->features.mute = 0;
@@ -1098,6 +1176,13 @@
conference_bridge_user->conference_bridge = conference_bridge;
ao2_lock(conference_bridge);
+
+ /*
+ * Suspend any MOH until the user actually joins the bridge of
+ * the conference. This way any pre-join file playback does not
+ * need to worry about MOH.
+ */
+ conference_bridge_user->suspended_moh = 1;
if (handle_conf_user_join(conference_bridge_user)) {
/* Invalid event, nothing was done, so we don't want to process a leave. */
@@ -1530,20 +1615,17 @@
/* Play the Join sound to both the conference and the user entering. */
if (!quiet) {
const char *join_sound = conf_get_sound(CONF_SOUND_JOIN, conference_bridge_user.b_profile.sounds);
- if (conference_bridge_user.playing_moh) {
- ast_moh_stop(chan);
- }
+
ast_stream_and_wait(chan, join_sound, "");
ast_autoservice_start(chan);
play_sound_file(conference_bridge, join_sound);
ast_autoservice_stop(chan);
- if (conference_bridge_user.playing_moh) {
- ast_moh_start(chan, conference_bridge_user.u_profile.moh_class, NULL);
- }
}
/* See if we need to automatically set this user as a video source or not */
handle_video_on_join(conference_bridge, conference_bridge_user.chan, ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_MARKEDUSER));
+
+ conf_moh_unsuspend(&conference_bridge_user);
/* Join our conference bridge for real */
send_join_event(conference_bridge_user.chan, conference_bridge->name);
@@ -1925,25 +2007,14 @@
struct conf_menu_entry *menu_entry,
struct conf_menu *menu)
{
- struct conference_bridge *conference_bridge = conference_bridge_user->conference_bridge;
-
/* See if music on hold is playing */
- ao2_lock(conference_bridge);
- if (conference_bridge_user->playing_moh) {
- /* MOH is going, let's stop it */
- ast_moh_stop(bridge_channel->chan);
- }
- ao2_unlock(conference_bridge);
+ conf_moh_suspend(conference_bridge_user);
/* execute the list of actions associated with this menu entry */
- execute_menu_entry(conference_bridge, conference_bridge_user, bridge_channel, menu_entry, menu);
+ execute_menu_entry(conference_bridge_user->conference_bridge, conference_bridge_user, bridge_channel, menu_entry, menu);
/* See if music on hold needs to be started back up again */
- ao2_lock(conference_bridge);
- if (conference_bridge_user->playing_moh) {
- ast_moh_start(bridge_channel->chan, conference_bridge_user->u_profile.moh_class, NULL);
- }
- ao2_unlock(conference_bridge);
+ conf_moh_unsuspend(conference_bridge_user);
return 0;
}
@@ -2835,13 +2906,7 @@
/* Turn on MOH/mute if the single participant is set up for it */
if (ast_test_flag(&only_participant->u_profile, USER_OPT_MUSICONHOLD)) {
only_participant->features.mute = 1;
- if (!ast_channel_internal_bridge(only_participant->chan) || !ast_bridge_suspend(conference_bridge->bridge, only_participant->chan)) {
- ast_moh_start(only_participant->chan, only_participant->u_profile.moh_class, NULL);
- only_participant->playing_moh = 1;
- if (ast_channel_internal_bridge(only_participant->chan)) {
- ast_bridge_unsuspend(conference_bridge->bridge, only_participant->chan);
- }
- }
+ conf_moh_start(only_participant);
}
}
Modified: team/file/sorcery/apps/app_meetme.c
[... 3032 lines stripped ...]
More information about the asterisk-commits
mailing list