Commit Graph

4507 Commits

Author SHA1 Message Date
Richard Mudgett 4b4fe69f9f app_meetme: Don't interrupt MOH for waitmarked users.
Occasionally, when the last marked user leaves the conference, waitmarked
users don't get MOH if MOH is supposed to be played while a waitmarked
user is waiting for another marked user.

* Made not interrupt MOH when the user is a waitmarked user.  The
waitmarked user doesn't need to hear any leave announcements from the
conference as the user would have already heard different leave
announcements if they were enabled.  Apparently DAHDI occasionally sends
unending non-silent streams to these users or a normal user still in the
conference has continuous high background noise.  These non-silent streams
cause MOH to be suspended while the never ending "announcement" is played.

Issue caused by ASTERISK-13680.

AST-1349 #close
Reported by: Tyler Stewart

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 16:19:13 +00:00
Scott Griepentrog cf21644d6a ARI: Add ability to raise arbitrary User Events
User events can now be generated from ARI.  Events can be signalled with
arbitrary json variables, and include one or more of channel, bridge, or
endpoint snapshots.  An application must be specified which will receive
the event message (other applications can subscribe to it).  The message
will also be delivered via AMI provided a channel is attached.  Dialplan
generated user event messages are still transmitted via the channel, and
will only be received by a stasis application they are attached to or if
the channel is subscribed to.

This change also introduces the multi object blob mechanism used to send
multiple snapshot types in a single message.  The dialplan app UserEvent
was also changed to use multi object blob, and a new stasis message type
created to handle them.

ASTERISK-22697 #close
Review: https://reviewboard.asterisk.org/r/3494/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 16:09:51 +00:00
Richard Mudgett d8c559a0dc app_meetme: Fix overwrite of DAHDI conference data structure.
Starting a conference recording using the admin menu overwrites the DAHDI
conference data structure used to modify the admin user's conference mute
mode.

* Made no longer pass the user's DAHDI conference data structure into the
menu functions.  The menu now uses its own DAHDI conference data
structure to start the recording channel.

* Moved the unlock conf->playlock to before playing the conf-full message.
No sense keeping the lock while that prompt is playing.  The user is never
going to get into the conference at that point.
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-15 22:02:32 +00:00
Jonathan Rose 643a7f02d6 app_chanspy: Fix a test that was failing on account of r413551
ASTERISK-23381 #close
ASTERISK-23381 #comment Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-12 22:33:28 +00:00
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:49:26 +00:00
Jonathan Rose 5770483217 app_chanspy: Fix a bug where Barge mode could fail
If the barge audiohook was attached prior to the spyee and its peer
actually being bridged, the audiohook would not be applied and the
connected peer would not be able to hear audio from the spy when the
spy is in barge mode.

(closes issue ASTERISK-23381)
Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 17:03:41 +00:00
Joshua Colp f2ca3438e7 app_queue: Extend documentation for various Manager actions and events.
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-08 00:36:38 +00:00
Richard Mudgett a92f0a9e83 app_confbridge: Fixed "CBAnn" channels not going away.
Fixed a ref leak in conf_handle_talker_cb() everytime the conference
bridge was found to report a channel's talker status change.  The
resulting leak caused the "CBAnn" channels and the conference bridge to
never be destroyed.

Thanks to Richard Kenner on the asterisk-user's list for locating the
problem.

Reported by: Richard Kenner
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 20:59:13 +00:00
Richard Mudgett 90b9413a0d app_confbridge: Fix ref leak in CLI "confbridge kick" command.
Fixed ref leak in the CLI "confbridge kick" command when the channel to be
kicked was not in the conference.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 20:39:29 +00:00
Kinsey Moore e91f65bb91 Confbridge: Fix ConfbridgeKick AMI documentation
This adds documentation for the "all" channel option for the
ConfbridgeKick AMI action and adjusts AMI responses accordingly.

(issue ASTERISK-23282)
Reported by: Dorian Logan
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 14:58:12 +00:00
Kinsey Moore ea23198a96 Confbridge: Add references for kick all option
After the ability to kick all attendees from a conference was added, a
rework removed the comment about that feature from the CLI
documentation. This adds that documentation and adds "all" to the
participant tab completion list for the confbridge kick command.

(closes issue ASTERISK-23282)
Reported by: Dorian Logan
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-21 14:47:37 +00:00
Matthew Jordan 21759b02ed app_sms: Fix uninitialized values; hangup channel when REL is sent successfully
This patch fixes two issues in app_sms:
(1) Firstly, the 'flags' field on the stack in sms_exec() is uninitialised,
    causing it to use the wrong protocol in some cases. This patch correctly
    initializes the flags fields.

(2) Secondly, when disconnect supervision is not working or
    inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
    terminate the call after it sent the REL(ease) message and the peer stopped
    talking to it. This patch fixes the code to handle the 'bad stop bit'
    message more gracefully in that case, and hang up the call.

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

ASTERISK-18331 #close
Reported by: David Woodhouse
patches:
  asterisk-fix-sms.patch uploaded by David Woodhouse (License 5754)
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-19 01:31:27 +00:00
Richard Mudgett 51b6c49681 Originated calls: Fix several originate call problems.
* Restore the reason value set by pbx_outgoing_attempt() to use
AST_CONTROL_xxx values as all the consumers were expecting rather than
cause codes.

* Fixed the dial routines to set cause codes for more than just
ast_request() so pbx_outgoing_attempt() reason codes will function.

* Fix inconsistent locked_channel return status in pbx_outgoing_attempt().
The chanel may not have been locked or the channel may have been a stale
pointer.

* Fixed the OutgoingSpoolFailed channel to run dialplan whenever the
dialing fails for an originate exten and 1 < synchronous.

* Fix incorrect ast_cond_wait() usage in pbx_outgoing_attempt().
Indroduced by issue ASTERISK-22212 patch.

* Made struct pbx_outgoing use the ao2 lock instead of its own lock for
the cond wait mutex.  No sense in having two locks associated with the
same struct when only one is needed.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:44:48 +00:00
Richard Mudgett cbe7f65674 app_dial and app_queue: Make lock the forwarding channel while taking the channel snapshot.
* Fixed ast_channel_publish_dial_forward() not locking the forwarded
channel when taking the channel snapshot.

* Fixed app_dial.c:do_forward() using the wrong channel to get the
original call forwarding string.

* Removed unnecessary locking when calling ast_channel_publish_dial() and
ast_channel_publish_dial_forward() in app_dial and app_queue.  Holding
channel locks when calling ast_channel_publish_dial_forward() with a
forwarded channel could result in pausing the system while the stasis bus
completes processsing a forwarded channel subscription.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:27:31 +00:00
Russell Bryant 5b7a769fd8 (mix)monitor: Add options to enable a periodic beep
Add an option to enable a periodic beep to be played into a call if it
is being recorded.  If enabled, it uses the PERIODIC_HOOK() function
internally to play the 'beep' prompt into the call at a specified
interval.  This option is provided for both Monitor() and
MixMonitor().

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 23:21:19 +00:00
Richard Mudgett 04429e5c39 app_stack: Add missing unlock in off-nominal path of STACK_PEEK function.
ASTERISK-23620 #close
Reported by: Bradley Watkins
Patches:
      ASTERISK-23620_unlock_oldlist.patch (license #5021) patch uploaded by Bradley Watkins
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 21:43:30 +00:00
Kinsey Moore d6e2c50058 bridging: Ensure locking during snapshot creation
While the vast majority of bridge snapshot creation is locked properly,
there are currently some instances that are not. This adds the missing
locking to ensure bridge state is not malleable during snapshot
creation.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 12:43:34 +00:00
Mark Michelson 755696dcd0 Add a Command header to the AMI Mixmonitor action.
This fixes a parsing error that occurred during the processing of
the AMI action. The error did not result in MixMonitor itself
misbehaving, but it could result in the AMI response not giving
correct information back.

The new header allows for one to specify a post-process command
to run when recording finishes. Previously, in order to do this,
the post-process command would have to be placed at the end of
the Options: header. 

Patches: mixmonitor_command_2.patch by jhardin (License #6512)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-09 21:43:23 +00:00
Richard Mudgett 158bd5dd74 app_confbridge: Fix confbridge.conf dsp_talking_threshold option setting wrong parameter.
Fixed copy pasta error.

ASTERISK-23545 #close
Reported by: John Knott
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 18:10:43 +00:00
Walter Doekes 76d5c4ed43 app_queue: Re-add HoldTime to QueueCallerAbandon event (simple typo during ast12 refactor).
Reported by: Ibrahim22 (on IRC)
Tested by: Ibrahim22
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 14:57:57 +00:00
Joshua Colp c7b8633c26 app_queue: Fix a bug where realtime members would be deleted during reload causing waiting callers to get ejected.
This patch causes realtime queue members to remain in queues during the reload process. Previously these
members would be removed causing any waiting callers to be ejected from the queue with a reason of "EXITEMPTY".

ASTERISK-23547 #close
ASTERISK-23547 #comment Patch app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo Rossi (license 6409)

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 16:52:12 +00:00
Corey Farrell fbe0dfaf44 Fix dialplan function NULL channel safety issues
(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 19:21:44 +00:00
Jonathan Rose 3c16865fc2 app_confbridge: Fix bug - users with startmuted set don't start muted
(closes issue ASTERISK-23461)
Reported by: Chico Manobela
Review: https://reviewboard.asterisk.org/r/3373/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20 23:02:45 +00:00
Richard Mudgett 1900bae7b6 app_confbridge: Add missing destructor call to announcer channel destructor.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 16:48:55 +00:00
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