Commit Graph

4033 Commits

Author SHA1 Message Date
Richard Mudgett 6c0a0a6fd9 Remove dupliate 'i' option table entry in app_page.c.
(closes issue ASTERISK-19310)
Reported by: Makoto Dei
Patches:
      app_page-duplicate-i-option.patch (license #5027) patch uploaded by Makoto Dei
........

Merged revisions 357352 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@357353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 19:35:41 +00:00
Matthew Jordan fe1a4e7a48 Fix crash in app_voicemail during close_mailbox
In r354890, a memory leak in app_voicemail was fixed by properly disposing of
the allocated heard/deleted pointers.  However, there are situations,
particularly when no messages are found in a folder, where these pointers are
not allocated and not NULL.  In that case, an invalid free would be attempted,
which could crash app_voicemail.  As there are a number of code paths where
this could occur, this patch uses the number of messages detected in the folder
before it attempts to free the pointers.  This resolves the crash detected in
the Asterisk Test Suite's check_voicemail_nominal test.
........

Merged revisions 356797 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@356798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-25 17:22:14 +00:00
Paul Belanger bcadb05414 Multiple revisions 356290,356335,356337
........
  r356290 | pabelanger | 2012-02-22 15:20:29 -0500 (Wed, 22 Feb 2012) | 4 lines
  
  Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
  
  Review: https://reviewboard.asterisk.org/r/1763/
........
  r356335 | pabelanger | 2012-02-22 16:29:25 -0500 (Wed, 22 Feb 2012) | 2 lines
  
  Add back strsep() function for previous commit
........
  r356337 | pabelanger | 2012-02-22 16:36:37 -0500 (Wed, 22 Feb 2012) | 2 lines
  
  Missed one strsep() function
........

Merged revisions 356290,356335,356337 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@356428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 03:23:28 +00:00
Joshua Colp 6dde382e1d Don't try to play sound files that do not exist.
(closes issue ASTERISK-19188)
Reported by: slesru


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@354938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 16:41:56 +00:00
Jason Parker 9c93c80342 Fix a voicemail memory leak with heard/deleted messages.
open_mailbox() was changed quite a long time ago to allocate this memory.
close_mailbox() should have been changed to be responsible for freeing it.
........

Merged revisions 354889 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@354890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-10 22:00:10 +00:00
Richard Mudgett 19215d3829 Fix crash in ParkAndAnnounce.
Well, thats embarrasing.  I forgot to initialize the caller_id storage.

(closes issue ASTERISK-19311)
Reported by: tootai
Tested by: rmudgett
........

Merged revisions 354495 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@354496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09 02:54:14 +00:00
Richard Mudgett 0a7d748e2c Audit of ao2_iterator_init() usage for v10. Missed one.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@353039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 21:37:39 +00:00
Richard Mudgett 88af121f9f Audit of ao2_iterator_init() usage for v1.8.
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as
a result.

Review: https://reviewboard.asterisk.org/r/1697/
........

Merged revisions 352955 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@352956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 18:36:43 +00:00
Paul Belanger f55ee58b5f Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
........

Merged revisions 352643 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@352651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 22:23:20 +00:00
Matthew Jordan fa56c109a3 Realtime queues failed to load queue information without queue member table
Previously, realtime queues could be loaded without defining the queue member
table.  This allowed for queue members to be dynamic, while the realtime
queue definitions could exist in some backing storage.  Revision 342223 broke
this when it changed the return value for realtime_multientry to return NULL
when no results are returned.  Previously, an empty ast_config object was
expected.

(closes issue ASTERISK-19170)
Reported by: Rene Mendoza
Tested by: Rene Mendoza
Patches: 
  rt_queue_member_patch.diff uploaded by Matt Jordan (license 6283)
........

Merged revisions 350552 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@350553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 16:59:02 +00:00
Matthew Jordan d3fbfc50f4 Fix crash from bridge channel hangup race condition in ConfBridge
This patch addresses two issues in ConfBridge and the channel bridge layer:
1. It fixes a race condition wherein the bridge channel could be hung up
2. It removes the deadlock avoidance from the bridging layer and makes the
   bridge_pvt an ao2 ref counted object

Patch by David Vossel (mjordan was merely the commit monkey)

(issue ASTERISK-18988)
(closes issue ASTERISK-18885)
Reported by: Dmitry Melekhov
Tested by: Matt Jordan
Patches: chan_bridge_cleanup_v.diff uploaded by David Vossel (license 5628)

(closes issue ASTERISK-19100)
Reported by: Matt Jordan
Tested by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1654/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@350550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 16:43:11 +00:00
Richard Mudgett 031a95b7ec Make FollowMe optionally update connected line information when the accepting endpoint is bridged.
Like Dial and Queue, FollowMe needs to deal with
AST_CONTROL_CONNECTED_LINE information so when the parties are initially
bridged, the connected line information will be correct.

* Added the 'I' option just like the app_dial and app_queue 'I' option.

* Made 'N' option ignored if the call is already answered.

(closes issue ASTERISK-18969)
Reported by: rmudgett
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1656/
........

Merged revisions 350364 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@350415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-11 21:47:04 +00:00
Kinsey Moore 2d27c6c255 Prevent SLA settings from getting wiped out on reload
If SLA was reloaded without the config file being changed, current settings got
wiped out before the SLA reload code decided it wasn't going to reload the file
since nothing was changed.  Moving the settings reset later in the reload
process fixes this.

(closes issue AST-744)
........

Merged revisions 350023 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@350024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 15:39:31 +00:00
Richard Mudgett c5c52328c4 Fix memory leaks in app_followme find_realtime().
(closes issue ASTERISK-19055)
Reported by: Matt Jordan
........

Merged revisions 349872 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@349873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-06 16:48:28 +00:00
Matthew Jordan 12d2720aa4 Fix for ConfBridge config parser unlocking channel mutex too many times
When looking up a ConfBridge profile, the config parser would, if it
found a channel datastore on the channel requesting the bridge profile,
unlock the channel mutex twice.  Since that's a little aggressive,
it now only unlocks it once.

(closes issue ASTERISK-19042)
Reported by: Matt Jordan
Tested by: Matt Jordan
Patches: 
  19042 uploaded by David Vossel (license 5628)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@349619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-04 22:19:34 +00:00
Sean Bright 36410bc60a Merged revisions 349044 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r349044 | seanbright | 2011-12-23 12:25:01 -0500 (Fri, 23 Dec 2011) | 18 lines
  
  In ChanSpy, don't create audiohooks that will never be used.
  
  When ChanSpy is initialized it creates and attaches 3 audiohooks:
  
    1) Read audio off of the channel that we are spying on
    2) Write audio to the channel that we are spying on
    3) Write audio to the channel that is bridged to the channel that we are
       spying on.
  
  The first is always necessary, but the others are used only when specific
  options are passed to the ChanSpy application (B, d, w, and W to be specific).
  
  When those flags are not passed, neither of those audiohooks are ever sent
  frames, but we still try to process the hooks for each voice frame that we
  recieve on the channel.
  
  So in short - only create and attach audiohooks that we actually need.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@349045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 17:32:33 +00:00
Kinsey Moore 0c81db6d3d Fix missing doc tags found while fixing ASTERISK-18689
Add missing <variable></variable> tags in app_dial documentation.
........

Merged revisions 348992 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 15:25:20 +00:00
Matthew Jordan fe36eef8f1 Add Asterisk TestSuite event hooks to support ConfBridge testing
This patch adds initial testsuite event hooks so that ConfBridge tests
can be executed in the Asterisk TestSuite.

(issue ASTERISK-19059)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-22 20:34:08 +00:00
Richard Mudgett 5688637636 Fix crash during CDR update.
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to
be called by different threads for the same channel.  The channel driver
thread and the PBX thread running dialplan.

* Add lock protection around CDR API calls that access an ast_channel
pointer.

(closes issue ASTERISK-18836)
Reported by: gpluser

Review: https://reviewboard.asterisk.org/r/1628/
........

Merged revisions 348362 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 21:04:01 +00:00
Richard Mudgett 09fab9c14a Fix ParkAndAnnounce to pass the CallerID to the announcing channel.
ParkAndAnnounce tried to pass the CallerID to the announcing channel but
the ID was wiped out by the channel masquerade done when parking the call.

* Save the CallerID before parking the channel to pass it to the
announcing channel.

* Fixed a minor memory leak in ParkAndAnnounce.

* Updated some ParkAndAnnounce log messages.
........

Merged revisions 348310 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 01:26:57 +00:00
Matthew Jordan a3ac30d14c Added support for all slin formats to app_originate
Previously, app_originate could not originate a call into a non-8kHz conference
bridge as the formats for non-8kHz slin codecs were not applied to the created
channel.  This patch adds all of the formats by default, such that if a created
channel has a codec that supports a higher sampling rate, a translation path
can be built between it and other channels.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 22:34:51 +00:00
Matthew Jordan 3d75189139 Fixed Asterisk crash when function QUEUE_MEMBER receives invalid input
The function QUEUE_MEMBER has two required parameters (queuename, option).  It
was only checking for the presence of queuename.  The patch checks for the
existence of the option parameter and provides better error logging when
invalid values are provided for the option parameter as well.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 21:58:12 +00:00
Richard Mudgett f71c13ed3d Fix FollowMe CallerID on outgoing calls.
The addition of the Connected Line support changed how CallerID is passed
to outgoing calls.  The FollowMe application was not updated to pass
CallerID to the outgoing calls.

* Fix FollowMe CallerID on outgoing calls.

* Restructured findmeexec() to fix several memory leaks and eliminate some
duplicated code.

* Made check the return value of create_followme_number().  Putting a NULL
into the numbers list is bad if create_followme_number() fails.

* Fixed a couple uses of ast_strdupa() inside loops.

* The changes to bridge_builtin_features.c fix a similar CallerID issue
with the bridging API attended and blind transfers.  (Not used at this
time.)

(closes issue ASTERISK-17557)
Reported by: hamlet505a
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1612/
........

Merged revisions 348101 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@348102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-13 23:06:11 +00:00
Jonathan Rose 1ebeb108c8 Fix regressed behavior of queue set penalty to work without specifying 'in <queuename>'
r325483 caused a regression in Asterisk 10+ that would make Asterisk segfault when
attempting to set penalty on an interface without specifying a queue in the queue set
penalty CLI command. In addition, no attempt would be made whatsoever to perform the
penalty setting on all the queues in the core list with either the cli command or the
non-segfaulting ami equivalent. This patch fixes that and also makes an attempt to
document and rename some functions required by this command to better represent what
they actually do. Oh yeah, and the use of this command without specifying a specific
queue actually works now.

Review: https://reviewboard.asterisk.org/r/1609/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@347656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08 20:43:20 +00:00
Jonathan Rose ec1a9f4518 Fix: Meetme recording variables from realtime DB use null entries over channel variables
Meetme would attempt to substitute the realtime values of RECORDING_FILE and
RECORDING_FORMAT from the meetme db entry instead of using the channel variable set
for those variables in spite of those database entries being NULL or even lacking
a column to represent them.

(closes issue ASTERISK-18873)
Reported by: Byron Clark
Patches:
	ASTERISK-18873-1.patch uploaded by Byron Clark (license 6157)
........

Merged revisions 347369 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@347383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07 20:27:59 +00:00
Walter Doekes 585499074d Add regression tests for issue ASTERISK-18838.
Review: https://reviewboard.asterisk.org/r/1572
Reviewed by: Matt Jordan
........

Merged revisions 347131 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@347146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06 19:25:30 +00:00
Walter Doekes 2ebbe7c31d Move setting of voicemail zonetag and locale up a bit.
The voicemail [general] zonetag and locale variables weren't loaded
until after the mailboxes were initialized. This caused the settings to
be unset for those mailboxes until a reload was performed.

(closes issue ASTERISK-18838)

Review: https://reviewboard.asterisk.org/r/1570
Reviewed by: Matt Jordan
........

Merged revisions 347111 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@347124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-06 19:20:10 +00:00
Paul Belanger c4a10a20be Add missing sound_only_one config variable
(closes issue ASTERISK-18895)
Reported by: zvision
Patches:
        conf_config_parser.diff (license #5755) patch uploaded by zvision


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@345882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-22 16:40:57 +00:00
Jonathan Rose 63e3243aab Guarantee messages go into the right folders with multiple recipients
Before, using the U flag in Voicemail with multiple recipients would put urgent messages
in the INBOX folder for all users past the first thanks to a bug with the message
copying function. This would also cause messages to fail to be sent if the INBOX
directory hadn't been created for that mailbox yet.

(closes issue ASTERISK-18245)
Reported by: Matt Jordan

(closes issue ASTERISK-18246)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1589/
........

Merged revisions 345487 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@345488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-16 14:49:43 +00:00
Richard Mudgett e6be04538c Make queue log indicate if ADDMEMBER is paused for AMI and realtime.
* Add parameter to queue log ADDMEMBER to indicate if the member is
paused.

(closes issue ASTERISK-18645)
Reported by: garlew
Patches:
      paused.diff (License #5337) patch uploaded by garlew
Tested by: rmudgett, garlew

Review: https://reviewboard.asterisk.org/r/1469/
........

Merged revisions 345285 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@345290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14 22:20:25 +00:00
Jonathan Rose e8fcda6a4d Moves voicemail setup password entry to the end of the setup process.
This change was made because forcegreeting and forcename settings in voicemail could be
circumvented by hanging up after entering a password, because the only way voicemail
currently observes whether a mailbox is new or not is by checking to see if the password
is the same as the mailbox number or not.

(closes issue ASTERISK-18282)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1581/
........

Merged revisions 345062 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@345117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-14 16:12:37 +00:00
Richard Mudgett 572ab36b89 Fix app_macro.c MODULEINFO section termination.
(closes issue ASTERISK-18848)
Reported by: Tony Mountifield


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@344557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 23:21:00 +00:00
Richard Mudgett b2b0dfa615 Fix potential deadlock calling ast_call() with channel locks held.
Fixed app_queue.c:ring_entry() calling ast_call() with the channel locks
held.  Chan_local attempts to do deadlock avoidance in its ast_call()
callback and could deadlock if a channel lock is already held.
........

Merged revisions 344539 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@344540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 23:01:31 +00:00
Richard Mudgett 6692a0ad9e Make AMI event AgentCalled get CallerID/ConnectedLine info from the incoming channel.
It was strange that the AgentCalled AMI event would get most of its
information from the incoming channel but then get the CallerID
information from the outgoing channel.  Before connected line support was
added, this information was always the same at this point.

(closes issue ASTERISK-18152)
Reported by: Thomas Farnham
Tested by: rmudgett
........

Merged revisions 344536 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@344537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 22:36:47 +00:00
Kinsey Moore bf43b7c30e Fix another incorrect case with meetme's PIN logic and add documentation
This fixes an issue where a user of a dynamic conference was asked for a PIN
twice.  This also adds documentation to assist in future modifications to the
piece of code responsible for PIN checking.

(closes issue AST-670)
........

Merged revisions 344439 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@344440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-10 21:14:52 +00:00
Kinsey Moore 42686b23da Fix pin parameter behavior regression in MeetMe
The last time this code was touched (by me), a subtlety was missed based on the
difference between needing to check a pin's validity and the need to prompt
for a pin.

(closes issue ASTERISK-18488)
........

Merged revisions 344102 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@344103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-09 17:14:28 +00:00
Leif Madsen 3769a0e929 Add note about how Authenticate() application with option 'd' works.
(closes issue ASTERISK-17422)
Reported by: Leif Madsen
........

Merged revisions 343102 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 19:33:08 +00:00
Kevin P. Fleming 48818ce81b Modify comments in MeetMe application documentation about DAHDI.
The MeetMe application documentation has some comments about usage of DAHDI,
and they were a bit outdated relative to modern DAHDI releases. This patch
changes the comment to just tell the user that a functional DAHDI timing
source is required, and no longer mention 'dahdi_dummy', since that module
does not exist in current DAHDI releases.
........

Merged revisions 342990 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-02 13:45:01 +00:00
Terry Wilson ba2c590c18 Use int for storing ao2_container_count instad of size_t
AST-676
........

Merged revisions 342435 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 21:10:02 +00:00
Terry Wilson 7e46d3ee91 Simplify queue membercount code
Despite an ominous sounding comment stating that membercount was for "logged
in" members only and thus we couldn't use ao2_container_count(), I could not
find a single place in the code where that seemed to be accurate. The only time
we decremented membercount was when we were marking something dead or actually
removing it. The only places we incremented it were either after ao2_link(), or
trying to correct for having set it to 0 during a reload. In every case where
we were correcting the value, it seemed that we were trying to make the count
actually match what ao2_container_count() would return. The only place I could
find where we made a determination about something being "logged in" or not, we
didn't trust the membercount, but instead looked at devicestate, paused, etc.

This patch removes membercount, replaces its use with ao2_container_count, and
manually adds the results of ao2_container_count to a "membercount" field for
ast_data queue query results. This patch also would fix AST-676, but as it is
slightly riskier than the previously committed fix, the two commits have been
made separately.

Reivew: https://reviewboard.asterisk.org/r/1541/
........

Merged revisions 342383 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 20:04:15 +00:00
Terry Wilson 1bc124ae58 Properly update membercount for reloaded members
Since q->membercount is set to 0 before reloading, it is important
to increment it again for reloaded members as well as added.

(closes issue AST-676)

Review: https://reviewboard.asterisk.org/r/1541/
........

Merged revisions 342380 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 19:53:13 +00:00
Gregory Nietsky 55a92b7499 queues container needs locking when using the OBJ_NOLOCK flag
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@342017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-24 07:31:10 +00:00
Gregory Nietsky 05f7d0c095 Remove some ref leaks and a return without unlock.
There some resource leaks introduced in asterisk 10
make sure that locks are not held on return and we 
release ref's held.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-23 14:20:35 +00:00
Gregory Nietsky b0120e5e43 Revert Janitor patch 341920 For now
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-23 11:37:03 +00:00
Gregory Nietsky ec07b6448c Whitespace Fixups / Add Braces
This janitorial patch is related to work on RB1538
........

Merged revisions 341906 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-23 11:24:49 +00:00
Gregory Nietsky 3aa9147fc2 Add option to check state when state is unknown
r341486 reverts r325483 this is a rework of the patch.
optimize to minimize load.

add option check_state_unknown to control whether a member with unknown
device state is checked there is a small % chance that calls will be sent
to the member when they on a call.

app_queue will see a device with unknown state as available and does not 
try verify the state without this option enabled.

Review: https://reviewboard.asterisk.org/r/1535/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 17:13:23 +00:00
Matthew Nicholson 69d2d46275 Fix a performance regression introduced in r325483.
The regression was caused by a call to ast_parse_device_state() in app_queue's
ring_entry() function. The ast_parse_device_state() function eventually calls
ast_channel_get_full() with a channel name prefix which causes it to walk the
channel list causing massive lock contention and slow downs.

This patch fixes the regression by removing the call to
ast_parase_device_state() which should be unnecessary. Queue member device
state should be maintained by device state events. Some users have seen
instances where busy agents were called when they shouldn't have, which is the
reason the call to ast_parse_device_state() was added. That change appears to
have resolved that issue but also causes this performance regression. There may
still be issues with queue member status, and if so, alternative methods should
be investigated to resolve them.

AST-695


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-19 21:23:17 +00:00
Paul Belanger 824c5dbfa2 Multiple revisions 341108,341112
........
  r341108 | pabelanger | 2011-10-17 12:22:19 -0400 (Mon, 17 Oct 2011) | 2 lines
  
  Voicemail compiler flags are 'core' support
........
  r341112 | pabelanger | 2011-10-17 12:23:33 -0400 (Mon, 17 Oct 2011) | 2 lines
  
  Fix previous commit
........

Merged revisions 341108,341112 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-17 16:26:33 +00:00
Jonathan Rose d3831204a9 Fixes some support level info so that it can be read by menuselect.
(issue ASTERISK-18268)
Review: https://reviewboard.asterisk.org/r/1525/
........

Merged revisions 340863 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-14 16:18:08 +00:00
Richard Mudgett ec1778c05f Update MeetMe p and X option documentation when interacting with the s option.
ASTERISK-12175 changed the p and X options to not interfere with the s
option when they are used together.  It makes more sense for the s option
to have priority for the DTMF '*' key since it cannot change its
activation code.  Otherwise, you could not use option s with the p or X
options.

JIRA AST-671
........

Merged revisions 340470 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-12 17:51:16 +00:00