]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
10 years agoapp_queue: fix some tab format 47/2147/1
Rodrigo Ramírez Norambuena [Sat, 23 Jan 2016 18:34:11 +0000 (15:34 -0300)] 
app_queue: fix some tab format

Change-Id: I2734392b131f1fb0949515d538f83f30fbc15d8c

10 years agoMerge "build_system: Prevent goals needing makeopts from running when it's missing"
Joshua Colp [Fri, 29 Jan 2016 14:06:22 +0000 (08:06 -0600)] 
Merge "build_system: Prevent goals needing makeopts from running when it's missing"

10 years agoMerge "config: Allow options to register when documentation is unavailable."
Mark Michelson [Thu, 28 Jan 2016 21:56:30 +0000 (15:56 -0600)] 
Merge "config: Allow options to register when documentation is unavailable."

10 years agoconfig_options.c: Fix warning message wording. 23/2123/1
Richard Mudgett [Thu, 28 Jan 2016 18:44:43 +0000 (12:44 -0600)] 
config_options.c: Fix warning message wording.

Change-Id: I915ea437936320393afde0e7552cf0a980a6b2e4

10 years agores_pjsip: Add res_pjproject dependency to samples 04/2104/2
George Joseph [Wed, 27 Jan 2016 19:08:29 +0000 (12:08 -0700)] 
res_pjsip:  Add res_pjproject dependency to samples

Since res_pjsip now depends on res_pjproject, this has been added to
basic-pbx modules.conf.

Change-Id: I42826597d5e10f08e518208860c44c96e52f1b2d

10 years agobuild_system: Prevent goals needing makeopts from running when it's missing 99/2099/1
George Joseph [Wed, 27 Jan 2016 16:29:13 +0000 (09:29 -0700)] 
build_system: Prevent goals needing makeopts from running when it's missing

The Makefile only optionally includes makeopts so when goals like uninstall that
dont depend on anything else are run after a distclean, rules like
'rm -f "$(DESTDIR)$(ASTMODDIR)/"*' get run as 'rm -f ""/*' which attempts
to remove everything in the root directory.

Although there's a rule defined for makeopts which prints a message and does
an 'exit 1', since '-include makepopts' was specified (with the -), the exit
was ignored letting the rest of the rules run.

This patch makes makeopts required unless the goal has the string 'clean' in it.

ASTERISK-25730 #close
Reported-by: George Joseph
Change-Id: I1bce59a7ea4f48e7a468e22b2abbb13c63417ac7

10 years agoconfig: Allow options to register when documentation is unavailable. 78/2078/2
Joshua Colp [Mon, 25 Jan 2016 15:35:21 +0000 (11:35 -0400)] 
config: Allow options to register when documentation is unavailable.

The config options framework is strict in that configuration options must
be documented unless XML documentation support is not available. In
practice this is useful as it ensures documentation exists however in
off-nominal cases this can cause strange problems.

If it is expected that a config option has a non-zero or non-empty
default value but the config option documentation is unavailable
this reasonable expectation will not be met. This can cause obscure
crashes and weirdness depending on how the code handles it.

This change tweaks the behavior to ensure that the config option
is still allowed to register, apply default values, and be set when
devmode is not enabled. If devmode is enabled then the option can
NOT be set.

This also does not remove the initial documentation error message that
is output on load when registering the configuration option.

ASTERISK-25725 #close

Change-Id: Iec42fca6b35f31326c33fcdc25473f6fd7bc8af8

10 years agoStasis: Use custom structure when setting variables. 82/2082/2
Mark Michelson [Mon, 25 Jan 2016 16:23:18 +0000 (10:23 -0600)] 
Stasis: Use custom structure when setting variables.

A recent change to queue channel variable setting to the Stasis control
queue caused a regression. When setting channel variables, it is
possible to give a NULL channel variable value in order to unset the
variable (i.e. remove it from the channel variable list). The change
introduced a call to ast_variable_new(), which is not tolerant of NULL
channel variable values.

This new change switches from using ast_variable to using a custom
channel variable struct that is lighter weight and NULL value-tolerant.

Change-Id: I784d7beaaa3c036ea936d103e7caf0bb1562162d

10 years agoMerge "res_pjsip_pubsub: Prevent crash from AMI command on freed subscription."
Matt Jordan [Tue, 26 Jan 2016 13:05:52 +0000 (07:05 -0600)] 
Merge "res_pjsip_pubsub: Prevent crash from AMI command on freed subscription."

10 years agoMerge "sounds/Makefile: Incremented core and extra sounds versions to 1.5"
Matt Jordan [Tue, 26 Jan 2016 13:05:09 +0000 (07:05 -0600)] 
Merge "sounds/Makefile: Incremented core and extra sounds versions to 1.5"

10 years agosounds/Makefile: Incremented core and extra sounds versions to 1.5 91/2091/2
Rusty Newton [Mon, 25 Jan 2016 22:56:04 +0000 (16:56 -0600)] 
sounds/Makefile: Incremented core and extra sounds versions to 1.5

Core and extra sounds 1.5 was recently released! The tarballs contain
change descriptions however I figure more people will see this one so
I'll try to be a bit detailed. Approximately 60 sounds were moved from Extra
to Core for en, en_GB, fr and added for languages that didn't already
have Extra sound sets (it,ja,ru).

In addition all of the English and Russian sounds have been completely
re-recorded.

Sounds moved and added:
activated,added,all-circuits-busy-now,astcc-followed-by-pound
at-tone-time-exactly,call-forwarding,call-fwd-no-ans,call-fwd-on-busy
,call-fwd-unconditional,calling,call-waiting,cancelled,
cannot-complete-as-dialed,check-number-dial-again,conf-full,de-activated
,disabled,do-not-disturb,enabled,enter-num-blacklist,entr-num-rmv-blklist
,extension,feature-not-avail-line,for,from-unknown-caller,goodbye,hello
,if-correct-press,im-sorry,info-about-last-call,is,is-in-use,is-set-to
,location,number,number-not-answering,num-was-successfully,one-moment-please
,please-try-again,pls-hold-while-try,pls-try-call-later,pm-invalid-option
,privacy-to-blacklist-last-caller,removed,simul-call-limit-reached
,something-terribly-wrong,sorry,sorry-youre-having-problems,speed-dial
,speed-dial-empty,telephone-number,time,to-call-this-number,to-extension
,to-listen-to-it,to-rerecord-it,unidentified-no-callback,with,you-entered
,your

There were also a few random fixes here and there to file names for a few
of the languages.

ASTERISK-25068 #close

Change-Id: I2b594344ec585d7dfd922b40c1af43b1508828b3

10 years agores_pjsip_pubsub: Prevent crash from AMI command on freed subscription. 90/2090/1
Mark Michelson [Mon, 25 Jan 2016 22:51:25 +0000 (16:51 -0600)] 
res_pjsip_pubsub: Prevent crash from AMI command on freed subscription.

A test recently uncovered that running an ill-timed AMI command to show
inbound subscriptions could cause a crash since Asterisk will try to
operate on a freed subscription.

The fix for this is to remove the subscription tree from the list of
subscriptions at the time that we are sending our final NOTIFY request
out. This way, as the subscription is in the process of dying, it is
inaccessible from AMI.

Change-Id: Ic0239003d8d73e04c47c12dd2a7e23867e5b5b23

10 years agochan_sip: Fix buffer overrun in sip_sipredirect. 81/2081/1
Corey Farrell [Mon, 25 Jan 2016 17:03:21 +0000 (12:03 -0500)] 
chan_sip: Fix buffer overrun in sip_sipredirect.

sip_sipredirect uses sscanf to copy up to 256 characters to a stacked buffer
of 256 characters.  This patch reduces the copy to 255 characters to leave
room for the string null terminator.

ASTERISK-25722 #close

Change-Id: Id6c3a629a609e94153287512c59aa1923e8a03ab

10 years agoMerge "Stasis: Use control queue to prevent crash."
Joshua Colp [Sat, 23 Jan 2016 16:07:52 +0000 (10:07 -0600)] 
Merge "Stasis: Use control queue to prevent crash."

10 years agoStasis: Fix potential memory leak of control data. 71/2071/1
Mark Michelson [Fri, 22 Jan 2016 21:08:58 +0000 (15:08 -0600)] 
Stasis: Fix potential memory leak of control data.

When queuing tasks onto the Stasis control queue, you can pass an
arbitrary data pointer and a function to free that data. All ARI
commands that use the Stasis control queue made the assumption that the
destructor function would be called in all paths, whether the task was
queued successfully or not. However, this was not correct. If a task was
queued onto a control structure that was already completed, the
allocated data would not be freed properly.

This patch corrects this by making sure that all return paths call the
data destructor.

Change-Id: Ibf06522094f8e5c4cce652537dc5d7222b1c4fcb

10 years agoStasis: Use control queue to prevent crash. 57/2057/3
Mark Michelson [Thu, 21 Jan 2016 16:58:02 +0000 (10:58 -0600)] 
Stasis: Use control queue to prevent crash.

A crash occurred when attempting to set a channel variable on a channel
that had already been hung up. This is because there is a small window
between when a control is grabbed and when the channel variable is set
that the channel can be hung up.

The fix here is to queue the setting of the channel variable onto the
control queue. This way, the manipulation of the channel happens in a
thread where it is safe to be done.

In this change, I also noticed that the setting of bridge roles on
channels was being done outside of the control queue, so I also changed
those operations to be done in the control queue.

ASTERISK-25709 #close
Reported by Mark Michelson

Change-Id: I2a0a4d51bce6fba6f1d9954e40935e42f366ea78

10 years agologger.c: Fix buffer overrun found by address sanitizer. 68/2068/1
Richard Mudgett [Fri, 22 Jan 2016 17:48:24 +0000 (11:48 -0600)] 
logger.c: Fix buffer overrun found by address sanitizer.

The null terminator of the tail struct member was not being allocated
when no logger.conf config file is installed.

ASTERISK-25714 #close
Reported by: Badalian Vyacheslav

Change-Id: I45770fdd08af39506a3bc33ba279c4f16e047a30

10 years agoMerge "Build System: Add support for checking alembic branches."
Matt Jordan [Fri, 22 Jan 2016 02:57:02 +0000 (20:57 -0600)] 
Merge "Build System: Add support for checking alembic branches."

10 years agoMerge "res/res_pjsip/presence_xml.c: Add missing 2nd call presence state case."
Matt Jordan [Thu, 21 Jan 2016 23:25:26 +0000 (17:25 -0600)] 
Merge "res/res_pjsip/presence_xml.c: Add missing 2nd call presence state case."

10 years agoMerge "main/asterisk.c: ast_el_read_char"
Matt Jordan [Thu, 21 Jan 2016 23:25:03 +0000 (17:25 -0600)] 
Merge "main/asterisk.c: ast_el_read_char"

10 years agoBuild System: Add support for checking alembic branches. 65/2065/1
Corey Farrell [Thu, 21 Jan 2016 22:40:47 +0000 (17:40 -0500)] 
Build System: Add support for checking alembic branches.

* Add 'check-alembic' target to root Makefile.
* Create build_tools/make_check_alembic to do the actual checks.

ASTERISK-25685

Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004

10 years agores/res_pjsip/presence_xml.c: Add missing 2nd call presence state case. 62/2062/1
Richard Mudgett [Wed, 20 Jan 2016 00:20:59 +0000 (18:20 -0600)] 
res/res_pjsip/presence_xml.c: Add missing 2nd call presence state case.

ASTERISK-25712 #close
Reported by: Richard Mudgett

Change-Id: I70634df24f8c6c3a2c66c45af61d021e4999253f

10 years agoMerge "chan_sip: option 'notifyringing' change and doc fix"
Mark Michelson [Thu, 21 Jan 2016 21:22:53 +0000 (15:22 -0600)] 
Merge "chan_sip: option 'notifyringing' change and doc fix"

10 years agores_pjsip: Add CLI "pjsip dump endpt [details]" 23/2023/3
Richard Mudgett [Wed, 13 Jan 2016 22:49:22 +0000 (16:49 -0600)] 
res_pjsip: Add CLI "pjsip dump endpt [details]"

Dump the res_pjsip endpt internals.

In non-developer mode we will not document or make easily accessible the
"details" option even though it is still available.  The user has to know
it exists to use it.  Presumably they would also be aware of the potential
crash warning below.

Warning: PJPROJECT documents that the function used by this CLI command
may cause a crash when asking for details because it tries to access all
active memory pools.

Change-Id: If2d98a3641c9873364d1daaad971376311aef3cb

10 years agoMerge "taskprocessor.c: Increase CLI "core ping taskprocessor" timeout."
Mark Michelson [Wed, 20 Jan 2016 20:19:02 +0000 (14:19 -0600)] 
Merge "taskprocessor.c: Increase CLI "core ping taskprocessor" timeout."

10 years agoMerge "taskprocessor.c: Fix some taskprocessor unrefs."
Mark Michelson [Wed, 20 Jan 2016 20:18:57 +0000 (14:18 -0600)] 
Merge "taskprocessor.c: Fix some taskprocessor unrefs."

10 years agoMerge "res_pjproject: Add module providing pjproject logging and utils"
Joshua Colp [Wed, 20 Jan 2016 17:46:05 +0000 (11:46 -0600)] 
Merge "res_pjproject:  Add module providing pjproject logging and utils"

10 years agomain/asterisk.c: ast_el_read_char 32/2032/3
Diederik de Groot [Mon, 18 Jan 2016 09:49:48 +0000 (10:49 +0100)] 
main/asterisk.c: ast_el_read_char

Make sure buf[res] is not accessed at res=-1 (buffer underrun).
Address Sanitizer will complain about this quite loudly.

ASTERISK-24801 #close

Change-Id: Ifcd7f691310815a31756b76067c56fba299d3ae9

10 years agores_pjproject: Add module providing pjproject logging and utils 42/2042/3
George Joseph [Tue, 19 Jan 2016 01:27:57 +0000 (18:27 -0700)] 
res_pjproject:  Add module providing pjproject logging and utils

res_pjsip_log_forwarder has been renamed to res_pjproject
and enhanced as follows:

As a follow-on to the recent 'Add CLI "pjsip show buildopts"' patch,
a new ast_pjproject_get_buildopt function has been added.  It
allows the caller to get the value of one of the buildopts.

The initial use case is retrieving the runtime value of
PJ_MAX_HOSTNAME to insure we don't send a hostname greater
than pjproject can handle.  Since it can differ between
the version of pjproject that Asterisk was compiled against
and the version of pjproject that Asterisk is running against,
we can't use the PJ_MAX_HOSTNAME macro directly in Asterisk
source code.

Change-Id: Iab6e82fec3d7cf00c1cf6185c42be3e7569dee1e

10 years agoMerge "funcs/func_cdr: Correctly report high precision values for duration and billsec"
Joshua Colp [Wed, 20 Jan 2016 16:33:27 +0000 (10:33 -0600)] 
Merge "funcs/func_cdr: Correctly report high precision values for duration and billsec"

10 years agoMerge "pjsip_loging_refactor: Rename res_pjsip_log_forwarder to res_pjproject"
Joshua Colp [Wed, 20 Jan 2016 16:32:47 +0000 (10:32 -0600)] 
Merge "pjsip_loging_refactor: Rename res_pjsip_log_forwarder to res_pjproject"

10 years agofuncs/func_cdr: Correctly report high precision values for duration and billsec 44/2044/3
Matt Jordan [Mon, 18 Jan 2016 23:16:24 +0000 (17:16 -0600)] 
funcs/func_cdr: Correctly report high precision values for duration and billsec

When CDRs were refactored, func_cdr's ability to report high precision values
for duration and billsec (the 'f' option) was broken. This was due to func_cdr
incorrectly interpreting the duration/billsec values provided by the CDR engine
in milliseconds, as opposed to seconds. Since the CDR engine only provides
duration and billsec in seconds, and does not expose either attribute with
sufficient precision to merely pass back the underlying value, this patch fixes
the bug by re-calculating duration and billsec with microsecond precision based
on the start/answer/end times on the CDR.

ASTERISK-25179 #close

Change-Id: I8bc63822b496537a5bf80baf6102c06206bee841

10 years agotest_threadpool: Wait for each task to complete and fix memory leak. 52/2052/1
Joshua Colp [Tue, 19 Jan 2016 23:15:50 +0000 (19:15 -0400)] 
test_threadpool: Wait for each task to complete and fix memory leak.

This change makes the thread_timeout_thrash unit test wait for
each task to complete. This fixes the problem where the test would
prematurely end when all threads were gone and a new one had to be
started to handle the last task. It also increases the thrasing as
it is now more likely for each task to encounter the above scenario.

This also fixes a memory leak where the data for each task was not
being freed.

ASTERISK-25611 #close

Change-Id: I5017d621a4dc911f509074c16229b86bff2fb3c6

10 years agoMerge "Refactor init_logger_chain locking."
Mark Michelson [Tue, 19 Jan 2016 23:07:27 +0000 (17:07 -0600)] 
Merge "Refactor init_logger_chain locking."

10 years agotaskprocessor.c: Increase CLI "core ping taskprocessor" timeout. 50/2050/1
Richard Mudgett [Tue, 19 Jan 2016 01:44:24 +0000 (19:44 -0600)] 
taskprocessor.c: Increase CLI "core ping taskprocessor" timeout.

Change-Id: I4892d6acbb580d6c207d006341eaf5e0f8f2a029

10 years agotaskprocessor.c: Fix some taskprocessor unrefs. 49/2049/1
Richard Mudgett [Tue, 19 Jan 2016 01:43:41 +0000 (19:43 -0600)] 
taskprocessor.c: Fix some taskprocessor unrefs.

You have to call ast_taskprocessor_unref() outside of the taskprocessor
implementation code.  Taskprocessor use since v12 has become more
transient than just the singleton uses in earlier versions.

Change-Id: If7675299924c0cc65f2a43a85254e6f06f2d61bb

10 years agoFix alembic branches on master. 46/2046/1
Richard Mudgett [Tue, 19 Jan 2016 20:16:17 +0000 (14:16 -0600)] 
Fix alembic branches on master.

Change-Id: I64ed21fec50eb833641ca49d92184f6aaabd86e8

10 years agoRefactor init_logger_chain locking. 43/2043/2
Corey Farrell [Tue, 5 Jan 2016 23:12:54 +0000 (18:12 -0500)] 
Refactor init_logger_chain locking.

This removes logchannels locking from init_logger_chain, puts the
responsibility on the caller.  Adds locking around the one call that was
missing it.

ASTERISK-24833

Change-Id: I6cc42117338bf9575650a67bcb78ab1a33d7bad8

10 years agoMerge "Remove *.gcna / *.gcno files from added module sources."
Joshua Colp [Tue, 19 Jan 2016 01:24:28 +0000 (19:24 -0600)] 
Merge "Remove *.gcna / *.gcno files from added module sources."

10 years agopjsip_loging_refactor: Rename res_pjsip_log_forwarder to res_pjproject 38/2038/1
George Joseph [Tue, 19 Jan 2016 01:01:36 +0000 (18:01 -0700)] 
pjsip_loging_refactor: Rename res_pjsip_log_forwarder to res_pjproject

Change-Id: I5387821f29e5caa0cba0b7d62b0fc0d341e7e20b

10 years agoMerge "Update version number in features.conf.sample"
Mark Michelson [Mon, 18 Jan 2016 23:31:40 +0000 (17:31 -0600)] 
Merge "Update version number in features.conf.sample"

10 years agoMerge "pjsip/alembic: Fix qualify_timeout column definition"
Joshua Colp [Mon, 18 Jan 2016 11:49:45 +0000 (05:49 -0600)] 
Merge "pjsip/alembic:  Fix qualify_timeout column definition"

10 years agoMerge "func_channel: Add help text for undocumented CHANNEL function arguments"
Joshua Colp [Sun, 17 Jan 2016 19:48:32 +0000 (13:48 -0600)] 
Merge "func_channel: Add help text for undocumented CHANNEL function arguments"

10 years agoMerge "main/config: Clean config maps on shutdown."
Joshua Colp [Sun, 17 Jan 2016 17:44:38 +0000 (11:44 -0600)] 
Merge "main/config: Clean config maps on shutdown."

10 years agoUpdate version number in features.conf.sample 30/2030/2
Daniel Journo [Sat, 16 Jan 2016 19:18:19 +0000 (19:18 +0000)] 
Update version number in features.conf.sample

Update the version number in the comments from Asterisk 12 to Asterisk 12+

Change-Id: Ie692ac8cda3c993c3bf10f27f51a1cca3317ec7b

10 years agopjsip/alembic: Fix qualify_timeout column definition 08/2008/2
Daniel Journo [Wed, 13 Jan 2016 21:58:22 +0000 (21:58 +0000)] 
pjsip/alembic:  Fix qualify_timeout column definition

Corrects the qualify_timeout column type from Integer to Decimal

ASTERISK-25686 #close
Reported-by: Marcelo Terres
Change-Id: I757d0e3c011ee9be6cd5abd48bc92441a405d3c8

10 years agoMerge "bridge_basic: don't play an attended transfer fail sound after target hangs up"
Joshua Colp [Sat, 16 Jan 2016 14:29:58 +0000 (08:29 -0600)] 
Merge "bridge_basic: don't play an attended transfer fail sound after target hangs up"

10 years agoMerge "bridge_basic: don't cache xferfailsound during an attended transfer"
Joshua Colp [Sat, 16 Jan 2016 14:29:17 +0000 (08:29 -0600)] 
Merge "bridge_basic: don't cache xferfailsound during an attended transfer"

10 years agoMerge "taskprocessor.c: Simplify ast_taskprocessor_get() return code."
Joshua Colp [Sat, 16 Jan 2016 14:28:16 +0000 (08:28 -0600)] 
Merge "taskprocessor.c: Simplify ast_taskprocessor_get() return code."

10 years agomain/config: Clean config maps on shutdown. 28/2028/1
Corey Farrell [Sat, 16 Jan 2016 01:52:26 +0000 (20:52 -0500)] 
main/config: Clean config maps on shutdown.

ASTERISK-25700 #close

Change-Id: I096da84f9c62c6095f68bcf98eac4b7c7868e808

10 years agobridge_basic: don't cache xferfailsound during an attended transfer 15/2015/3
Kevin Harwell [Thu, 14 Jan 2016 20:42:57 +0000 (14:42 -0600)] 
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

10 years agotaskprocessor.c: Simplify ast_taskprocessor_get() return code. 25/2025/1
Richard Mudgett [Fri, 10 Jul 2015 15:37:35 +0000 (10:37 -0500)] 
taskprocessor.c: Simplify ast_taskprocessor_get() return code.

Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1

10 years agoastmm.c: Add more stats to CLI "memory show" commands. 20/2020/1
Richard Mudgett [Thu, 14 Jan 2016 00:20:57 +0000 (18:20 -0600)] 
astmm.c: Add more stats to CLI "memory show" commands.

* Add freed regions totals to allocations and summary.

* Add totals for all allocations and not just the selected allocations.

Change-Id: I61d5a5112617b0733097f2545a3006a344b4032a

10 years agobridge_basic: don't play an attended transfer fail sound after target hangs up 18/2018/1
Kevin Harwell [Thu, 14 Jan 2016 22:00:50 +0000 (16:00 -0600)] 
bridge_basic: don't play an attended transfer fail sound after target hangs up

If the attended transfer destination answers (picks call up or goes to
voicemail) and then hangs up on the transferer then transferer hears the
fail sound.

This patch makes it so the fail sound is not played when the transfer
destination/target hangs up after answering.

ASTERISK-25697 #close

Change-Id: I97f142fe4fc2805d1a24b7c16143069dc03d9ded

10 years agoRemove *.gcna / *.gcno files from added module sources. 11/2011/1
Corey Farrell [Thu, 14 Jan 2016 20:36:10 +0000 (15:36 -0500)] 
Remove *.gcna / *.gcno files from added module sources.

Asterisk uses a Makefile macro to associate additional sources with a
module.  This macro is responsible for creating clean targets but
previously left behind *.gcna and *.gcno files.

ASTERISK-25683 #close
Reported by yaron nahum

Change-Id: Idc0823fe80a25c42cefae901fde875e9fc38d8ea

10 years agofunc_channel: Add help text for undocumented CHANNEL function arguments 09/2009/1
Rusty Newton [Thu, 14 Jan 2016 15:26:15 +0000 (09:26 -0600)] 
func_channel: Add help text for undocumented CHANNEL function arguments

Adding help text documentation for:
* hangupsource
* appname
* appdata
* exten
* context
* channame
* uniqueid
* linkedid

ASTERISK-24097 #close
Reported by: Steven T. Wheeler
Tested by: Rusty Newton

Change-Id: Ib94b00568b0433987df87d5b67ea529b5905754d

10 years agoMerge "pjsip: Add option global/regcontext"
Joshua Colp [Thu, 14 Jan 2016 12:32:12 +0000 (06:32 -0600)] 
Merge "pjsip:  Add option global/regcontext"

10 years agopjsip: Add option global/regcontext 04/2004/1
Daniel Journo [Sun, 10 Jan 2016 22:22:12 +0000 (22:22 +0000)] 
pjsip:  Add option global/regcontext

Added new global option (regcontext) to pjsip. When set, Asterisk will
dynamically create and destroy a NoOp priority 1 extension
for a given endpoint who registers or unregisters with us.

ASTERISK-25670 #close
Reported-by: Daniel Journo
Change-Id: Ib1530c5b45340625805c057f8ff1fb240a43ea62

10 years agoapp: Queue hangup if channel is hung up during sub or macro execution. 99/1999/2
Joshua Colp [Tue, 12 Jan 2016 17:14:29 +0000 (13:14 -0400)] 
app: Queue hangup if channel is hung up during sub or macro execution.

This issue was exposed when executing a connected line subroutine.
When connected or redirected subroutines or macros are executed it is
expected that the underlying applications and logic invoked are fast
and do not consume frames. In practice this constraint is not enforced
and if not adhered to will cause channels to continue when they shouldn't.
This is because each caller of the connected or redirected logic does not
check whether the channel has been hung up on return. As a result the
the hung up channel continues.

This change makes it so when the API to execute a subroutine or
macro is invoked the channel is checked to determine if it has hung up.
If it has then a hangup is queued again so the caller will see it
and stop.

ASTERISK-25690 #close

Change-Id: I1f9a8ceb1487df0389f0d346ce0f6dcbcaf476ea

10 years agoMerge "res_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts"."
Mark Michelson [Wed, 13 Jan 2016 15:48:57 +0000 (09:48 -0600)] 
Merge "res_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts"."

10 years agores_musiconhold: Prevent multiple simultaneous reloads. 02/2002/2
Sean Bright [Wed, 13 Jan 2016 13:20:24 +0000 (08:20 -0500)] 
res_musiconhold: Prevent multiple simultaneous reloads.

There are two ways in which the reload() function in res_musiconhold can be
called from the CLI:

  * module reload res_musiconhold.so
  * moh reload

In the former case, the module loader holds a lock that prevents multiple
concurrent calls, but in the latter there is no such protection.

This patch changes the 'moh reload' CLI command to invoke the module loader
directly, rather than call reload() explicitly.

ASTERISK-25687 #close

Change-Id: I408968b4c8932864411b7f9ad88cfdc7b9ba711c

10 years agores_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts". 95/1995/2
Richard Mudgett [Tue, 12 Jan 2016 20:25:09 +0000 (14:25 -0600)] 
res_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts".

PJPROJECT has a function available to dump the compile time
options used when building the library.

* Add CLI "pjsip show buildopts" command.

* Update contrib/scripts/autosupport to get pjproject information.

Change-Id: Id93a6a916d765b2a2e5a1aeb54caaf83206be748

10 years agoMerge "pjsip_sdp_rtp: Add option endpoint/bind_rtp_to_media_address"
Joshua Colp [Wed, 13 Jan 2016 01:45:27 +0000 (19:45 -0600)] 
Merge "pjsip_sdp_rtp:  Add option endpoint/bind_rtp_to_media_address"

10 years agoMerge "res_pjsip: Create human friendly serializer names."
Joshua Colp [Tue, 12 Jan 2016 19:59:48 +0000 (13:59 -0600)] 
Merge "res_pjsip: Create human friendly serializer names."

10 years agoMerge "res_sorcery_realtime: Remove leading ^ requirement."
Joshua Colp [Tue, 12 Jan 2016 19:59:26 +0000 (13:59 -0600)] 
Merge "res_sorcery_realtime: Remove leading ^ requirement."

10 years agoMerge topic 'update_taskprocessor_commands'
Joshua Colp [Tue, 12 Jan 2016 19:25:48 +0000 (13:25 -0600)] 
Merge topic 'update_taskprocessor_commands'

* changes:
  Sorcery: Create human friendly serializer names.
  Stasis: Create human friendly taskprocessor/serializer names.
  taskprocessor.c: New API for human friendly taskprocessor names.
  taskprocessor.c: Sort CLI "core show taskprocessors" output.

10 years agoMerge "taskprocessor.c: Fix CLI "core show taskprocessors" output format."
Joshua Colp [Tue, 12 Jan 2016 19:18:58 +0000 (13:18 -0600)] 
Merge "taskprocessor.c: Fix CLI "core show taskprocessors" output format."

10 years agoMerge topic 'update_taskprocessor_commands'
Joshua Colp [Tue, 12 Jan 2016 19:18:35 +0000 (13:18 -0600)] 
Merge topic 'update_taskprocessor_commands'

* changes:
  taskprocessor.c: Fix CLI "core show taskprocessors" unref.
  taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock.

10 years agoMerge "ccss.c: Replace space in taskprocessor name."
Joshua Colp [Tue, 12 Jan 2016 19:17:54 +0000 (13:17 -0600)] 
Merge "ccss.c: Replace space in taskprocessor name."

10 years agores_sorcery_realtime: Remove leading ^ requirement. 92/1992/2
Mark Michelson [Tue, 12 Jan 2016 16:36:15 +0000 (10:36 -0600)] 
res_sorcery_realtime: Remove leading ^ requirement.

res_sorcery_realtime's search-by-regex callback performed a check to
ensure that the passed-in regex began with a caret (^). If it did not,
then no results would be returned.

This callback only started to become used when "like" support was added
to PJSIP CLI commands. The CLI command for listing objects would pass an
empty regex ("") to the sorcery backend if no "like" statement was
present. For most sorcery backends, this resulted in returning all
objects. However, for realtime, this resulted in returning no objects.

This commit seeks to fix the regression by removing the requirement from
res_sorcery_realtime for the passed-in-regex to begin with a caret.

ASTERISK-25689 #close
Reported by Marcelo Terres

Change-Id: I22b4dc5d7f3f11bb29ac2e42ef94682e9bab3b20

10 years agoMerge "app_queue: Add member flag "in_call" to prevent reading wrong lastcall time"
Joshua Colp [Tue, 12 Jan 2016 12:05:30 +0000 (06:05 -0600)] 
Merge "app_queue: Add member flag "in_call" to prevent reading wrong lastcall time"

10 years agopjsip_sdp_rtp: Add option endpoint/bind_rtp_to_media_address 29/1929/3
George Joseph [Thu, 7 Jan 2016 17:57:01 +0000 (10:57 -0700)] 
pjsip_sdp_rtp:  Add option endpoint/bind_rtp_to_media_address

On a system with multiple ip addresses in the same subnet, if a
transport is bound to a specific ip address and endpoint/media_address
 is set, the SIP/SDP will have the correct address in all fields but
the rtp stream MAY still originate from one of the other ip addresses,
most probably the "primary" ip address.  This happens because
 res_pjsip_sdp_rtp/create_rtp always calls ast_instance_new with
the "all" ip address (0.0.0.0 or ::).

The new option causes res_pjsip_sdp_rtp/create_rtp to call
ast_rtp_instance_new with the endpoint's media_address (if specified)
instead of the "all" address.  This causes the packets to originate from
the specified address.

ASTERISK-25632
ASTERISK-25637
Reported-by: Olivier Krief
Reported-by: Dan Journo
Change-Id: I3dfaa079e54ba7fb7c4fd1f5f7bd9509bbf8bd88

10 years agoMerge "Revert "pjsip_location: Delete contact_status object when contact is deleted""
Mark Michelson [Mon, 11 Jan 2016 23:43:39 +0000 (17:43 -0600)] 
Merge "Revert "pjsip_location: Delete contact_status object when contact is deleted""

10 years agoMerge "pbx: Deadlock between contexts container and context_merge locks"
Joshua Colp [Mon, 11 Jan 2016 23:37:18 +0000 (17:37 -0600)] 
Merge "pbx: Deadlock between contexts container and context_merge locks"

10 years agoMerge "Alembic: Increase column size of PJSIP AOR "contact"."
Joshua Colp [Mon, 11 Jan 2016 22:59:10 +0000 (16:59 -0600)] 
Merge "Alembic: Increase column size of PJSIP AOR "contact"."

10 years agoMerge "Alembic: Add PJSIP global keep_alive_interval."
Joshua Colp [Mon, 11 Jan 2016 22:59:04 +0000 (16:59 -0600)] 
Merge "Alembic: Add PJSIP global keep_alive_interval."

10 years agoMerge "pbx_dundi: Run cleanup on failed load."
Joshua Colp [Mon, 11 Jan 2016 22:54:56 +0000 (16:54 -0600)] 
Merge "pbx_dundi: Run cleanup on failed load."

10 years agoMerge "res_crypto: Perform cleanup at shutdown."
Joshua Colp [Mon, 11 Jan 2016 22:35:03 +0000 (16:35 -0600)] 
Merge "res_crypto: Perform cleanup at shutdown."

10 years agoMerge "res_calendar: Cleanup scheduler context at unload."
Joshua Colp [Mon, 11 Jan 2016 20:35:50 +0000 (14:35 -0600)] 
Merge "res_calendar: Cleanup scheduler context at unload."

10 years agoMerge "manager: Cleanup manager_channelvars during shutdown."
Joshua Colp [Mon, 11 Jan 2016 20:35:13 +0000 (14:35 -0600)] 
Merge "manager: Cleanup manager_channelvars during shutdown."

10 years agoMerge "devicestate: Cleanup engine thread during graceful shutdown."
Joshua Colp [Mon, 11 Jan 2016 20:34:55 +0000 (14:34 -0600)] 
Merge "devicestate: Cleanup engine thread during graceful shutdown."

10 years agopbx: Deadlock between contexts container and context_merge locks 62/1962/2
Kevin Harwell [Fri, 8 Jan 2016 22:59:44 +0000 (16:59 -0600)] 
pbx: Deadlock between contexts container and context_merge locks

Recent changes (ASTERISK-25394 commit 2bd27d12223fe33b58c453965ed5c6ed3af7c4f5)
introduced the possibility of a deadlock. Due to the mentioned modifications
ast_change_hints now needs to keep both merge/delete and state callbacks from
occurring while it executes. Unfortunately, sometimes ast_change_hints can be
called with the contexts container locked. When this happens it's possible for
another thread to grab the context_merge_lock before the thread calling into
ast_change_hints does and then try to obtain the contexts container lock. This
of course causes a deadlock between the two threads. The thread calling into
ast_change_hints waits for the other thread to release context_merge_lock and
the other thread is waiting on that one to release the contexts container lock.

Unfortunately, there is not a great way to fix this problem. When hints change,
the subsequent state callbacks cannot run at the same time as a merge/delete,
nor when the usual state callbacks do. This patch alleviates the problem by
having those particular callbacks (the ones run after a hint change) occur in a
serialized task. By moving the context_merge_lock to a task it can now safely be
attempted or held without a deadlock occurring.

ASTERISK-25640 #close
Reported by: Krzysztof Trempala

Change-Id: If2210ea241afd1585dc2594c16faff84579bf302

10 years agodevicestate: Cleanup engine thread during graceful shutdown. 87/1987/1
Corey Farrell [Sun, 10 Jan 2016 23:08:16 +0000 (18:08 -0500)] 
devicestate: Cleanup engine thread during graceful shutdown.

ASTERISK-25681 #close

Change-Id: I64337c70f0ebd8c77f70792042684607c950c8f1

10 years agomanager: Cleanup manager_channelvars during shutdown. 83/1983/1
Corey Farrell [Sun, 10 Jan 2016 19:51:00 +0000 (14:51 -0500)] 
manager: Cleanup manager_channelvars during shutdown.

ASTERISK-25680 #close

Change-Id: I3251d781cbc3f48a6a7e1b969ac4983f552b2446

10 years agores_calendar: Cleanup scheduler context at unload. 80/1980/1
Corey Farrell [Sun, 10 Jan 2016 19:27:57 +0000 (14:27 -0500)] 
res_calendar: Cleanup scheduler context at unload.

ASTERISK-25679 #close

Change-Id: I839159bf6882cccc1b23494c7aa2bc2a2624613f

10 years agores_rtp_asterisk: Revert DTLS negotiation changes. 76/1976/2
Joshua Colp [Fri, 8 Jan 2016 17:49:02 +0000 (13:49 -0400)] 
res_rtp_asterisk: Revert DTLS negotiation changes.

Due to locking issues within pjnath these changes are being
reverted until pjnath can be changed.

ASTERISK-25645

Revert "res_rtp_asterisk.c: Fix DTLS negotiation delays."

This reverts commit 24ae124e4f7310cfa64c187b944b2ffc060da28d.

Change-Id: I2986cfb2c43dc14455c1bcaf92c3804f9da49705

Revert "res_rtp_asterisk: Resolve further timing issues with DTLS negotiation"

This reverts commit 965a0eee46d24321f74c244e23c5a5f45e67e12b.

Change-Id: Ie68fafde27dad4b03cb7a1e27ce2a8502c3f7bbe

10 years agoRevert "pjsip_location: Delete contact_status object when contact is deleted" 74/1974/1
George Joseph [Sat, 9 Jan 2016 23:57:45 +0000 (16:57 -0700)] 
Revert "pjsip_location: Delete contact_status object when contact is deleted"

This reverts commit 0a9941de9d24093b5ff44096d1d7406f29d11e45.

Matt,

This patch causes another problem and should not have been needed.
Before this patch, persistent_endpoint_contact_deleted_observer WAS
deleting the contact_status when ast_sip_location_delete_contact was
called.  By deleting it yourself in ast_sip_location_delete_contact
it was gone before the observer could run and the observer therefore
was throwing an error and not sending stasis/AMI/statsd messages.

So, I don't think this was the cause of your original issue.  I also
had verified the contact AMI and statsd lifecycle and it was working.
I'll double check now though.

ASTERISK-25675
Reported-by: Daniel Journo
Change-Id: Ib586a6b7f90acb641b0c410f659743ab90e84f1a

10 years agopbx_dundi: Run cleanup on failed load. 72/1972/1
Corey Farrell [Sun, 10 Jan 2016 00:04:34 +0000 (19:04 -0500)] 
pbx_dundi: Run cleanup on failed load.

During failed startup of pbx_dundi no cleanup was performed.  Add a call
to unload_module before returning AST_MODULE_LOAD_DECLINE.

ASTERISK-25677 #close

Change-Id: I8ffa226fda4365ee7068ac1f464473f1a4ebbb29

10 years agores_crypto: Perform cleanup at shutdown. 69/1969/1
Corey Farrell [Sat, 9 Jan 2016 19:28:31 +0000 (14:28 -0500)] 
res_crypto: Perform cleanup at shutdown.

This change causes res_crypto to unregister CLI at shutdown while still
preventing the module from being unloaded.

ASTERISK-25673 #close

Change-Id: Ie5d57338dc2752abfc0dd05d0eec86413f2304fc

10 years agoMerge "include/asterisk/time.h: Renamed global declaration:tv"
Joshua Colp [Sat, 9 Jan 2016 17:15:22 +0000 (11:15 -0600)] 
Merge "include/asterisk/time.h: Renamed global declaration:tv"

10 years agores_pjsip: Create human friendly serializer names. 58/1958/2
Richard Mudgett [Thu, 7 Jan 2016 01:10:16 +0000 (19:10 -0600)] 
res_pjsip: Create human friendly serializer names.

PJSIP name formats:
pjsip/aor/<aor>-<seq> -- registrar thread pool serializer
pjsip/default-<seq> -- default thread pool serializer
pjsip/messaging -- messaging thread pool serializer
pjsip/outreg/<registration>-<seq> -- outbound registration thread pool
serializer
pjsip/pubsub/<endpoint>-<seq> -- pubsub thread pool serializer
pjsip/refer/<endpoint>-<seq> -- REFER thread pool serializer
pjsip/session/<endpoint>-<seq> -- session thread pool serializer
pjsip/websocket-<seq> -- websocket thread pool serializer

Change-Id: Iff9df8da3ddae1132cb2ef65f64df0c465c5e084

10 years agoSorcery: Create human friendly serializer names. 57/1957/2
Richard Mudgett [Thu, 7 Jan 2016 01:09:43 +0000 (19:09 -0600)] 
Sorcery: Create human friendly serializer names.

Sorcery name formats:
sorcery/<type>-<seq> -- Sorcery thread pool serializer

Change-Id: Idc2e5d3dbab15c825b97c38c028319a0d2315c47

10 years agoStasis: Create human friendly taskprocessor/serializer names. 56/1956/2
Richard Mudgett [Thu, 7 Jan 2016 01:09:59 +0000 (19:09 -0600)] 
Stasis: Create human friendly taskprocessor/serializer names.

Stasis name formats:
subm:<topic>-<seq> -- Stasis subscription mailbox task processor
subp:<topic>-<seq> -- Stasis subscription thread pool serializer

Change-Id: Id19234b306e3594530bb040bc95d977f18ac7bfd

10 years agotaskprocessor.c: New API for human friendly taskprocessor names. 55/1955/2
Richard Mudgett [Thu, 7 Jan 2016 22:15:35 +0000 (16:15 -0600)] 
taskprocessor.c: New API for human friendly taskprocessor names.

* Add new API call to get a sequence number for use in human friendly
taskprocessor names.

* Add new API call to create a taskprocessor name in a given buffer and
append a sequence number.

Change-Id: Iac458f05b45232315ed64aa31b1df05b875537a9

10 years agotaskprocessor.c: Fix CLI "core show taskprocessors" output format. 53/1953/2
Richard Mudgett [Wed, 6 Jan 2016 23:19:19 +0000 (17:19 -0600)] 
taskprocessor.c: Fix CLI "core show taskprocessors" output format.

Update the CLI "core show taskprocessors" output format to not be
distorted because UUID names are longer than previously used taskprocessor
names.

Change-Id: I1a5c82ce3e8f765a0627796aba87f8f7be077601

10 years agotaskprocessor.c: Fix CLI "core show taskprocessors" unref. 52/1952/2
Richard Mudgett [Fri, 8 Jan 2016 03:07:49 +0000 (21:07 -0600)] 
taskprocessor.c: Fix CLI "core show taskprocessors" unref.

Change-Id: I1d9f4e532caa6dfabe034745dd16d06134efdce5

10 years agoccss.c: Replace space in taskprocessor name. 50/1950/2
Richard Mudgett [Thu, 7 Jan 2016 01:00:27 +0000 (19:00 -0600)] 
ccss.c: Replace space in taskprocessor name.

The CLI "core ping taskprocessor" command does not work very
well with taskprocessor names that have spaces in them.  You
have to put quotes around the name so using tab completion
becomes awkward.

Change-Id: I29e806dd0a8a0256f4e2e0a7ab88c9e19ab0eda0

10 years agotaskprocessor.c: Sort CLI "core show taskprocessors" output. 54/1954/2
Richard Mudgett [Fri, 8 Jan 2016 02:44:18 +0000 (20:44 -0600)] 
taskprocessor.c: Sort CLI "core show taskprocessors" output.

Change-Id: I71e7bf57c7b908c8b8c71f1816348ed7c5a5d51e

10 years agotaskprocessor.c: Add CLI "core ping taskprocessor" missing unlock. 51/1951/2
Richard Mudgett [Tue, 5 Jan 2016 22:54:06 +0000 (16:54 -0600)] 
taskprocessor.c: Add CLI "core ping taskprocessor" missing unlock.

Change-Id: I78247e0faf978bf850b5ba4e9f4933ab3c59d17b

10 years agoMerge "main: Use ast_strdup instead of strdup"
Mark Michelson [Fri, 8 Jan 2016 20:46:51 +0000 (14:46 -0600)] 
Merge "main: Use ast_strdup instead of strdup"