Commit Graph

4483 Commits

Author SHA1 Message Date
Richard Mudgett de3dc17cc5 app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.
When MOH is playing to a user in a conference and the user is kicked or
hangs up from the conference then the AMI MusicOnHoldStop events didn't
happen.  (Asterisk v11 AMI event: MusicOnHold, state:Stop)

(closes issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

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

Merged revisions 410490 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 410491 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 18:47:10 +00:00
Scott Griepentrog 80ef9a21b9 uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it.  Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation.  This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first.  In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.

Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.

(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........

Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:47:55 +00:00
Richard Mudgett 77ad5ec2e3 app_confbridge: Remove some noop code.
........

Merged revisions 409976 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 00:33:13 +00:00
Kinsey Moore abf1d883f7 app_queue: Fix documented AMI event name
During the rewrite of AMI events to use the Stasis bus, the name of the
QueueMemberPaused event was changed to QueueMemberPause. This corrects
documentation to reflect that.
........

Merged revisions 409234 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:24:47 +00:00
Richard Mudgett d277f3ec3e json: Fix off-nominal json ref counting issues.
* Fixed off-nominal json ref counting issue with using the following API
calls: ast_json_object_set() and ast_json_array_append().

* Fixed off-nominal error reporting in ast_ari_endpoints_list().

* Fixed some miscellaneous off-nominal json ref counting issues in
report_receive_fax_status() and dial_to_json().
........

Merged revisions 408713 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 18:04:54 +00:00
Michael L. Young ef46c82cfb app_chanspy: Documentation Update To Clarify "x" Option
When using the "x" option (specify a DTMF digit to exit the application), it is
not obvious in the documentation that this only works when spying on a channel.
If a channel being used to spy on other channels is waiting to connect to a
channel or is no longer attached to a channel, the DTMF is ignored.

As noted on the issue tracker, since there are workarounds available and this is
a rarely used option we are opting for a documentation change here.

(closes issue ASTERISK-22661)
Reported by: Chris Hillman
Patches:
    asterisk-22661-doc-clarify-chan_spy.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

Merged revisions 408537 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 408538 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 00:50:02 +00:00
Rusty Newton b17c80f4f0 apps/app_queue - Fix incorrect Macro parameter documentation
Macro is executed on the called channel, not the calling channel.

(closes issue ASTERISK-23069)
Reported By: Bryan Anderson
........

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

Merged revisions 408448 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 408449 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 02:44:26 +00:00
Kinsey Moore 75edef52e0 ConfBridge: Correct prompt playback target
Currently, when the first marked user enters the conference that
contains waitmarked users, a prompt is played indicating that the user
is being placed into the conference. Unfortunately, this prompt is
played to the marked user and not the waitmarked users which is not
very helpful.

This patch changes that behavior to play a prompt stating
"The conference will now begin" to the entire conference after adding
and unmuting the waitmarked users since the design of confbridge is not
conducive to playing a prompt to a subset of users in a conference in
an asynchronous manner.

(closes issue PQ-1396)
Review: https://reviewboard.asterisk.org/r/3155/
Reported by: Steve Pitts
........

Merged revisions 407857 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407858 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 16:01:37 +00:00
Corey Farrell ccf8b48f14 app_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK
STACK_PEEK requires 2 parameters and LOCAL_PEEK requires 1 parameter.  This
protects against situations where those parameters are blank or missing by
logging an error and returning.

(closes issue ASTERISK-23220)
Reported by: James Sharp
........

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

Merged revisions 407103 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407104 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-01 00:25:54 +00:00
Matthew Jordan 66c46fba24 CDRs: fix a variety of dial status problems, h/hangup handler creating CDRs
This patch fixes a number of small-ish problems that were noticed when
witnessing the records that the FreePBX dialplan produces:
(1) Mid-call events (as well as privacy options) have the ability to change the
    overall state of the Dial operation after the called party answers. This
    means that publishing the DialEnd event when the called party is premature;
    we have to wait for the execution of these subroutines to complete before
    we can signal the overall status of the DialEnd. This patch moves that
    publication and adds handlers for the mid-call events.
(2) The AST_FLAG_OUTGOING channel flag is cleared if an after bridge goto
    datastore is detected. This flag was preventing CDRs from being recorded
    for all outbound channels that had a 'continue' option enabled on them by
    the Dial application.
(3) The CDR engine now locks the 'Dial' application as being the CDR
    application if it detects that the current CDR has entered that app. This
    is similar to the logic that is done for Parking. In general, if we entered
    into Dial, then we want that CDR to record the application as such - this
    prevents pre-dial handlers, mid-call handlers, and other shenaniganry
    from changing the application value.
(4) The CDR engine now checks for the AST_SOFTHANGUP_HANGUP_EXEC in more places
    to determine if the channel is in hangup logic or dead. In either case, we
    don't want to record changes in the channel.
(5) The default option for "endbeforehexten" has been changed to "yes". In
    general, you don't want to see CDRs in the 'h' exten or in hangup logic.
    Since the semantics of that option changed in 12, it made sense to update
    the default value as well.
(6) Finally, because we now have the ability to synchronize on the messages
    published to the CDR topic, on shutdown the CDR engine will now synchronize
    to the messages currently in flight. This helps to ensure that all
    in-flight CDRs are written before shutting down.

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

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

Merged revisions 407084 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:40:51 +00:00
Matthew Jordan f922912731 app_dial: Allow macro/gosub pre-bridge execution to occur on priorities
The parsing for the destination of the macro/gosub uses the '^' character to
separate out context, extension, and priority. However, the logic for the
macro/gosub execution was written such that it would only do the actual
macro/gosub jump if a '^' character existed. This doesn't apply when the
macro/gosub jump occurs in a priority/priority label. This patch changes
the logic so that the parsing still occurs, but the jump will occur even
for priorities/priority labels.

(issue ASTERISK-23164)

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

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

Merged revisions 407074 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 407082 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:34:47 +00:00
Richard Mudgett aeb4466656 ChanSpy: Add ability to specify channel uniqueids as well as channel names.
* Made ChanSpy accept a channel uniqueid or a fully specified channel name
as the chanprefix parameter if the 'u' option is specified.

(closes issue AFS-42)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:04:25 +00:00
Kinsey Moore 3e6c4a6f89 ConfBridge: Fix channel parameter documentation
Confbridge AMI and CLI commands for mute, unmute, and setting the
single video source can accept channel prefixes in lieu of a full
channel name, but documentation states only that it is required and is
a channel name. This corrects the documentation.

(closes issue PQ-1397)
Reported by: Steve Pitts
........

Merged revisions 406217 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 406223 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 19:36:23 +00:00
Rusty Newton f6647d2362 Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027
Fixes typos of "transfered" instead of "transferred" in various code. Fixes incorrect gosub param help text for app_queue.
Fixes Asterisk man pages containing unquoted minus signs. Adds note about the "textsupport" option in sip.conf.sample.

(issue ASTERISK-23061)
(issue ASTERISK-23028)
(issue ASTERISK-23046)
(issue ASTERISK-23027)
(closes issue ASTERISK-23061)
(closes issue ASTERISK-23028)
(closes issue ASTERISK-23046)
(closes issue ASTERISK-23027)
Reported by: Eugene, Jeremy Laine, Denis Pantsyrev
Patches:
 transferred.patch uploaded by Jeremy Laine (license 6561)
 hyphen.patch uploaded by Jeremy Laine (license 6561)
 sip.conf.sample.patch uploaded by Eugene (license 6360)
........

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

Merged revisions 405792 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405829 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 17:16:14 +00:00
Richard Mudgett 828f339a9c verbosity: Fix performance of console verbose messages.
The per console verbose level feature as previously implemented caused a
large performance penalty.  The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version.  If the new
rasterisk connects to an older Asterisk version then the root console
verbose level is always affected by the "core set verbose" command of the
remote console even though it may appear to only affect the current
console.  If an older version of rasterisk connects to the new version
then the "core set verbose" command will have no effect.

* Fixed the verbose performance by not generating a verbose message if
nothing is going to use it and then filtered any generated verbose
messages before actually sending them to the remote consoles.

* Split the "core set debug" and "core set verbose" CLI commands to remove
the per module verbose support that cannot work with the per console
verbose level.

* Added a silent option to the "core set verbose" command.

* Fixed "core set debug off" tab completion.

* Made "core show settings" list the current console verbosity in addition
to the root console verbosity.

* Changed the default verbose level of the 'verbose' setting in the
logger.conf [logfiles] section.  The default is now to once again follow
the current root console level.  As a result, using the AMI Command action
with "core set verbose" could again set the root console verbose level and
affect the verbose level logged.

(closes issue AST-1252)
Reported by: Guenther Kelleter

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

Merged revisions 405431 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405432 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 18:14:02 +00:00
Matthew Jordan 373965dbff CDRs: Synchronize dialplan applications that manipulate CDRs with the engine
In https://reviewboard.asterisk.org/r/3057/, applications and functions that
manipulate CDRs were made to interact over Stasis. This was done to
synchronize manipulations of CDRs from the dialplan with the updates the
engine itself receives over the message bus.

This change rested on a faulty premise: that messages published to the CDR
topic or to a topic that forwards to the CDR topic are synchronized with the
messages handled by the CDR topic subscription in the CDR engine. This is not
the case. There is no ordering guaranteed for two messages published to the
same topic; ordering is only guaranteed if a message is published to the same
subscriber.

Stasis was modified in r405311 to allow a publisher to synchronize on the
subscriber. This patch uses that API to synchronize the CDR publishers with
the CDR engine message router, which maintains the overall topic subscription.

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

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

Merged revisions 405312 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 22:13:12 +00:00
Matthew Jordan 50b2d6eec1 app_confbridge: Fix crash caused when waitmarked/marked users leave together
When waitmarked users join a ConfBridge, the conference state is transitioned
from EMPTY -> INACTIVE. In this state, the users are maintined in a waiting
users list. When a marked user joins, the ConfBridge conference transitions
from INACTIVE -> MULTI_MARKED, and all users are put onto the active list of
users. This process works correctly.

When the marked user leaves, if they are the last marked user, the MULTI_MARKED
state does the following:
(1) It plays back a message to the bridge stating that the leader has left the
    conference. This requires an unlocking of the bridge.
(2) It moves waitmarked users back to the waiting list
(3) It transitions to the appropriate state: in this case, INACTIVE

However, because it plays the prompt back to the bridge before moving the users
and before finishing the state transition, this creates a race condition: with
the bridge unlocked, waitmarked users who leave the conference (or are kicked
from it) can cause a state transition of the bridge to another state before
the conference is transitioned to the INACTIVE state. This causes the state
machine to get a bit wonky, often leading to a crash when the MULTI_MARKED state
attempts to conclude its processing.

This patch fixes this problem:
(1) It prevents kicked users from being kicked again. That's just a nicety.
(2) More importantly, it fixes the race condition by only playing the prompt
    once the state has transitioned correctly to INACTIVE. If waitmarked users
    sneak out during the prompt being played, no harm no foul.

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

Note that the patch committed here is essentially the same as uploaded by
Simon Moxon on ASTERISK-22740, with the addition of the double kick prevention.

(closes issue AST-1258)
Reported by: Steve Pitts

(closes issue ASTERISK-22740)
Reported by: Simon Moxon
patches:
  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)
........

Merged revisions 405215 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405216 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 15:50:23 +00:00
Walter Doekes c94e4ee1ac "Minimun" typo.
........

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

Merged revisions 405161 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405162 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 14:15:23 +00:00
Richard Mudgett e95e66cede app_voicemail: Explicitly set defaultenabled=yes
........

Merged revisions 405006 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 21:55:09 +00:00
Richard Mudgett 9fa171e547 External MWI core support.
* The core external MWI resource provides for MWI message counts
persistence using sorcery.  With sorcery, the user is able to configure
which sorcery wizzard backend to use if the default astdb is not desired.

* The core external MWI resoruce provides some debugging CLI commands
enabled by defining MWI_DEBUG_CLI.

The debugging CLI commands are:
"mwi delete all",
"mwi delete like <regex>",
"mwi delete mailbox <mailbox>",
"mwi list all",
"mwi list like <regex>",
"mwi show mailbox <mailbox>", and
"mwi update mailbox <mailbox> [<new> [<old>]]".

(closes issue AFS-43)

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

Merged revisions 404952 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 17:45:25 +00:00
Kevin Harwell 0db94b70b9 app_meetme: compiler warning
Fixed a compiler warning (errors in 'dev-mode') given by gcc version 4.8.1.
The one in app_meetme involved the 'sizeof-pointer-memaccess'
(see: http://gcc.gnu.org/gcc-4.8/porting_to.html) warning. Fixed so
it would no longer issue a warning and can compile again in 'dev-mode'.

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

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

Merged revisions 404773 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 404781 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 18:31:35 +00:00
Richard Mudgett e4803bbd9e Voicemail: Remove mailbox identifier format (box@context) assumptions in the system.
This change is in preparation for external MWI support.

Removed code from the system for normal mailbox handling that appends
@default to the mailbox identifier if it does not have a context.  The
only exception is the legacy hasvoicemail users.conf option.  The legacy
option will only work for app_voicemail mailboxes.  The system cannot make
any assumptions about the format of the mailbox identifer used by
app_voicemail.

chan_sip and chan_dahdi/sig_pri had the most changes because they both
tried to interpret the mailbox identifier.  chan_sip just stored and
compared the two components.  chan_dahdi actually used the box
information.

The ISDN MWI support configuration options had to be reworked because
chan_dahdi was parsing the box@context format to get the box number.  As a
result the mwi_vm_boxes chan_dahdi.conf option was added and is documented
in the chan_dahdi.conf.sample file.

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

Merged revisions 404348 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19 16:52:43 +00:00
Matthew Jordan 7e9febbf86 app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating state
When doing the rework of the CDR engine that pushed all of the logic into cdr.c
and made it respond to changes in channel state over Stasis, we knew that
accessing the CDR engine from the dialplan would be "slightly"
non-deterministic. Dialplan threads would be accessing CDRs while Stasis
threads would be updating the state of said CDRs - whereas in the past,
everything happened on the dialplan threads. Tests have shown that "slightly"
is in reality "very".

This patch synchronizes things by making the dialplan applications/functions
that manipulate CDRs do so over Stasis. ForkCDR, NoCDR, ResetCDR, CDR, and
CDR_PROP now all use Stasis to send their requests over to the CDR engine,
and synchronize on the channel Stasis topic via a subscription so that they
return their values/control to the dialplan at the appropriate time.

While going through this, the following changes were also made:
 * DISA, which can reset the CDR when a user successfully authenticates, now
   just uses the ResetCDR app to do this. This prevents having to duplicate
   the same Stasis synchronization logic in that application.
 * Answer no longer disables CDRs. It actually didn't work anyway - calling
   DISABLE on the channel's CDR doesn't stop the CDR from getting the Answer
   time - it just kills all CDRs on that channel, which isn't what the caller
   would intend.

(closes issue ASTERISK-22884)
(closes issue ASTERISK-22886)

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

Merged revisions 404294 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-19 00:50:01 +00:00
Kevin Harwell 28c0cb28d0 channel locking: Add locking for channel snapshot creation
Original commit message by mmichelson (asterisk 12 r403311):

"This adds channel locks around calls to create channel snapshots as well
as other functions which operate on a channel and then end up
creating a channel snapshot. Functions that expect the channel to be
locked prior to being called have had their documentation updated to
indicate such."

The above was initially committed and then reverted at r403398.  The problem
was found to be in core_local.c in the publish_local_bridge_message function.
The ast_unreal_lock_all function locks and adds a reference to the returned
channels and while they were being unlocked they were not being unreffed when
no longer needed.  Fixed by unreffing the channels.

Also in bridge.c a lock was obtained on "other->chan", but then an attempt was
made to unlock "other" and not the previously locked channel.  Fixed by
unlocking "other->chan"

(closes issue ASTERISK-22709)
Reported by: John Bigelow
........

Merged revisions 404237 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 20:33:37 +00:00
Joshua Colp e2630fcd51 channels: Return allocated channels locked.
This change makes ast_channel_alloc return allocated channels
locked. By doing so no other thread can acquire, lock, and manipulate
the channel before it is completely set up.

(closes issue AST-1256)

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

Merged revisions 404204 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-18 19:28:05 +00:00
Rusty Newton f7c60b8fb6 Several components: fixing Typos in comments and code, "avaliable" instead of "available"
(issue ASTERISK-23021)
(closes issue ASTERISK-23021)
Reported by: Jeremy Lainé
Tested by: Rusty Newton
Patches:
   available.patch uploaded by Jeremy Lainé (license 6561)
........

Merged revisions 404046 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17 23:38:02 +00:00
Jonathan Rose b0bb03e916 bridging: Give bridges a name and a known creator
Bridges have two new optional properties, a creator and a name.
Certain consumers of bridges will automatically provide bridges that
they create with these properties. Examples include app_bridgewait,
res_parking, app_confbridge, and app_agent_pool. In addition, a name
may now be provided as an argument to the POST function for creating
new bridges via ARI.

(closes issue AFS-47)
Review: https://reviewboard.asterisk.org/r/3070/
........

Merged revisions 404042 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17 23:25:49 +00:00
Scott Griepentrog 3322180d4b app_sms: BufferOverflow when receiving odd length 16 bit message
This patch prevents an infinite loop overwriting memory when
a message is received into the unpacksms16() function, where
the length of the message is an odd number of bytes.

(closes issue ASTERISK-22590)
Reported by: Jan Juergens
Tested by: Jan Juergens
........

Merged revisions 403856 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16 15:30:18 +00:00
Joshua Colp 3a5cc054ed res_stasis: Expose event for call forwarding and follow forwarded channel.
This change adds an event for when an originated call is redirected to
another target. This event contains the original channel and the newly
created channel. If a stasis subscription exists on the original originated
channel for a stasis application then a new subscription will also be
created on the stasis application to the redirected channel. This allows
the application to follow the call path completely.

(closes issue ASTERISK-22719)
Reported by: Joshua Colp

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

Merged revisions 403808 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-14 17:19:41 +00:00
Richard Mudgett 8183bba99a app_voicemail: Voicemail callback registration/unregistration function improvements.
* The voicemail registration/unregistration functions now take a struct of
callbacks instead of a lengthy parameter list of callbacks.

* The voicemail registration/unregistration functions now prevent a
competing module from interfering with an already registered callback
supplying module.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 19:19:24 +00:00
Jonathan Rose f6e92c35df app_page: Add predial handlers for app_page.
(closes issue AFS-14)
Review: https://reviewboard.asterisk.org/r/3045/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 22:17:14 +00:00
Mark Michelson d421818c3d Add a CONFBRIDGE_RESULT channel variable to discern why a channel left a ConfBridge.
Review: https://reviewboard.asterisk.org/r/3009



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 17:29:48 +00:00
Mark Michelson 5730410861 Create function for retrieving Mixmonitor instance data.
For the time, this is only useful for retrieving the filename.

The purpose of this function is to better facilitate multiple
mixmonitors per channel. Setting a MIXMONITOR_FILENAME channel
variable is not conducive to such behavior, so allowing finer
grained access to individual mixmonitor properties improves
the situation. The MIXMONITOR_FILENAME channel variable is still
set, though, so there is no worry about backwards compatibility.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 16:42:59 +00:00
Jonathan Rose ae92549c93 app_record: Add an option that allows DTMF '0' to act as an additional terminator
Using this terminator when active results in ${RECORD_STATUS} being set to
'OPERATOR' instead of 'DTMF'

(closes issue AFS-7)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 23:40:38 +00:00
David M. Lee 1212906351 Reverting r403311. It's causing ARI tests to hang.
........

Merged revisions 403398 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-05 22:10:20 +00:00
Mark Michelson 8e8b329e14 Add channel locking for channel snapshot creation.
This adds channel locks around calls to create channel snapshots as well
as other functions which operate on a channel and then end up
creating a channel snapshot. Functions that expect the channel to be
locked prior to being called have had their documentation updated to
indicate such.
........

Merged revisions 403311 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 17:07:29 +00:00
Rusty Newton a368df42d4 app_voicemail: when forwarding a message, play vm-msgforwarded instead of vm-msgsaved
In the last release of sounds, 1.4.25 we added a vm-msgforwarded prompt for various core languages. Now we use that prompt.

(issue ASTERISK-21413)
(closes issue ASTERISK-21413)
Reported by: netwrkr
Tested by: newtonr


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 00:22:02 +00:00
Richard Mudgett 18c2cfa7b7 PickupChan: Add ability to specify channel uniqueids as well as channel names.
* Made PickupChan() search by channel uniqueids if the search could not
find a channel by name.

* Ensured PickupChan() never considers the picking channel for pickup.

* Made PickupChan() option p use a common search by name routine.  The
original search was erroneously case sensitive.

(issue AFS-42)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 16:43:21 +00:00
Jonathan Rose a60764d61e app_directory: Set variable indicating reason directory exited
By the time the directory application exits, a channel variable
DIRECTORY_RESULT will be set for the channel that invoked it which
can be used to determine the reason for exit. The changes log and
the app_directory documentation contain specific details about
each of the possible values for DIRECTORY_RESULT.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 22:38:31 +00:00
Jonathan Rose 7950118e18 Confbridge: Add option to review the recording similar to announce_join_leave
Review: https://reviewboard.asterisk.org/r/3008/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-15 22:38:52 +00:00
Richard Mudgett 9cea557f6c Pickup: Pickup() and PickupChan() parameter parsing improvements.
* Made Pickup() and PickupChan() tollerate empty pickup values.  i.e., You
can now have Pickup(&&exten@context).

* Made PickupChan() use the standard option flag parsing code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-14 21:36:25 +00:00
Richard Mudgett d79a795259 Pickup: Ensure using PICKUPMARK never considers the picking channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-14 20:53:52 +00:00
Jonathan Rose ad0e70ba83 Say: If SAY_DTMF_INTERRUPT is set to an ast_true value, jump on DTMF
Similar to how background works, if a say application is called with
this variable set to 'true', 'yes', 'on', etc. then using DTMF while
the say action is in progress will result in the channel jumping to
that extension in the dialplan.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-14 20:32:45 +00:00
Kinsey Moore 4f61528fba CELGenUserEvent: Fix error message from ast_json_pack
This prevents NULL from being passed into an ast_json_pack call when no
extra information is passed to the application which prevents an error
message about NULL arguments from being generated.
........

Merged revisions 402755 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 16:34:31 +00:00
Jonathan Rose d720bc7686 Confbridge: add test events for dynamic menus test
Adds a couple of test events for conference menu actions so that it's
easy to discern when those menu actions have been triggered.

(issue ASTERISK-22760)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2999/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 20:28:38 +00:00
Mark Michelson 92cf776119 Get rid of some inaccurate comments.
I'm doing some unrelated work in app_confbridge and finding
these "invalid pin" comments to be annoying. Get out!
........

Merged revisions 402686 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402687 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 19:31:40 +00:00
Kinsey Moore 483d127d55 app_queue: Honor penalty limits of 0
In the current app_queue code from 1.8 up to trunk the upper and lower
penalties can be set to 0 but the value is interpreted to be disabled
instead of actually setting limits. This is especially evident if min
and max limits are set to 0 and members with penalties of 0 and 1 are
in the queue since the member with penalty 1 will still receive calls.
This patch adjusts the special disabled value to be INT_MAX instead of
0.

(closes issue ASTERISK-20862)
Review: https://reviewboard.asterisk.org/r/2995/
Reported by: Schmooze Com
........

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

Merged revisions 402646 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402647 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 15:37:03 +00:00
Kevin Harwell 2564ed26f7 app_dahdiras: Use waitpid instead of wait4.
Several places in the code were using wait4 while other places were using
waitpid.  This change makes all places use waitpid in order to make things
more consistent and since the 'rusage' object passed in/out of wait4 was
never used.

(closes issue ASTERISK-22557)
Reported by: YvesGael
Patches:
     asterisk-11.5.1-wait4.patch uploaded by hurdman (license 6537)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 14:58:13 +00:00
Kevin Harwell cdfbc02df1 app_queue: crash if first agent is "busy"
If the first agent/member (via CLI "queue show") in a queue is "busy" (dnd,
circuit busy, etc...) and no agents answered then app_queue would crash.
This occurred because while the calling of agent(s) remained valid the channel
on "busy" agent would be set to NULL and then later dereferenced upon a second
"rna" function call.  The original intention of the code is to have only valid
"call attempt" objects (channels != NULL) checked while attempting to call
agent(s).  It does this by building a "call_next" list of valid "call attempt"
objects.  In the case of the "busy" agent subsequent builds of the valid "call
attempt" list would sometimes include (the case mentioned above) an invalid
"call attempt" object.

The fix was to make sure the "call attempt" list was appropriately built on
every iteration.  A NULL sanity check was also added at the original offending
spot of the crash just in case another one slipped by somehow.

(closes issue ASTERISK-22644)
Reported by: Marco Signorini
Review: https://reviewboard.asterisk.org/r/2983/
........

Merged revisions 402517 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-06 21:58:17 +00:00
Richard Mudgett a84cff117d confbridge: Separate user muting from system muting overrides.
The system overrides the user muting requests when MOH is playing or a
waitmarked user is waiting for a marked user to join.  System muting
overrides interfere with what the user may wish the muting to be when the
system override ends.

* User muting requests are now independent of the system muting overrides.
The effective muting is now the logical or of the user request and system
override.

* Added a Muted flag to the CLI "confbridge list <conference>" command.

* Added a Muted header to the AMI ConfbridgeList action ConfbridgeList
event.

(closes issue AST-1102)
Reported by: John Bigelow

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

Merged revisions 402425 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402427 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-02 03:24:47 +00:00