Commit Graph

32 Commits

Author SHA1 Message Date
Naveen Albert 3a95cadc1f features: Add transfer initiation options.
Adds additional control options over the transfer
feature functionality to give users more control
in how the transfer feature sounds and works.

First, the "transfer" sound that plays when a transfer is
initiated can now be customized by the user in
features.conf, just as with the other transfer sounds.

Secondly, the user can now specify the transfer extension
in advance by using the TRANSFER_EXTEN variable. If
a valid extension is contained in this variable, the call
will automatically be transferred to this destination.
Otherwise, it will fall back to collecting the extension
from the user as is always done now.

ASTERISK-29899 #close

Change-Id: Ibff309caa459a2b958706f2ed0ca393b1ef502e3
2022-09-08 13:47:19 -05:00
Trevor Peirce 938383aff3 features: Update documentation for automon and automixmon
The current documentation is out of date and does not reflect actual
behaviour.  This change makes documentation clearer and accurately
reflect the purpose of relevant channel variables.

ASTERISK-30123

Change-Id: I160d0b01fce862477ad55ac1aa708a730473eb6f
2022-07-08 08:55:17 -05:00
Josh Soref f382775241 main: Spelling fixes
Correct typos of the following word families:

analysis
nuisance
converting
although
transaction
desctitle
acquire
update
evaluate
thousand
this
dissolved
management
integrity
reconstructed
decrement
further on
irrelevant
currently
constancy
anyway
unconstrained
featuregroups
right
larger
evaluated
encumbered
languages
digits
authoritative
framing
blindxfer
tolerate
traverser
exclamation
perform
permissions
rearrangement
performing
processing
declension
happily
duplicate
compound
hundred
returns
elicit
allocate
actually
paths
inheritance
atxferdropcall
earlier
synchronization
multiplier
acknowledge
across
against
thousands
joyous
manipulators
guaranteed
emulating
soundfile

ASTERISK-29714

Change-Id: I926ba4b11e9f6dd3fdd93170ab1f9b997910be70
2021-11-15 17:33:27 -06:00
Corey Farrell 687ab7aeee
astobj2: Eliminate legacy container allocation macros.
These macros have been documented as legacy for a long time but are
still used in new code because they exist.  Remove all references to:
* ao2_container_alloc_options
* ao2_t_container_alloc_options
* ao2_t_container_alloc

These macro's are also removed.  Only ao2_container_alloc remains due to
it's use in over 100 places.

Change-Id: I1a26258b5bf3deb081aaeed11a0baa175c933c7a
2018-10-19 17:33:05 -04:00
Corey Farrell 572a508ef2 loader: Convert reload_classes to built-in modules.
* acl (named_acl.c)
* cdr
* cel
* ccss
* dnsmgr
* dsp
* enum
* extconfig (config.c)
* features
* http
* indications
* logger
* manager
* plc
* sounds
* udptl

These modules are now loaded at appropriate time by the module loader.
Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so
the module loader will abort startup on failure of these modules.

Some of these modules are still initialized or shutdown from outside the
module loader.  logger.c is initialized very early and shutdown very
late, manager.c is initialized by the module loader but is shutdown by
the Asterisk core (too much uses it without holding references).

Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
2018-03-14 05:20:12 -04:00
Corey Farrell fee929c8ac core: Remove non-critical cleanup from startup aborts.
When built-in components of Asterisk fail to start they cause the
Asterisk startup to abort.  In these cases only the most critical
cleanup should be performed - closing databases and terminating
proceses.  These cleanups are registered using ast_register_atexit, all
other cleanups should not be run during startup abort.

The main reason for this change is that these cleanup procedures are
untestable from the partially initialized states, if they fail it could
prevent us from ever running the critical cleanup with ast_run_atexits.

Create separate initialization for dns_core.c to be run unconditionally
during startup instead of being initialized by the first dns resolver to
be registered. This ensures that 'sched' is initialized before it can be
potentially used.

Replace ast_register_atexit with ast_register_cleanup in media_cache.c.
There is no reason for this cleanup to happen unconditionally.

Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3
2018-03-13 13:46:08 -04:00
Corey Farrell bf2d35931d aco: Minimize use of regex.
Remove nearly all use of regex from ACO users.  Still remaining:
* app_confbridge has a legitamate use of option name regex.
* ast_sorcery_object_fields_register is implemented with regex, all
  callers use simple prefix based regex.  I haven't decided the best
  way to fix this in both 13/15 and master.

Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
2017-12-15 10:14:31 -05:00
Thomas Sevestre 21c0283b78 features, manager : Add CancelAtxfer AMI action
Add action to cancel feature attended transfer with AMI interface

ASTERISK-27215 #close

Change-Id: Iab8a81362b5a1757e2608f70b014ef863200cb42
2017-10-12 13:31:34 -05:00
snuffy e03364c40a Fix issue with CLI not returning to prompt after running "features show"
ASTERISK-26444 #close

Change-Id: I91d645b7e6e5dba35f8c410df2be77a8c0e3acb8
2016-10-20 09:53:24 +11:00
Kevin Harwell a5b38b604c bridge_basic: don't cache xferfailsound during an attended transfer
The xferfailsound was read from the channel at the beginning of the transfer,
and that value is "cached" for the duration of the transfer. Therefore, changing
the xferfailsound on the channel using the FEATURE() dialplan function does
nothing once the transfer is under way.

This makes it so the transfer code instead gets the xferfailsound configuration
options from the channel when it is actually going to be used.

This patch also fixes a potential memory leak of the props object as well as
making sure the condition variable gets initialized before being destroyed.

ASTERISK-25696 #close

Change-Id: Ic726b0f54ef588bd9c9c67f4b0e4d787934f85e4
2016-01-15 17:51:18 -06:00
Mark Michelson 2e750db120 Allow for transferer to retry when dialing an invalid extension.
This allows for a configurable number of attempts for a transferer
to dial an extension to transfer the call to. For Asterisk 13, the
default values are such that upgrading between versions will not
cause a behaivour change. For trunk, though, the defaults will be
changed to be more user-friendly.

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

Merged revisions 428145 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-17 16:58:52 +00:00
Scott Griepentrog 3ad198c835 feature_config: insure featuregroups and applicationmaps are initialized
If the features.conf is missing, the cfg->featurgroups
and cfg->applicationmaps is not initialized, resulting
in assert on ao2_find of a null container.  This patch
changes the initialization call and adds asserts for a
safeguard.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 17:40:54 +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
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
Richard Mudgett a0db5275ed Features: Rearm the parking config options have moved warning for each reload.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-01 16:44:22 +00:00
Richard Mudgett dbec6e92d1 features_config: Fix config ref leak of parkinglots.
This leak happend for just about every channel created.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-21 00:56:52 +00:00
Michael L. Young 38fa628812 Fix Segfault In features-config.c When Application Has No Arguments
Some applications do not require arguments.  Therefore, when parsing application
maps in features.conf, it is possible that app_data will be set to NULL.

* This patch sets app_data to "" if it is NULL.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 00:13:23 +00:00
Mark Michelson 375c2f5a5c Fix other timeouts (atxferloopdelay and atxfernoanswertimeout) to use seconds instead of milliseconds.
Thanks to Richard Mudgett for pointing this out.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-17 17:10:51 +00:00
Mark Michelson f653bfa1f3 Switch transferdigittimeout to be configured as seconds instead of milliseconds.
This was an unintentional consequence of the update of features.conf to use the
config framework in Asterisk 12. Thanks to Marco Signorini on the Asterisk
developers list for pointing out the problem.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-17 16:11:20 +00:00
Richard Mudgett f5ae5e27c8 astobj2: Add warn unused attribute to some functions.
* Fixed resulting warnings with improper use of ao2_global_obj_replace().

* Made a couple uses of ao2_global_obj_replace_unref(x, NULL) into the
equivalent and more appropriate ao2_global_obj_release() call.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 19:26:48 +00:00
Jonathan Rose 0dfe658a5c features_config: Ignore parkinglots in features.conf instead of failing to load
Parkinglots are defined in res_features.conf now, but this patch fixes
features_config so that features don't fail to load when parkinglots
are present in features.conf

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 18:30:01 +00:00
Jonathan Rose dcaa0cf659 features_config: Don't require features.conf to be present for Asterisk to load
(closes issue ASTERISK-22426)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2806/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 18:04:41 +00:00
Matthew Jordan e31bd332b8 Update config framework/sorcery with types/options without documentation
There are times when a configuration option should not have documentation.

1. Some options are registered with a particular object merely as a warning to
   users. These options aren't even really 'deprecated' - which has its own
   separate API call - they are actually provided by a different configuration
   file. The options are merely registered so that the user gets a warning that
   a different configuration file provides the item.

2. Some object types - most notably some used by modules that use sorcery - are
   completely internal and should never be shown to the user.

3. Sorcery itself has several 'hidden' fields that should never be shown to a
   user.

This patch updates the configuration framework and sorcery with additional API
calls that allow a module to register types as internal and options as not
requiring documentation. This bypasses the XML documentation checking.

This patch also re-enables the strict XML documentation checking in trunk, as
well as updates some documentation that was missing.

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

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

(closes issue ASTERISK-22112)
Reported by: Rusty Newton



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 15:21:40 +00:00
Mark Michelson bf22391b8d Make DTMF attended transfer support feature-complete.
This greatly modifies the operation of DTMF attended transfers so that
the full range of options from features.conf applies.

In addition, a new option has been added that allows for a transferer
to switch between bridges during a transfer before completing the
transfer.

(closes issue ASTERISK-21543)
reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 15:28:11 +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
Mark Michelson 4710869133 Add documentation for features configuration.
Review: https://reviewboard.asterisk.org/r/2616

(closes issue ASTERISK-21542)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 18:33:13 +00:00
Mark Michelson cc06020f23 Just return outright on a reload since we have already processed configuration.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13 18:26:25 +00:00
Mark Michelson 49949ac5a9 Fix memory leak in features_config.c
The options should not be registered multiple times. Instead, the configuration just needs
to be reprocessed by the config framework. This also exposed that we were not properly telling
the config framework to treat the configuration processing with the "reload" semantics when
a reload occurred. Both of these errors are fixed now.

Thanks to Richard Mudgett for discovering the leak.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13 18:17:13 +00:00
Mark Michelson ba5c97efcd Temporary fix for people using sample features.conf from previous Asterisk versions.
People who use the features.conf.sample file from Asterisk 11 and before in trunk were
given a rude awakening when features configuration changes were made. Because it uses the
config framework and the config framework is strict about what is accepted and what isn't,
people that had parking options configured found that Asterisk no longer started. This is
because parking options are currently handled in res_parking.conf instead of features.conf.

This fix seeks to create a temporary band-aid fix for the problem, but having parking options
from the general section be passed to a handler that will simply print that the option is no
longer supported. This will not cause Asterisk to exit.

The fix only applies to options in the general section. There are two main reasons for this:

1) The sample features.conf file only has parking options in the general section. There are no
configured parking lots. Therefore it's not quite as "urgent" to get the parking lot parsing
fixed.

2) The plan is to move parking configuration back from res_parking.conf to features.conf. When
that happens, the parking lots will also be addressed at that time.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10 15:32:02 +00:00
Richard Mudgett b8b7e8ab45 Tweak applicationmap and featuregroup config containers.
* Change applicationmap and featuregroup to replace duplicate config items
rather than reject them.

* Remove some unneeded warning messages when getting the applicationmap
allows duplicates from DYNAMIC_FEATURES.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 00:33:20 +00:00
Mark Michelson 738c44405b Conditionally reject duplicate entries in applicationmap containers.
When reading from a config file, it's important to reject duplicates. Otherwise,
featuregroups will have ambiguity when pointing to applicationmap items. However,
when constructing the channel's current applicationmap, we don't care about duplicate
names since it's the DTMF that identifies a feature, not the name.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 23:32:13 +00:00
Mark Michelson 2dc8a06006 Refactor the features configuration scheme.
Features configuration is handled in its own API in
features_config.h and features_config.c. This way, features
configuration is accessible to anything that needs it.

In addition, features configuration has been altered to
be more channel-oriented. Most callers of features API
code will be supplying a channel so that the individual
channel's settings will be acquired rather than the global
setting.

Missing from this commit is XML documentation for the
features configuration. That will be handled in a separate
commit.

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

(issue ASTERISK-21542)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 21:40:35 +00:00