Commit Graph

825 Commits

Author SHA1 Message Date
Jonathan Rose 4b7ff87492 app_confbridge: Make the CONFBRIDGE function be able to create dynamic menus
Also adds the ability to clear all profile items and makes behavior more
consistent with documentation as when choosing whether to use CONFBRIDGE
datastore profiles or the application arguments to the confbridge application.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-01 22:48:14 +00:00
Richard Mudgett f87086b374 app_confbridge: Can now set the language used for announcements to the conference.
ConfBridge now has the ability to set the language of announcements to the
conference.  The language can be set on a bridge profile in
confbridge.conf or by the dialplan function
CONFBRIDGE(bridge,language)=en.

(closes issue ASTERISK-19983)
Reported by: Jonathan White
Patches:
      M19983_rev2.diff (license #5138) patch uploaded by junky (modified)
Tested by: rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-08 20:18:37 +00:00
Michael L. Young 2af53640c8 Add IPv6 Support To chan_iax2
This patch adds IPv6 support to chan_iax2.  Yay!

(closes issue ASTERISK-22025)
Patches:
  iax2-ipv6-v5-reviewboard.diff by Michael L. Young (license 5026)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 21:41:58 +00:00
Kinsey Moore b44ce141e5 chan_sip: Allow Asterisk to retry after 403 on register
This adds a global option in chan_sip to allow it to continue
attempting registration if a 403 is received, clearing the cached nonce
and treating it as a non-fatal response. Normally, this would cause
registration attempts to that endpoint to stop.

This also adds a similar per-outbound-registration option to chan_pjsip
which allows the retry interval to be altered for 403 responses to
REGISTER requests.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874/
Reported by: Rudi
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 15:57:11 +00:00
David M. Lee 9bed50db41 optional_api: Fix linking problems between modules that export global symbols
With the new work in Asterisk 12, there are some uses of the
optional_api that are prone to failure. The details are rather involved,
and captured on [the wiki][1].

This patch addresses the issue by removing almost all of the magic from
the optional API implementation. Instead of relying on weak symbol
resolution, a new optional_api.c module was added to Asterisk core.

For modules providing an optional API, the pointer to the implementation
function is registered with the core. For modules that use an optional
API, a pointer to a stub function, along with a optional_ref function
pointer are registered with the core. The optional_ref function pointers
is set to the implementation function when it's provided, or the stub
function when it's now.

Since the implementation no longer relies on magic, it is now supported
on all platforms. In the spirit of choice, an OPTIONAL_API flag was
added, so we can disable the optional_api if needed (maybe it's buggy on
some bizarre platform I haven't tested on)

The AST_OPTIONAL_API*() macros themselves remained unchanged, so
existing code could remain unchanged. But to help with debugging the
optional_api, the patch limits the #include of optional API's to just
the modules using the API. This also reduces resource waste maintaining
optional_ref pointers that aren't used.

Other changes made as a part of this patch:
 * The stubs for http_websocket that wrap system calls set errno to
   ENOSYS.

 * res_http_websocket now properly increments module use count.

 * In loader.c, the while() wrappers around dlclose() were removed. The
   while(!dlclose()) is actually an anti-pattern, which can lead to
   infinite loops if the module you're attempting to unload exports a
   symbol that was directly linked to.

 * The special handling of nonoptreq on systems without weak symbol
   support was removed, since we no longer rely on weak symbols for
   optional_api.

 [1]: https://wiki.asterisk.org/wiki/x/wACUAQ

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:40:27 +00:00
Matthew Jordan 449afdd9e8 Revert r394939 due to (numerous) objections
The patch from ASTERISK-21965 was committed perhaps a bit too hastily. Walter
and Tzafrir have pointed out numerous issues with the approach and have
propsed an alternative in r/2757. Since it's not a time critical issue and
is not worth holding up the release of 12 for it, I've gone ahead and reverted
r394939 from 12/trunk and re-opened ASTERISK-21965.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 20:22:08 +00:00
Matthew Jordan 629f43d2b6 Add database schema management using Alembic
This patch replaces contrib/realtime/ with a new setup for managing the
database schema required for database integration with Asterisk.  In
addition to initializing a database with the proper schema, alembic can do a
database migration to assist with upgrading Asterisk in the future.
Hopefully this helps make setting up and operating Asterisk with a database
easier.

With this the schema only needs to be maintained in one place instead of
once per database.  The schemas I have added here have a bit of improvement
over the examples that were there before (some added consistency and added
some missing indexes).  Managing the schema in one place here also applies
to all databases supported by SQLAlchemy.

See contrib/ast-db-manage/README.md for more details.

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

patch by Russell Bryant (license 6300)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28 20:55:53 +00:00
Matthew Jordan b7ec25ec2e Update CHANGES file for Asterisk 12
This updates the Asterisk 12 CHANGES file with the things that were missed
during the development cycle.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-28 20:49:02 +00:00
Matthew Jordan 9f4849724f Update CHANGES file to reflect pass through support for Opus/VP8
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 15:49:50 +00:00
Kinsey Moore 7b032c1adb Add SayAlphaCase and similar functionality for AGI
This adds a new dialplan application, SayAlphaCase, that performs much
the same function as SayAlpha except that it takes additional options
which allow the user to specify whether the case of each letter should
be announced for uppercase, lowercase, or all letters. Similar
functionality has been added to the SAY ALPHA AGI command via an
optional parameter.

Original Patch by: Kevin Scott Adams
Reported by: Kevin Scott Adams
Review: https://reviewboard.asterisk.org/r/2725/
(closes issue ASTERISK-20782)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 22:33:48 +00:00
Mark Michelson 00baddb906 Massively clean up app_queue.
This essentially makes app_queue usable again. From reviewboard:

* Reporting of transfers and call completion is done by creating stasis 
  subscriptions and listening for specific events in order to determine
  when the call is finished (either via a transfer or hangup).
* Dial end messages have been added where they were previously missing.
* Queue stats are properly being updated again once calls have finished.
* AgentComplete stasis messages and AMI events are now occurring again.
* Mixmonitor starting has been factored into its own function and uses the
  Mixmonitor API now instead of using ast_pbx_run()

In addition to the changes in app_queue, there are several supplementary changes as well:

* Queue logging now differentiates between attended and blind transfers. A
  note about this is in the CHANGES file.
* Local channel optimization events now report more information. This
  includes which of the two local channels involved is the destination of
  the optimization, the channel that is replacing the destination local channel,
  and an identifier so that begin and end events can be matched to each other.
  The end events are now sent whether the optimization was successful or not and
  includes an indicator of whether the optimization was successful.
* Changes were made to features and bridging_basic so that additional flags may
  be set on a bridge. This is necessary because the queue requires that its
  bridge only allows move-swap local channel optimizations into the bridge.

(closes issue ASTERISK-21517)
Reported by Matt Jordan

(closes issue ASTERISK-21943)
Reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 18:52:41 +00:00
Matthew Jordan e85dd76945 Allow the SIP_CODEC family of variables to specify more than one codec
The SIP_CODEC family of variables let you set the preferred codec to be
offered on an outbound INVITE request. However, for video calls, you need to
be able to set both the audio and video codecs to be offered. This patch lets
the SIP_CODEC variables accept a comma delineated list of codecs. The first
codec in the list is set as the preferred codec; additional codecs are still
offered however.

This lets a dialplan writer set both audio and video codecs, e.g.,
Set(SIP_CODEC=ulaw,h264)

Note that this feature was written by both Dennis Guse and Frank Haase

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

(closes issue ASTERISK-21976)
Reported by: Denis Guse
Tested by: mjordan, sysreq
patches:
  patch-channels-chan__sip.c-393919 uploaded by dennis.guse (license 6513)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 13:41:05 +00:00
Matthew Jordan 38236e54a8 Remove dead code from features.c; refactor pickup code into pickup.c
This patch does the following:
 * It moves the pickup code out of features.c and into pickup.c
 * It removes the vast majority of dead code out of features.c. In particular,
   this includes the parking code.

(issue ASTERISK-22134)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 02:32:44 +00:00
Matthew Jordan c8a91b5b01 Add queue member paused hints
This patch adds the ability in Queue to raise a hint when a member's paused
state changes. The hint uses the form 'Queue:{queue_name}_pause_{member_name}',
where {queue_name} and {member_name} are the name of the queue and the name
of the member to subscribe to, respectively.

For example: exten => 8501,hint,Queue:sales_pause_mark.

Members will show as In Use when paused.

Note that the format of the queue pause hint was changed slightly from what
is on the issue to accomodate suggestion on the code review.

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

(closes issue ASTERISK-20842)
Reported by: Philippe Lindheimer
patches:
  qpause-10-378206.diff uploaded by Philippe Lindheimer (license 5519)
  qpause-11-378206.diff uploaded by Philippe Lindheimer (license 5519)
  qpause-trunk-378206.diff uploaded by Philippe Lindheimer (license 5519)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 19:11:46 +00:00
Kinsey Moore 03090a88ba Fix documentation replication issues
This prevents XML documentation duplication by expanding channel and
bridge snapshot tags into channel and bridge snapshot parameter sets
with a given prefix or defaulting to no prefix. This also prevents
documentation from becoming fractured and out of date by keeping all
variations of the documentation in template form such that it only
needs to be updated once and keeps maintenance to a minimum.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 17:07:52 +00:00
Matthew Jordan 9ea74182ef Update CONTROL STREAM FILE to accept an 'offsetms' parameter
This patch allows starting playback of audio through the CONTROL STREAM FILE
AGI command to start at a particular offset. It will also return the final
position of the file in the 'endpos' attribute.

(closes issue ASTERISK-17803)
Reported by: Murray Melvin
patches:
  res_agi.c.r316293.diff uploaded by murraytm (license 6221)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-31 23:48:35 +00:00
Matthew Jordan 54803338b4 Always install safe_asterisk; add configuration file support
This patch modifies the behavior of safe_asterisk in two ways:
(1) It modifies the Asterisk Makefile such that safe_asterisk is always
    installed on a 'make install'. This was done as bugfixes in the
    safe_asterisk script were not applied in previous version of Asterisk
    without first removing the old version of the script.
(2) In order to keep a newly installed version of safe_asterisk from impacting
    local modifications, a new config file - safe_asterisk.conf.sample - has
    been provided. Settings that were previously modified in safe_asterisk can
    be set there instead.

(closes issue ASTERISK-21965)
Reported by: Jeremy Kister
patches:
  safe_asterisk.patch uploaded by jkister (License 6232)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:12:00 +00:00
Matthew Jordan 3a5b68f07c Allow setting allowmultiplelogin on an account basis
This patch modifies manager to allow the allowmultiplelogin setting to be set
on an account by account basis. When set in the general context, it will act
as the default for the defined accounts. Setting it in the account will
override the general setting.

(closes issue ASTERISK-21324)
Reported by: vldmr
patches:
  asterisk-manager-per-user-allowmultiplelogin.patch uploaded by vldmr (License 6487)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:11:49 +00:00
Kinsey Moore c3b8939be8 Add CEL local optimization record type
This adds a new CEL event type, AST_CEL_LOCAL_OPTIMIZE, to represent
local channel optimizations. Local channel optimizations were one of
several things conveyed by the now defunct BRIDGE_UPDATE event type.
This also adds a unit test to test generation of this new CEL event.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20 13:25:05 +00:00
Kinsey Moore 684c83b29b Add transfer support to CEL
This adds CEL support for blind and attended transfers and call pickup.
During the course of adding this functionality I noticed that
CONF_ENTER, CONF_EXIT, and BRIDGE_TO_CONF events are particularly
useless without a bridge identifier, so I added that as well.

This adds tests for blind transfers, several types of attended
transfers, and call pickup.

The extra field in CEL records now consists of a JSON blob whose fields
are defined on a per-event basis.

Review: https://reviewboard.asterisk.org/r/2658/
(closes issue ASTERISK-21565)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20 13:10:22 +00:00
Matthew Jordan 19d8f8c8e4 Add 'kick all' capability to ConfBridge CLI command
This patch adds the ability to kick all users out of a conference from the
ConfBridge kick CLI command. It is invoked by passing 'all' as the channel
parameter to the CLI command, i.e., "confbridge kick <conf> all".

Note that this patch was modified slightly to conform to trunk.

(closes issue ASTERISK-21827)
Reported by: dorianlogan
patches:
  kickall-patch_v2.diff uploaded by dorianlogan (License 6504)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 22:33:27 +00:00
Richard Mudgett d43b17a872 Replace chan_agent with app_agent_pool.
The ill conceived chan_agent is no more.  It is now replaced by
app_agent_pool.

Agents login using the AgentLogin() application as before.  The
AgentLogin() application no longer does any authentication.
Authentication is now the responsibility of the dialplan.  (Besides, the
authentication done by chan_agent did not match what the voice prompts
asked for.)

Sample extensions.conf
[login]
; Sample agent 1001 login
; Set COLP for in between calls so the agent does not see the last caller COLP.
exten => 1001,1,Set(CONNECTEDLINE(all)="Agent Waiting" <1001>)
; Give the agent DTMF transfer and disconnect features when connected to a caller.
same => n,Set(CHANNEL(dtmf-features)=TX)
same => n,AgentLogin(1001)
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

[caller]
; Sample caller direct connect to agent 1001
exten => 800,1,AgentRequest(1001)
same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
same => n,Hangup()

; Sample caller going through a Queue to agent 1001
exten => 900,1,Queue(agent_q)
same => n,Hangup()

Sample queues.conf
[agent_q]
member => Local/800@caller,,SuperAgent,Agent:1001

Under the hood operation overview:
1) Logged in agents wait for callers in an agents holding bridge.
2) Caller requests an agent using AgentRequest()
3) A basic bridge is created, the agent is notified, and caller joins the
   basic bridge to wait for the agent.
4) The agent is either automatically connected to the caller or must ack
   the call to connect.
5) The agent is moved from the agents holding bridge to the basic bridge.
6) The agent and caller talk.
7) The connection is ended by either party.
8) The agent goes back to the agents holding bridge.

To avoid some locking issues with the agent holding bridge, I needed to
make some changes to the after bridge callback support.  The after bridge
callback is now a list of requested callbacks with the last to be added
the only active callback.  The after bridge callback for failed callbacks
will always happen in the channel thread when the channel leaves the
bridging system or is destroyed.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-15 23:20:55 +00:00
Matthew Jordan 30d379851e Create Local channel messages on the Stasis message bus and produce AMI events
This patch does the following:

* It adds a virtual table of callbacks to core_unreal. These callbacks can be
  supplied by concrete implementations of "unreal" channel drivers, which lets
  the unreal channel driver call specific functionality when it performs some
  action. Currently, this is done to notify implementations when an
  optimization operation has begun, and when an optimization operation has
  succeeded.

* It adds Stasis-Core messages for Local channel bridging and Local channel
  optimization. Local channel optimization is now two events: a Begin and an
  End. Some consumers of Stasis-Core may want to know when an operation is
  beginning so that they can 'prepare' their information; others will be more
  concerned about when the operation has completed, so that they can 'fix up'
  information. Stasis-Core allows for both, as does AMI.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-08 14:26:40 +00:00
Matthew Jordan b193c2873d Handle hangup logic in the Stasis message bus and consumers of Stasis messages
This patch does the following:
* It adds a new soft hangup flag AST_SOFTHANGUP_HANGUP_EXEC that is set when a
  channel is executing dialplan hangup logic, i.e., the 'h' extension or a
  hangup handler. Stasis messages now also convey the soft hangup flag so
  consumers of the messages can know when a channel is executing said
  hangup logic.
* It adds a new channel flag, AST_FLAG_DEAD, which is set when a channel is
  well and truly dead. Not just a zombie, but dead, Jim. Manager, CEL, CDRs,
  and other consumers of Stasis have been updated to look for this flag to
  know when the channel should by lying six feet under.
* The CDR engine has been updated to better handle a channel entering and
  leaving a bridge. Previously, a new CDR was automatically created when a
  channel left a bridge and put into the 'Pending' state; however, this
  way of handling CDRs made it difficult for the 'endbeforehexten' logic to
  work correctly - there was always a new CDR waiting in the hangup logic
  and, even if 'ended', wouldn't be the CDR people wanted to inspect in the
  hangup routine. This patch completely removes the Pending state and instead
  defers creation of the new CDR until it gets a new message that requires
  a new CDR.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-07 20:34:38 +00:00
Jonathan Rose 93ed5ef0ff res_parking: Replace Parker snapshots with ParkerDialString
This process also involved a large amount of rework regarding how to redial
the Parker when a channel leaves a parking lot due to timeout. An attended
transfer channel variable has been added to attended transfers to extensions
that will eventually park (but haven't at the time of transfer) as well.
This resolves one of the two BUGBUG comments remaining in res_parking.

(issues ASTERISK-21877)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2638/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-04 18:46:56 +00:00
Richard Mudgett 02f55a36a0 Revert accidental overcommit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 23:57:37 +00:00
Richard Mudgett b4e9a3fc2f Add BUGBUG note for ASTERISK-22009
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 23:55:53 +00:00
Jason Parker 85ba063329 Add a SystemName field to all AMI events.
This only gets sent out if configured in asterisk.conf

(closes issue ASTERISK-21494)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-02 22:01:23 +00:00
Jonathan Rose f306dbd841 bridge_features: Support One touch Monitor/MixMonitor
In addition to porting those features, they now enjoy greater feature parity
with one another. Specifically, AutoMixMon now has a start and stop
message that can be specified with TOUCH_MIXMONITOR_MESSAGE_START and
TOUCH_MIXMONITOR_MESSAGE_STOP.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01 16:01:24 +00:00
Kinsey Moore 909ee4bfb9 Refactor extraneous channel events
This change removes JitterBufStats, ChannelReload, and ChannelUpdate
and refactors the following events to travel over Stasis-Core:
* LocalBridge
* DAHDIChannel
* AlarmClear
* SpanAlarmClear
* Alarm
* SpanAlarm
* DNDState
* MCID
* SIPQualifyPeerDone
* SessionTimeout

Review: https://reviewboard.asterisk.org/r/2627/
(closes issue ASTERISK-21476)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01 13:16:09 +00:00
Jonathan Rose 50ff1f5fc1 res_parking: Dynamic Parking Lots
(closes issue ASTERISK-21644)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2615/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28 19:22:16 +00:00
Jonathan Rose 854c4c64fe res_parking: Add Parking manager action to the new parking system
(closes issue ASTERISK-21641)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2573/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 22:28:22 +00:00
Matthew Jordan 0afb1949c9 Restore bad merge on CHANGES
The patch for CDRs moved around a lot of content in CHANGES to try and
organize the areas that were affected. This missed some changes that went
in with a merge and removed some updates - this patch adds them back in.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 14:31:51 +00:00
Matthew Jordan 6258bbe7bd Update Asterisk's CDRs for the new bridging framework
This patch is the initial push to update Asterisk's CDR engine for the new
bridging framework. This patch guts the existing CDR engine and builds the new
on top of messages coming across Stasis. As changes in channel state and bridge
state are detected, CDRs are built and dispatched accordingly. This
fundamentally changes CDRs in a few ways.
(1) CDRs are now *very* reflective of the actual state of channels and bridges.
    This means CDRs track well with what an actual channel is doing - which
    is useful in transfer scenarios (which were previously difficult to pin
    down). It does, however, mean that CDRs cannot be 'fooled'. Previous
    behavior in Asterisk allowed for CDR applications, channels, and other
    properties to be spoofed in parts of the code - this no longer works.
(2) CDRs have defined behavior in multi-party scenarios. This behavior will not
    be what everyone wants, but it is a defined behavior and as such, it is
    predictable.
(3) The CDR manipulation functions and applications have been overhauled. Major
    changes have been made to ResetCDR and ForkCDR in particular. Many of the
    options for these two applications no longer made any sense with the new
    framework and the (slightly) more immutable nature of CDRs.

There are a plethora of other changes. For a full description of CDR behavior,
see the CDR specification on the Asterisk wiki.

(closes issue ASTERISK-21196)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 03:00:38 +00:00
Jason Parker a2d02edca5 Make app_queue AMI events more consistent. Give Join/Leave more useful names.
This also removes the eventwhencalled and eventmemberstatus configuration
options.  These events can just be filtered via manager.conf blacklists.

(closes issue ASTERISK-21469)
Review: https://reviewboard.asterisk.org/r/2586/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 19:51:19 +00:00
Jonathan Rose 8954661207 res_parking: Automatically generate extensions, hints, etc.
(closes issue ASTERISK-21645)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2545/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 16:07:18 +00:00
Richard Mudgett bad8caa8c6 Reimplement bridging and DTMF features related channel variables in the bridging core.
* The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer
channel driver specific.  If the channel variable is set on the
transferrer channel, the sound will be played to the target of an attended
transfer.

* The channel variable BRIDGEPEER becomes a comma separated list of peers
in a multi-party bridge.  The BRIDGEPEER value can have a maximum of 10
peers listed.  Any more peers in the bridge will not be included in the
list.  BRIDGEPEER is not valid in holding bridges like parking since those
channels do not talk to each other even though they are in a bridge.

* The channel variable BRIDGEPVTCALLID is only valid for two party bridges
and will contain a value if the BRIDGEPEER's channel driver supports it.

* The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and
is removed.  The more useful DYNAMIC_WHO_ACTIVATED gives the channel name
that activated the dynamic feature.

* The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are
set only on the channel executing the dynamic feature.  Executing a
dynamic feature on the bridge peer in a multi-party bridge will execute it
on all peers of the activating channel.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 22:46:54 +00:00
Jason Parker 0613100e63 Split AGI manager events, to remove SubEvent field.
This moves them to stasis, in the process.

(closes issue ASTERISK-21470)
Review: https://reviewboard.asterisk.org/r/2587/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 19:51:12 +00:00
Mark Michelson fac3839e68 Adds support for a core attended transfer function plus adds some hiding of masquerades.
The attended transfer API call can complete the attended transfer in a number of ways
depending on the current bridged states of the channels involved.

The hiding of masquerades is done in some bridging-related functions, such as the manager
Bridge action and the Bridge dialplan application. In addition, call pickup was edited
to "move" a channel rather than masquerade it.

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

(closes issue ASTERISK-21334)
Reported by Matt Jordan

(closes issue Asterisk-21336)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28 14:45:31 +00:00
Jason Parker 154fbf8cae Split Hold event into Hold/Unhold, and move it into core.
(closes issue ASTERISK-21487)
Review: https://reviewboard.asterisk.org/r/2565/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 21:21:25 +00:00
Matthew Jordan 06be8463b6 Migrate a large number of AMI events over to Stasis-Core
This patch moves a number of AMI events over to the Stasis-Core message bus.
This includes:
 * ChanSpyStart/Stop
 * MonitorStart/Stop
 * MusicOnHoldStart/Stop
 * FullyBooted/Reload
 * All Voicemail/MWI related events

In addition, it adds some Stasis-Core and AMI support for generic AMI messages,
refactors the message router in AMI to use a single router with topic
forwarding for the topics that AMI cares about, and refactors MWI message
types and topics to be more name compliant.

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

(closes issue ASTERISK-21462)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 20:44:07 +00:00
Richard Mudgett 3d63833bd6 Merge in the bridge_construction branch to make the system use the Bridging API.
Breaks many things until they can be reworked.  A partial list:
chan_agent
chan_dahdi, chan_misdn, chan_iax2 native bridging
app_queue
COLP updates
DTMF attended transfers
Protocol attended transfers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21 18:00:22 +00:00
Jonathan Rose b90bba7a30 Stasis: Update security events to use Stasis
Also moves ACL messages to the security topic and gets rid of the
ACL topic

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-17 17:36:10 +00:00
Kinsey Moore 7ce05bfb9b Add channel events for res_stasis apps
This change adds a framework in res_stasis for handling events from
channel topics. JSON event generation and validation code is created
from event documentation in rest-api/api-docs/events.json to assist in
JSON event generation, ensure consistency, and ensure that accurate
documentation is available for ALL events that are received by
res_stasis applications.

The userevent application has been refactored along with the code that
handles userevent channel blob events to pass the headers as key/value
pairs in the JSON blob. As a side-effect, app_userevent now handles
duplicate keys by overwriting the previous value.

Review: https://reviewboard.asterisk.org/r/2428/
(closes issue ASTERISK-21180)
Patch-By: Kinsey Moore <kmoore@digium.com>


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10 13:13:06 +00:00
Olle Johansson 465d0f4a22 Play periodic prompts for first call in a call queue
Review: https://reviewboard.asterisk.org/r/2263/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29 13:38:59 +00:00
Joshua Colp 02be50b1ac Add support for a realtime sorcery module.
This change does the following:

1. Adds the sorcery realtime module
2. Adds unit tests for the sorcery realtime module
3. Changes the realtime core to use an ast_variable list instead of variadic arguments
4. Changes all realtime drivers to accept an ast_variable list

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-27 12:01:29 +00:00
Russell Bryant ee05bdec92 Add inheritance support to FEATURE()/FEATUREMAP().
The settings saved on the channel for FEATURE()/FEATUREMAP() were only
for that channel.  This patch adds the ability to have these settings
inherited to child channels if you set FEATURE(inherit)=yes.

Closes issue ASTERISK-21306.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-09 06:16:42 +00:00
Matthew Jordan b8d4e573f1 Add multi-channel Stasis messages; refactor Dial AMI events to Stasis
This patch does the following:
 * A new Stasis payload has been defined for multi-channel messages. This
   payload can store multiple ast_channel_snapshot objects along with a single
   JSON blob. The payload object itself is opaque; the snapshots are stored
   in a container keyed by roles. APIs have been provided to query for and
   retrieve the snapshots from the payload object.
 * The Dial AMI events have been refactored onto Stasis. This includes dial
   messages in app_dial, as well as the core dialing framework. The AMI events
   have been modified to send out a DialBegin/DialEnd events, as opposed to
   the subevent type that was previously used.
 * Stasis messages, types, and other objects related to channels have been
   placed in their own file, stasis_channels. Unit tests for some of these
   objects/messages have also been written.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 14:26:37 +00:00
David M. Lee 4a6237b231 Move NewCallerid, HangupRequest and SoftHangupRequest to Stasis
HangupRequest and SoftHangupRequest are now ast_channel_blob Stasis
messages, with the cause code as an optional field in the blob.

NewCallerid now simply watches for changes in the callerid information
in channel snapshots, and creates the AMI event appropriately.

Since the original NewCallerid event honored the channelvars setting
in manager.conf, the channel variables configured there had to become
a part of the channel snapshot. These are now a part of every snapshot
based event, making the configuration description "every time a
channel-oriented event is emitted" less of a lie.

There a a few other changes wrapped up in here as well.

 * When ast_channel_topic() is given NULL for a channel, it returns
   the ast_channel_topic_all() topic instead of NULL. This can clean
   up a lot of NULL checking we're doing currently.
 * The fields Cause and Cause-txt were removed from the base channel
   information and put only on the Hangup events, since those fields
   are meaningless outside of a Hangup event.
 * Removed the pipe-delimiter processing of the channelvars field,
   since that's been deprecated forever.

(closes issue ASTERISK-21096)
Review: https://reviewboard.asterisk.org/r/2405/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25 16:19:55 +00:00
David M. Lee cf9324b25e Move more channel events to Stasis; move res_json.c to main/json.c.
This patch started out simply as fixing the bouncing tests introduced
in r382685, but required some other changes to give it a decent
implementation.

To fix the bouncing tests, the UserEvent and Newexten AMI events
needed to be refactored to dispatch via Stasis. Dispatching directly
to AMI resulted in those events sometimes getting ahead of the
associated Newchannel events, which would understandably confuse anyone.

I found that instead of creating a zillion different message types and
structures associated with them, it would be preferable to define a
message type that has a channel snapshot and a blob of structured data
with a small bit of additional information. The JSON object model
provides a very nice way of representing structured data, so I went
with that.

 * Move JSON support from res_json.c to main/json.c
   * Made libjansson-dev a required dependency
 * Added an ast_channel_blob message type, which has a channel
   snapshot and JSON blob of data.
 * Changed UserEvent and Newexten events so that they are dispatched
   via ast_channel_blob messages on the channel's topic.
 * Got rid of the ast_channel_varset message; used ast_channel_blob
   instead.
 * Extracted the manager functions converting Stasis channel events to
   AMI events into manager_channel.c.

(issue ASTERISK-21096)
Review: https://reviewboard.asterisk.org/r/2381/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22 14:06:46 +00:00