Commit Graph

52 Commits

Author SHA1 Message Date
Joshua Colp 6ce25bd62a Merge "res_parking: Misc fixes." 2016-03-29 09:03:55 -05:00
zuul 36347dbc3c Merge "res_parking: Cleanup find_channel_parking_lot_name() usage." 2016-03-26 14:10:22 -05:00
Richard Mudgett 3cf714031c res_parking: Cleanup find_channel_parking_lot_name() usage.
Change-Id: I8f7a8890aef27824301c642d4d15407ac83e6f02
2016-03-25 18:32:42 -05:00
Richard Mudgett 13e75ee04f res_parking: Misc fixes.
res/parking/parking_applications.c:

* Add malloc fail checks in setup_park_common_datastore().

* Fix playing parking failed announcement to only happen on non-blind
transfers in park_app_exec().  It could never go out before because a test
was provedly always false.

res/parking/parking_bridge.c:

* Fix NULL tolerance in generate_parked_user() because
bridge_parking_push() can theoretically pass a NULL parker channel if the
parker channel went away for some reason.

* Clarify some weird code dealing with blind_transfer in
bridge_parking_push().

res/parking/parking_bridge_features.c:

* Made park_local_transfer() set BLINDTRANSFER on the Local;1 channel
which will be bulk copied to the Local;2 channel on the subsequent
ast_call().  The additional advantage is if the parker channel has the
BLINDTRANSFER and ATTENDEDTRANSFER variables set they are now guaranteed
to be overridden.

res/parking/parking_manager.c:

* Fix AMI Park action input range checking of the Timeout header in
manager_park().

* Reduced locking scope to where needed in manager_park().

res/res_parking.c:

* Fix some off nominal missing unlocks by eliminating the returns.

Change-Id: Ib64945bc285acb05a306dc12e6f16854898915ca
2016-03-25 18:28:31 -05:00
Philip Correia e2853ae337 res_parking: Update parking documentation for dynamic parking lots.
* Remove duplicate res_parking.conf courtesytone config option
documentation.

ASTERISK-24596 #close
Reported by:  Philip Correia

ASTERISK-24605
Reported by:  Philip Correia
Patches:
      call_park_app_doc.patch (license #6672) patch uploaded by Philip Correia

Change-Id: I90a92a891c6494dc08173e675856afcc4764c5b5
2016-03-25 18:25:47 -05:00
Corey Farrell a8bfa9e104 Modules: Make ast_module_info->self available to auxiliary sources.
ast_module_info->self is often needed to register items with the core.  Many
modules have ad-hoc code to make this pointer available to auxiliary sources.
This change updates the module build process to make the needed information
available to all sources in a module.

ASTERISK-25056 #close
Reported by: Corey Farrell

Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
2015-05-04 20:47:01 -04:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Mark Michelson dcf1ad14da Add module support level to ast_module_info structure. Print it in CLI "module show" .
ASTERISK-23919 #close
Reported by Malcolm Davenport

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 16:47:17 +00:00
Richard Mudgett ba1db5d8f5 Eliminate some more unnecessary RAII_VAR() uses.
RAII_VAR() is not a hammer appropriate to pound all nails.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 18:30:24 +00:00
Richard Mudgett 45ade68cb4 Remove unused RAII_VAR() declarations.
* Remove unused RAII_VAR() declarations.  The compiler cannot catch these
because the cleanup function "references" the unused variable.  Some
actually allocated and released resources that were never used.

* Fixed some whitespace issues in stasis_bridges.c.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 18:01:47 +00:00
Richard Mudgett c17731620d res_parking: Update XML documention for DTMF features after parking timeout.
* Updated the XML documentation to indicate that the parkedcalltransfers,
parkedcallreparking, parkedcallhangup, and parkedcallrecording
configuration options also apply to parking timeouts.

(issue ASTERISK-22630)
Reported by: Kevin Harwell

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-22 16:28:05 +00:00
Jonathan Rose 9a45173715 res_parking: Fix bug where reloading immediately wipes new parkpos extensions
(closes issue ASTERISK-22631)
Reported by: Kevin Harwell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-17 18:25:35 +00:00
Richard Mudgett 2b32732aa8 app_cdr and res_parking: Fix some resource leaks.
* app_cdr left the ResetCDR application registered.

* res_parking leaked a ref to config global.

(closes issue ASTERISK-22566)
Reported by: Corey Farrell
Patches:
      ASTERISK-22566-r2.patch (license #5909) patch uploaded by Corey Farrell
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27 21:58:05 +00:00
Richard Mudgett 477dea4661 Bridge API: Set a cause code on a channel when it is ejected from a bridge.
The cause code needs to be passed from the disconnecting channel to the
bridge peers if the disconnecting channel dissolves the bridge.

* Made the call to an app_agent_pool agent disconnect with the busy cause
code if the agent does not ack the call in time or hangs up before acking
the call.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 21:09:52 +00:00
Kinsey Moore 56aea1c030 Allow res_parking to be unloadable
This change protects accesses of res_parking such that it can unload
safely once transient uses of its registered functions are complete.
The parking API has been restructured such that its consumers do not
have access to the vtable exposed by the parking provider, but instead
route through stubs to prevent consumers from holding on to function
pointers.

This adds calls to all the parking unload functions and moves
application loading and unloading into functions in
parking_applications.c similar to the rest of the parts of res_parking.

Review: https://reviewboard.asterisk.org/r/2763/
(closes issue ASTERISK-22142)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17 15:01:54 +00:00
Kinsey Moore 59753b1ea1 Strip down the old event system
This removes unused code, event types, IE pltypes, and event IE types
where possible and makes several functions private that were once
public. This includes a renumbering of the remaining event and IE types
which breaks binary compatibility with previous versions. The last
remaining consumers of the old event system (or parts thereof) are
main/security_events.c, res/res_security_log.c, tests/test_cel.c,
tests/test_event.c, main/cel.c, and the CEL backends.

Review: https://reviewboard.asterisk.org/r/2703/
(closes issue ASTERISK-22139)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17 14:39:27 +00:00
Richard Mudgett 8b7742202f Minor parking cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15 21:52:01 +00:00
Jonathan Rose 98b02d98f3 res_parking: Unit tests
Adds the following unit tests:
* create_lot: tests adding and removal of a new parking lot (baseline)
* park_extensions: creates a parking lot that registers extensions and
      then confirms that all of the expected extensions exist
* extensions_conflicts: creates numerous parking lots to test that
      extension conflicts in parking lots result in parking lot
      creation failing
* dynamic_parking_variables: Tests that the creation of dynamic
      parking lots respects the related channel variables set on the
      channel that requests them.
* park_call: Tests adding a channel to a parking lot's holding bridge
      by standard parking functions.
* retrieve_call: Tests pulling a channel out of a parking lot's
      holding bridge via parked call retrieval functions.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 16:00:01 +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 5c4b482471 Support externally initiated parking requests; remove some dead code
This patch does the following:
 * It adds support for externally initiated parking requests. In particular,
   chan_skinny has a protocol level message that initiates a call park.
   This patch now supports that option, as well as the protocol specific
   mechanisms in chan_dahdi/sig_analog and chan_mgcp.
 * A parking bridge features virtual table has been added that provides
   access to the parking functionality that the Bridging API needs. This
   includes requests to park an entire 'call' (with little or no additional
   information, thank you chan_skinny), perform a blind transfer to a parking
   extension, determine if an extension is a parking extension, as well as the
   actual "do the parking" request from the Bridging API.
 * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new
   functions
 * The removal of some - but not all - dead parking code from features.c

This also fixed blind transferring a multi-party bridge to a parking lot (which
was implemented, but had at least one code path where using the parking features
kK might not have worked)

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

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 20:55:17 +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
Richard Mudgett 5e27e13e28 Remove some redundant parking config error messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-26 19:15:23 +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 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
Mark Spencer 569b95352a rename "parking" to "features" in preparation for some more (possibly post 1.0) feature additions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-17 20:58:01 +00:00
Mark Spencer 2f1c9c690f Add missing include (bug #2040)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 10:34:25 +00:00
Mark Spencer 0c6b76f7c2 Make parked calls events more consistant (bug #2033)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-07-14 07:53:57 +00:00
James Golovich 8801247d76 Remove pthread.h from source. We should be using asterisk/lock.h everywhere instead (except in asterisk/lock.h).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-22 18:49:00 +00:00
Mark Spencer 727abcdec7 Merge FreeBSD locking fixes (bug #1411)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-06-09 01:45:08 +00:00
Mark Spencer 6195dd35e0 Make ast_channel_walk become ast_channel_walk_locked
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-05-20 16:30:10 +00:00
James Golovich 286d0656e2 Revert formatting changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-27 21:21:57 +00:00
Anthony Minessale II 5385ca0a0e applied final release of bug 1353 per Mark's permission
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-26 23:22:34 +00:00
Mark Spencer 512583709a Fix double parking crash (bug #1302)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-07 04:11:00 +00:00
Mark Spencer 13bca43aa8 Get rid of all that old needlock garbage now that we're using recursive mutexes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-04-06 22:17:32 +00:00
James Golovich 32a11a2b20 Remove extra \r\n from manager event sent by res_parking.c (bug #1134)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-03-01 20:31:25 +00:00
James Golovich a232d8e060 Move ast_get_group from res_parking.c to channel.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-27 06:15:49 +00:00
Martin Pycko 860f35a7ab Add recording agent's calls patch. Basically the call starts recording when the agent picks up and the file is stamped with the agent's id and the timestamp. Also optionally a URL link to that file may be inserted in the userfield of the CDR record. By default the recorded file will be mixed if soxmix is available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-02-03 16:57:00 +00:00
Mark Spencer 81cf763a97 Fix res_parking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-01-30 06:31:25 +00:00
Mark Spencer 2ad3e1428d Create manager event on parking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-01-30 05:49:44 +00:00
Mark Spencer 2154f62f51 Hangup calling channel when transferring peer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-11-23 23:33:56 +00:00
Mark Spencer ac19ba51bd Fix small logic errors (bug #242)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-09-10 05:24:49 +00:00
Mark Spencer 1bb58646de Totally revamp thread debugging to support locating and removing deadlocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-08-13 15:25:16 +00:00
Mark Spencer 9f51b3590d Make parking resume properly when in macro
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-08-07 05:35:45 +00:00
Martin Pycko cbd33586ac Add a safe way to reload extensions config (don't change/delete the current extenions until extensions.conf was parsed and the new set of extensions is created) and add "extensions reload" CLI command so we could reload only extensions.conf config file without touching config files of other modules
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-07-14 15:33:21 +00:00
Mark Spencer 1b473c2ef0 Merge 'T' and other dialing enhancements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-07-02 14:06:12 +00:00
Mark Spencer f6764f4722 More contributed BSD enhancements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-04-27 21:34:27 +00:00
Mark Spencer 6eeee2496b More BSD enhancements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-04-27 18:13:11 +00:00
Mark Spencer 43604eb770 Implement call pickup on SIP, override context if appropriate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-04-09 04:00:43 +00:00
Mark Spencer c1fd6c1e4c Version 0.3.0 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2003-02-02 19:37:23 +00:00
Mark Spencer 8c020ca8fe Version 0.2.0 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2002-08-22 15:29:30 +00:00