]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
9 years agochan_sip: Handle a request to negotiate T.38 after it is enabled. 52/3152/1
Joshua Colp [Thu, 7 Jul 2016 15:38:45 +0000 (12:38 -0300)] 
chan_sip: Handle a request to negotiate T.38 after it is enabled.

Some T.38 implementations may send another re-invite after the initial
one which adds additional negotiation details (such as the max bitrate).
Currently this will fail when passthrough is being done in chan_sip as we
do nothing if T.38 is already active.

Other handlers of T.38 inside of Asterisk (such as res_fax) handle this
scenario so this change adds support for it to chan_sip. If a request
to negotiate is received while T.38 is already enabled a new re-INVITE is
sent and negotiation is done again.

ASTERISK-26179 #close

Change-Id: I0298494d3da6df3219bbfa4be9aa04015043145c

9 years agoMerge "BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf." into 11
zuul [Wed, 29 Jun 2016 14:34:21 +0000 (09:34 -0500)] 
Merge "BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf." into 11

9 years agoBuildSystem: Fix a few issues hightlighted by gcc 6.x 97/3097/1
George Joseph [Tue, 28 Jun 2016 13:22:24 +0000 (07:22 -0600)] 
BuildSystem:  Fix a few issues hightlighted by gcc 6.x

gcc 6.1.1 caught a few more issues.
Made sure the unit tests still pass for the func_env and stdtime
issues.

ASTERISK-26157 #close

Change-Id: I6664d8f34a45bc1481d2a854481c7878b0c1cf8e

9 years agoBuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf. 87/3087/1
Alexander Traud [Thu, 23 Jun 2016 09:33:06 +0000 (11:33 +0200)] 
BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf.

Removed the obsolete macro AC_TYPE_SIGNAL because Asterisk does not use K&R C
but requires ANSI C anyway.

ASTERISK-26046

Change-Id: I914c014385e1862102d90fe7650621def78db02e

9 years agoMerge "res_fax: Fix reference leak in fax_v21_session_new." into 11
zuul [Thu, 23 Jun 2016 02:50:23 +0000 (21:50 -0500)] 
Merge "res_fax: Fix reference leak in fax_v21_session_new." into 11

9 years agoMerge "res_rtp_asterisk: Fix a self-comparison identified by gcc 6" into 11
zuul [Thu, 23 Jun 2016 01:36:42 +0000 (20:36 -0500)] 
Merge "res_rtp_asterisk:  Fix a self-comparison identified by gcc 6" into 11

9 years agoMerge "chan_unistim: Fix memcpy in get_to_address" into 11
zuul [Wed, 22 Jun 2016 23:50:55 +0000 (18:50 -0500)] 
Merge "chan_unistim:  Fix memcpy in get_to_address" into 11

9 years agores_fax: Fix reference leak in fax_v21_session_new. 84/3084/1
Corey Farrell [Wed, 22 Jun 2016 20:04:54 +0000 (16:04 -0400)] 
res_fax: Fix reference leak in fax_v21_session_new.

fax_v21_session_new created a session details object but only released
the allocation reference during error conditions.  fax_session_new adds
it's own reference to details if needed so the caller is always
responsible for cleaning it's own reference.

ASTERISK-26141 #close

Change-Id: Ie7fc52a83b6596ce9ce2d5a2bd9f3e204f48fc88

9 years agores_rtp_asterisk: Fix a self-comparison identified by gcc 6 81/3081/1
George Joseph [Wed, 22 Jun 2016 18:41:57 +0000 (12:41 -0600)] 
res_rtp_asterisk:  Fix a self-comparison identified by gcc 6

gcc 6 caught a previously unidentified self-comparison in
ice_candidate_cmp.  Fixed it and re-ordered the predicates for better
short-circuiting.

ASTERISK-26140 #close

Change-Id: I3da713c568e24064430257b3502fbdafd35af7a7

9 years agochan_unistim: Fix memcpy in get_to_address 73/3073/2
George Joseph [Wed, 22 Jun 2016 15:37:23 +0000 (09:37 -0600)] 
chan_unistim:  Fix memcpy in get_to_address

A code block only enabled when HAVE_PKTINFO is not defined (FreeBSD)
was using a pointer to a pointer as the destination of a memcpy and a
'&' instead of '*' in the sizeof.

ASTERISK-26138 #close

Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708

9 years agoBuildSystem: Avoid obsolete warning with AC_FUNC_SETVBUF_REVERSED on autoconf. 77/3077/1
Alexander Traud [Wed, 22 Jun 2016 15:55:05 +0000 (17:55 +0200)] 
BuildSystem: Avoid obsolete warning with AC_FUNC_SETVBUF_REVERSED on autoconf.

Removed the obsolete macro AC_FUNC_SETVBUF_REVERSED because Asterisk does not
support the platform SVR2 from the year 1987 anymore.

ASTERISK-26046

Change-Id: I28161b037feb2d29ab46ed20e785928460226c22

9 years agoMerge "res_rtp_asterisk: fix memory leak in dtls" into 11
zuul [Wed, 22 Jun 2016 15:16:53 +0000 (10:16 -0500)] 
Merge "res_rtp_asterisk: fix memory leak in dtls" into 11

9 years agores_rtp_asterisk: fix memory leak in dtls 51/3051/2
Torrey Searle [Tue, 21 Jun 2016 11:52:20 +0000 (13:52 +0200)] 
res_rtp_asterisk: fix memory leak in dtls

ensure that cert bios get freed after creating the fingerprint

ASTERISK-26129 #close

Change-Id: I44d23aea07dce80176ca1ff877c5ace9452ef451

9 years agoMerge "res_rtp_asterisk: Use latest DTLS version available by underlying platform...
zuul [Wed, 22 Jun 2016 00:04:41 +0000 (19:04 -0500)] 
Merge "res_rtp_asterisk: Use latest DTLS version available by underlying platform." into 11

9 years agores_rtp_asterisk: Use latest DTLS version available by underlying platform. 53/3053/2
Alexander Traud [Tue, 21 Jun 2016 12:05:30 +0000 (14:05 +0200)] 
res_rtp_asterisk: Use latest DTLS version available by underlying platform.

Do not use DTLSv1_method() but DTLS_method() when available in OpenSSL of the
underlying platform. This change enables DTLS 1.2 since OpenSSL 1.0.2, for
WebRTC (DTLS-SRTP via SIP-over-WebSockets). This change enables AEAD-based
cipher-suites.

ASTERISK-26130 #close

Change-Id: I41f24448d6d2953e8bdb97c9f4a6bc8a8f055fd0

9 years agoBuildSystem: Avoid obsolete warning with HELP_STRING on autoconf. 56/3056/1
Alexander Traud [Tue, 21 Jun 2016 13:01:40 +0000 (15:01 +0200)] 
BuildSystem: Avoid obsolete warning with HELP_STRING on autoconf.

Some configure scripts used both AC_HELP_STRING and its replacement
AS_HELP_STRING. For consistency and to avoid obsolete warnings, those were
changed to AS_HELP_STRING.

ASTERISK-26046

Change-Id: I8aad4fd2bdee40aa2a31ce3339a1eb33ff4f5b0f

9 years agofix: memory and resource leaks 50/3050/1
Alexei Gradinari [Mon, 20 Jun 2016 20:09:05 +0000 (16:09 -0400)] 
fix: memory and resource leaks

ASTERISK-26119 #close

Change-Id: Iecbf7d0f360a021147344c4e83ab242fd1e7512c

9 years agohttp: leverage 'bindaddr' for TLS in http.conf 42/3042/1
Alexander Traud [Mon, 20 Jun 2016 13:05:09 +0000 (15:05 +0200)] 
http: leverage 'bindaddr' for TLS in http.conf

The internal HTTP/WebSocket server supports both TCP and TLS, which can be
activated separately via the file http.conf. The source code intends to re-use
the TCP parameter 'bindaddr' for TLS, even if 'tlsbindaddr' is not specified
explicitly. This did not work because of a typo. This change resolves this typo.

ASTERISK-26126 #close

Change-Id: I5efb0409ae12044dfb3495b6b97b6d40a8c9c51f

9 years agochan_sip: bigger buffers for headers, better failure mode 35/3035/1
Vasil Kolev [Tue, 31 May 2016 14:10:29 +0000 (17:10 +0300)] 
chan_sip: bigger buffers for headers, better failure mode

Currently chan_sip can give weird messages if the contacts don't
fit in the From: or To: headers. This fix changes the from,to and
invite variables to use ast_str, allocates and deallocates them and
resizes them if needed.

ASTERISK-26069 #close

Change-Id: I1b68fcbddca6f6cc7d7a92fe1cb0d5430282b2b3

9 years agoMerge "core: Not the configured but granted number of possible file descriptors....
Joshua Colp [Fri, 10 Jun 2016 20:51:53 +0000 (15:51 -0500)] 
Merge "core: Not the configured but granted number of possible file descriptors." into 11

9 years agocore: Not the configured but granted number of possible file descriptors. 71/2971/3
Alexander Traud [Wed, 8 Jun 2016 12:20:26 +0000 (14:20 +0200)] 
core: Not the configured but granted number of possible file descriptors.

With CLI "core show settings", simply the parameter maxfiles of the file
asterisk.conf was shown. If that parameter was not set, nothing was displayed
although the environment might have set a default number itself. Or if maxfiles
were not granted (completely), still maxfiles was shown. Now, the maximum number
of possible file descriptors in the environment is shown.

ASTERISK-26097

Change-Id: I2df5c58863b5007b34b77adbe28b885dfcdf7e0b

9 years agobuild: Fix ast_sockaddr initialization to be more portable 81/2981/2
George Joseph [Thu, 9 Jun 2016 14:20:33 +0000 (08:20 -0600)] 
build:  Fix ast_sockaddr initialization to be more portable

A change to glibc 2.22 changed the order of the sockadddr_storage
members which caused the places where we do an initialization of
ast_sockaddr with '{ { 0, 0, } }' to fail compilation.  Those
initializers (which we shouldn't have been using anyway) have been
replaced with memsets.

Change-Id: Idd1b3b320903d8771bfe221f0b015685de628fa4

9 years agoMerge "astfd: Not maximum size of a single file but maximum file descriptors." into 11
zuul [Thu, 9 Jun 2016 12:53:37 +0000 (07:53 -0500)] 
Merge "astfd: Not maximum size of a single file but maximum file descriptors." into 11

9 years agoMerge "BuildSystem: Avoid 'ar cru' and use 'ar cr' instead." into 11
zuul [Thu, 9 Jun 2016 02:49:05 +0000 (21:49 -0500)] 
Merge "BuildSystem: Avoid 'ar cru' and use 'ar cr' instead." into 11

9 years agoastfd: Not maximum size of a single file but maximum file descriptors. 67/2967/1
Alexander Traud [Wed, 8 Jun 2016 10:58:48 +0000 (12:58 +0200)] 
astfd: Not maximum size of a single file but maximum file descriptors.

With menuselect "DEBUG_FD_LEAKS" and CLI "core show fd", the maximum size of a
single file was shown. Now, the maximum number of possible file descriptors is
shown.

ASTERISK-26097

Change-Id: Icf98d145774b38cac144ca76d19eaef42ce659a3

9 years agoFix #include poll.h and sys/cdefs.h 64/2964/1
Timo Teräs [Thu, 2 Jun 2016 19:53:39 +0000 (22:53 +0300)] 
Fix #include poll.h and sys/cdefs.h

POSIX defines poll.h, sys/poll.h should not be used at is c-library
internal header which may or may not exist. Notable in musl it
generates warning of being incorrect. And add explict include of
sys/cdefs.h where needed.

Change-Id: I142930df53fe7585a06b854b6faddc5301e024be

9 years agores_srtp: Instead of libSRTP use OpenSSL as random source. 62/2962/1
Alexander Traud [Tue, 7 Jun 2016 10:45:34 +0000 (12:45 +0200)] 
res_srtp: Instead of libSRTP use OpenSSL as random source.

Since libSRTP 1.5, its Random Number Generator (RNG) is not maintained anymore.
Therefore, the symbol RAND_bytes is used instead of crypto_get_random.

ASTERISK-24436 #close

Change-Id: Iea0bae4d4e3c9aa0926ea442b6484b5159789d96

9 years agoBuildSystem: Avoid 'ar cru' and use 'ar cr' instead. 59/2959/1
Alexander Traud [Tue, 7 Jun 2016 07:16:02 +0000 (09:16 +0200)] 
BuildSystem: Avoid 'ar cru' and use 'ar cr' instead.

In several internal library projects, the files are archived with the help of
'ar cr'. Only the projects editline and the Objective Open H.323 stack
implementation in C (ooh323c) use 'ar cru' instead. Recently, some platforms
changed the default parameters of AR which creates "/usr/bin/ar: `u' modifier
ignored since `D' is the default (see `U')". For consistency and to avoid this
message all projects use 'ar cr' now.

ASTERISK-26091 #close

Change-Id: I710a9b1c01c1b5a1931a646098c044c8161ead40

9 years agoMerge "Makefile: remove OSARCH check for init install" into 11
zuul [Mon, 23 May 2016 21:16:12 +0000 (16:16 -0500)] 
Merge "Makefile: remove OSARCH check for init install" into 11

9 years agoMakefile: remove OSARCH check for init install 95/2895/1
Tzafrir Cohen [Wed, 18 May 2016 15:58:20 +0000 (18:58 +0300)] 
Makefile: remove OSARCH check for init install

There are more specific checks for the platform.

Specifically this allows installing OS/X init scripts.

ASTERISK-26038 #close

Change-Id: If08933621145b10362a0cfe73c079301d9c13f50
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
9 years agofunc_curl: Don't trim response text on non-ASCII characters 93/2893/1
Ivan Poddubny [Sat, 21 May 2016 10:42:45 +0000 (13:42 +0300)] 
func_curl: Don't trim response text on non-ASCII characters

The characters 0x80-0xFF were trimmed as well as 0x00-0x20 because of
a signed comparison.

ASTERISK-25669 #close
Reported by: Jesper
patches:
  strings.curl.trim.patch submitted by Jesper (License 5518)

Change-Id: Ia51e169f24e3252a7ebbaab3728630138ec6f60a

9 years agoMerge "udptl: Don't eat sequence numbers until OK is received" into 11
zuul [Thu, 19 May 2016 09:32:29 +0000 (04:32 -0500)] 
Merge "udptl:  Don't eat sequence numbers until OK is received" into 11

9 years agoudptl: Don't eat sequence numbers until OK is received 69/2869/3
George Joseph [Wed, 18 May 2016 12:54:14 +0000 (06:54 -0600)] 
udptl:  Don't eat sequence numbers until OK is received

Scenario:
Local fax -> Asterisk w/ firewall -> Provider -> Remote fax

* Local fax starts rtp call to remote fax
* Remote fax starts t38 call back to local fax.
* Local fax sends t38 no-signal to Asterisk before sending an OK.
* udptl processes the frame and increments the expected sequence number.
* chan_sip drops the frame because the call isn't up so nothing goes out
  the external interface to open the port for incoming packets.
* Local fax sends OK and Asterisk sends OK to the remote fax.
* Remote fax sends t38 packets which are dropped by the firewall.
* Local fax re-sends t38 no-signal with the same sequence number.
* udptl drops the frame because it thinks it's a dup.
* Still no outgoing packets to open the firewall.
* t38 negotiation fails.

The patch drops frames t38 received before udptl sequence processing
when the call hasn't been answered yet.  The second no-signal frame
is then seen as new and is relayed out the external interface which
opens the port and allows negotiation to continue.

ASTERISK-26034 #close

Change-Id: I11744b39748bd2ecbbe8ea84cdb4f3c5943c5af9

9 years agochan_sip: Prevent extra Session-Expires headers from being added 54/2854/2
George Joseph [Tue, 17 May 2016 16:14:51 +0000 (10:14 -0600)] 
chan_sip:  Prevent extra Session-Expires headers from being added

When chan_sip does a re-INVITE to refresh a session and authentication
is required, the INVITE with the Authorization header containes a
second Session-Expires header without the ";refersher=" parameter.
This is causing some proxies to return a 400.  Also, when Asterisk is
the uas and the refresher, it is including the Session-Expires and
Min-SE headers in OPTIONS messages which is not allowed per RFC4028.

This patch (based on the reporter's) Checks to see if a Session-Expires
header is already in the message before adding another one.  It also
checks that the method is INVITE or UPDATE.

ASTERISK-26030 #close

Change-Id: I58a7b07bab5a3177748d8a7034fb8ad8e11ce1d9

9 years agoMerge "logger: Add PID to syslog messages." into 11
zuul [Sun, 15 May 2016 00:50:47 +0000 (19:50 -0500)] 
Merge "logger: Add PID to syslog messages." into 11

9 years agofollowme: delete the right recorded name file 29/2829/1
Tzafrir Cohen [Tue, 10 May 2016 13:17:29 +0000 (16:17 +0300)] 
followme: delete the right recorded name file

FollowMe with the option a records the name of the caller and plays it
to the callee. However it has failed to clean up that recorded file
as it tried to delete the file name without the '.sln' extension.

ASTERISK-26008 #close

Change-Id: I79d7b1be7d5cde57bf076d9389e2a8a4422776ec
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
9 years agologger: Add PID to syslog messages. 12/2812/1
Alexei Gradinari [Thu, 5 May 2016 21:41:21 +0000 (17:41 -0400)] 
logger: Add PID to syslog messages.

During refactoring of this support the addition of
the PID to messages was removed. This change adds it
back in.

ASTERISK-25538 #close

Change-Id: Ie2d43b0652e59b7ac319a7dba94501540d70ba36

9 years agores_fax/t38_gateway: Peer V.21 session is created on wrong channel 98/2798/1
Alexei Gradinari [Tue, 10 May 2016 14:20:54 +0000 (10:20 -0400)] 
res_fax/t38_gateway: Peer V.21 session is created on wrong channel

The channel and peer V.21 sessions are created on the same channel now.
The peer V.21 session should be created only on peer channel
when one of channel can handle T.38.

Also this patch enable debug for T.38 gateway session
if global fax debug enabled.

ASTERISK-25982

Change-Id: I78387156ea521a77eb0faf170179ddd37a50430e

9 years agoapp_voicemail: always copy dynamic struct to avoid race condition 46/2746/2
Andrew Nagy [Thu, 17 Mar 2016 19:29:38 +0000 (12:29 -0700)] 
app_voicemail: always copy dynamic struct to avoid race condition

Voicemail email addresses can be corrupt or voicemail
emails can end up being sent to the wrong email address if asterisk is
reading voicemail.conf during a reload and processing an email at the
same time. This patch always copies the struct that would otherwise only
be copied once.

ASTERISK-24463 #close
Reported by: John Campbell
Tested by: Etienne Lessard
Tested by: Andrew Nagy
Change-Id: I3a0643813116da84e2617291903d0d489b7425fb

9 years agoMerge "config: Fix ast_config_text_file_save writability check for missing files...
Joshua Colp [Wed, 27 Apr 2016 20:40:16 +0000 (15:40 -0500)] 
Merge "config:  Fix ast_config_text_file_save writability check for missing files" into 11

9 years agoMerge "Fix case sensitive actions in AMI QueueSummary and QueueStatus" into 11
zuul [Tue, 26 Apr 2016 00:10:37 +0000 (19:10 -0500)] 
Merge "Fix case sensitive actions in AMI QueueSummary and QueueStatus" into 11

9 years agoconfig: Fix ast_config_text_file_save writability check for missing files 93/2693/4
George Joseph [Mon, 25 Apr 2016 03:51:16 +0000 (21:51 -0600)] 
config:  Fix ast_config_text_file_save writability check for missing files

A patch I did back in 2014 modified ast_config_text_file_save to check the
writability of the main file and include files before truncating and re-writing
them.  An unintended side-effect of this was that if a file doesn't exist,
the check fails and the write is aborted.

This patch causes ast_config_text_file_save to check the writability of the
parent directory of missing files instead of checking the file itself.  This
allows missing files to be created again.  A unit test was also added to
test_config to test saving of config files.

The regression was discovered when app_voicemail's passwordlocation=spooldir
feature stopped working.

ASTERISK-25917 #close
Reported-by: Jonathan Rose
Change-Id: Ic4dbe58c277a47b674679e49daed5fc6de349f80

9 years agoFix case sensitive actions in AMI QueueSummary and QueueStatus 99/2699/1
DarkS [Mon, 25 Apr 2016 13:11:31 +0000 (15:11 +0200)] 
Fix case sensitive actions in AMI QueueSummary and QueueStatus

ASTERISK-25954 #close
Reported by: Javier Acosta

Change-Id: I00be83d45cc7e8385de2523012bd196aafeeb256
(cherry picked from commit c0688a6398f27296ff849848a2e416e036d794e3)

9 years agoapp_queue: queue members can receive multiple calls 79/2679/2
Kevin Harwell [Thu, 21 Apr 2016 20:35:26 +0000 (15:35 -0500)] 
app_queue: queue members can receive multiple calls

It was possible for a queue member that is a member of at least 2 or more
queues to receive mulitiple calls at the same time. This happened because
of a race between when a member was being rung and when the device state
notified the other queue(s) member object of the state change.

This patch makes it so when a queue member is being rung it gets added to
a global pool of queue members. If that same member is tried again, e.g.
from another queue, and it is found to already exist in the pending member
container then it will not ring that member.

ASTERISK-16115 #close

Change-Id: Ice45a1c95b9f6f15d8a9fa709c5e5c84ffd29780

9 years agolock.c: Check *lt before dereferencing it 75/2675/1
Diederik de Groot [Thu, 21 Apr 2016 13:26:47 +0000 (15:26 +0200)] 
lock.c: Check *lt before dereferencing it

*lt is NULL if t->tracking == 0

ASTERISK-25948 #close

Change-Id: I4a81af28f9c82a74aa82413d772a7dc8fa6f45ba

9 years agoMerge "app_queue: Frequent segfaults in function can_ring_entry()" into 11
Joshua Colp [Tue, 19 Apr 2016 14:49:22 +0000 (09:49 -0500)] 
Merge "app_queue: Frequent segfaults in function can_ring_entry()" into 11

9 years agochan_sip: Don't verify table if rtupdate=no 32/2632/2
Jaco Kroon [Sun, 17 Apr 2016 20:37:53 +0000 (22:37 +0200)] 
chan_sip: Don't verify table if rtupdate=no

If rtupdate=no do not verify sipregs/peers table has updatable fields.

ASTERISK-25934 #close

Change-Id: Iaa2c53037b93daccc7e7333c40d61861847b856d

9 years agoapp_queue: Frequent segfaults in function can_ring_entry() 34/2634/1
ibercom [Mon, 18 Apr 2016 09:53:14 +0000 (11:53 +0200)] 
app_queue: Frequent segfaults in function can_ring_entry()

ASTERISK-25888 #close

Change-Id: I007a2f2dd99823e04fb5be3ff01f02b0a2956117

9 years agoapp_voicemail/IMAP: function 'save_to_folder' creates wrong folder 17/2617/1
Alexei Gradinari [Thu, 7 Apr 2016 17:02:19 +0000 (13:02 -0400)] 
app_voicemail/IMAP: function 'save_to_folder' creates wrong folder

If try to move message to Cust1 (number 5)
the function 'save_to_folder' tries to create Greeting folder instead of Cust1.

This patch fixed it by setting GREETINGS_FOLDER = -1

ASTERISK-24927 #close

Change-Id: I03d1a761894bcc2d130ec9b003bbcddc28e25c51

9 years agoapp_voicemail: Fix test_voicemail_notify_endl test. 75/2575/1
Joshua Colp [Tue, 12 Apr 2016 14:10:45 +0000 (11:10 -0300)] 
app_voicemail: Fix test_voicemail_notify_endl test.

The test_voicemail_notify_endl test checks the end-of-line
characters of an email message to confirm that they are consistent.
The test wrongfully assumed that reading from the email message
into a buffer will always result in more than 1 character being
read. This is incorrect. If only 1 character was read the test
would go outside of the buffer and access other memory causing
a crash.

The test now checks to ensure that 2 or more characters are read
in ensuring the test stays within the buffer.

ASTERISK-25874 #close

Change-Id: Ic2c89cea6e90f2c0bc2d8138306ebbffd4f8b710

9 years agoMerge "chan_local: Fix hangupcauses not getting set on Local channels" into 11
zuul [Mon, 11 Apr 2016 23:18:15 +0000 (18:18 -0500)] 
Merge "chan_local: Fix hangupcauses not getting set on Local channels" into 11

9 years agochan_local: Fix hangupcauses not getting set on Local channels 68/2568/2
Jaco Kroon [Mon, 11 Apr 2016 19:02:36 +0000 (21:02 +0200)] 
chan_local: Fix hangupcauses not getting set on Local channels

ASTERISK-25912 #close

Change-Id: I9ec0d40bd0e8ff16ba9c3cfc4c1b52cc575f421b

9 years agoapp_voicemail/IMAP: IMAP access FATAL error: Out of memory 64/2564/1
Alexei Gradinari [Thu, 7 Apr 2016 16:37:43 +0000 (12:37 -0400)] 
app_voicemail/IMAP: IMAP access FATAL error: Out of memory

Sometimes uw-imap function 'mail_fetchbody' returns huge len
which then pass to uw-imap function 'rfc822_base64'.
uw-imap tries to allocate huge memory and abort() on fail.

This patch check the len.
If the len more than max size (128 Mbytes) log error.
This patch also set variables len, newlen to avoid uninizialezed len.
This patch also check pointer returned by rfc822_base64.

ASTERISK-25899 #close

Change-Id: I4a0e7d655f11abef6a5224e2169df6d5c1f1caca

9 years agoMerge "core/logging: Fix broken syslog levels on older glibc." into 11
zuul [Fri, 25 Mar 2016 18:38:40 +0000 (13:38 -0500)] 
Merge "core/logging: Fix broken syslog levels on older glibc." into 11

9 years agomusiconhold: Only warn if music class is not found in memory and database. 55/2455/1
Walter Doekes [Thu, 24 Mar 2016 12:36:39 +0000 (13:36 +0100)] 
musiconhold: Only warn if music class is not found in memory and database.

The log message when a MusicOnHold music class was not found was changed
from debug level to WARNING level in Asterisk 11.19 and 13.5.  For those
using realtime musiconhold, this message is wrong because it warns
before checking the database.

This changeset delays the warning until after the database has been
checked.

Reported-by: Conrad de Wet
ASTERISK-25444 #close

Change-Id: I6cfb2db2f9cfbd2bb3d30566ecae361c4abf6dbf

9 years agocore/logging: Fix broken syslog levels on older glibc. 51/2451/3
Walter Doekes [Thu, 24 Mar 2016 10:38:16 +0000 (11:38 +0100)] 
core/logging: Fix broken syslog levels on older glibc.

The fix to ASTERISK-25407 introduced the usage of LOG_MAKEPRI. However
this macro is broken in older glibc (< 2.17); it would left-shift the
facility a second time, causing the resultant priority to become
invalid.

The syslog manpage mentions nothing about LOG_MAKEPRI and suggests this:

    The priority argument is formed by ORing the facility and the level
    values [...].

ASTERISK-25510 #close
Reported by: Michael Newton

Change-Id: Ia89debe7fac5ad090c7ef595c0707f31bb1e3d03

9 years agochan_sip.c: Space after port causes unnecessary resolution attempt 48/2448/1
Francesco Castellano [Fri, 20 Nov 2015 14:02:48 +0000 (15:02 +0100)] 
chan_sip.c: Space after port causes unnecessary resolution attempt

check_via() already skips leading blanks where the sent-by address (with the
optional port) should be placed.

Since RFC 3261 allows for blanks between the port ant the Via parameters:
> https://tools.ietf.org/html/rfc3261#section-20.42
(actually it allows a lot of blanks more ;-)). I just switched from
ast_skip_blanks() to ast_strip() on the local copy of the string.

ASTERISK-21301 #close

Change-Id: Ie5b8fe5a07067b7c0dc9bcdd1707e99b23b02b06

9 years agoconfig: fix flags in uint option handler 44/2444/1
Gianluca Merlo [Sat, 19 Mar 2016 12:34:26 +0000 (13:34 +0100)] 
config: fix flags in uint option handler

The configuration unsigned integer option handler sets flags for the
parser as if the option should be a signed integer (PARSE_INT32),
leading to errors on "out of range" values. Fix flags (PARSE_UINT32).

ASTERISK-25612 #close

Change-Id: I96b539336275e0e72a8e8033487d2c3344debd3e

9 years agofunc_aes: fix misuse of strlen on binary data 38/2438/1
Gianluca Merlo [Sat, 19 Mar 2016 01:32:51 +0000 (02:32 +0100)] 
func_aes: fix misuse of strlen on binary data

The encryption code for AES_ENCRYPT evaluates the length of the data to
be encoded in base64 using strlen. The data is binary, thus the length
of it can be underestimated at the first NULL character.
Reuse the write pointer offset to evaluate it, instead.

ASTERISK-25857 #close

Change-Id: If686b5d570473eb926693c73461177b35b13b186

9 years agoMerge "chan_sip.c: Simplify sip_pvt destructor call levels." into 11
zuul [Wed, 16 Mar 2016 17:14:20 +0000 (12:14 -0500)] 
Merge "chan_sip.c: Simplify sip_pvt destructor call levels." into 11

9 years agochan_sip.c: Simplify sip_pvt destructor call levels. 88/2388/1
Richard Mudgett [Tue, 8 Mar 2016 00:56:05 +0000 (18:56 -0600)] 
chan_sip.c: Simplify sip_pvt destructor call levels.

Remove destructor calling destroy_it calling really_destroy_it
for no benefit.  Just make the destructor the really_destroy_it
function.

Change-Id: Idea0d47b27dd74f2488db75bcc7f353d8fdc614a

9 years agochan_sip.c: Made sip_reinvite_retry() call sip_pvt_lock_full(). 86/2386/1
Richard Mudgett [Sat, 5 Mar 2016 00:25:21 +0000 (18:25 -0600)] 
chan_sip.c: Made sip_reinvite_retry() call sip_pvt_lock_full().

Change-Id: I90f04208a089f95488a2460185a8dbc3f6acca12

9 years agoapp_chanspy: Fix occasional deadlock with ChanSpy and Local channels. 74/2374/3
Walter Doekes [Fri, 11 Mar 2016 21:57:30 +0000 (22:57 +0100)] 
app_chanspy: Fix occasional deadlock with ChanSpy and Local channels.

Channel masquerading had a conflict with autochannel locking.

When locking autochannel->channel, the channel is fetched from the
autochannel and then locked. During the fetch, the autochannel -- which
has no locks itself -- can be modified by someone who owns the channel
lock. That means that the value of autochan->channel cannot be trusted
until you hold the lock.

In practice, this caused problems with Local channels getting
masqueraded away while the ChanSpy attempted to get info from that
channel. The old channel which was about to get removed got locked, but
the new (replaced) channel got unlocked (no-op). Because the replaced
channel was now locked (and would never get unlocked), it couldn't get
removed from the channel list in a timely manner, and would now cause
deadlocks when iterating over the channel list.

This change checks the autochannel after locking the channel for changes
to the autochannel. If the channel had been changed, the lock is
reobtained on the new channel.

In theory it seems possible that after this fix, the lock attempt on the
old (wrong) channel can be on an already destroyed lock, maybe causing
a crash. But that hasn't been observed in the wild and is harder induce
than the current deadlock.

Thanks go to Filip Frank for suggesting a fix similar to this and
especially to IRC user hexanol for pointing out why this deadlock was
possible and testing this fix. And to Richard for catching my rookie
while loop mistake ;)

ASTERISK-25321 #close

Change-Id: I293ae0014e531cd0e675c3f02d1d118a98683def

9 years agoMerge "chan_sip.c: Suppress T.38 SDP c= line if addr is the same." into 11
zuul [Thu, 25 Feb 2016 00:40:16 +0000 (18:40 -0600)] 
Merge "chan_sip.c: Suppress T.38 SDP c= line if addr is the same." into 11

9 years agochan_sip.c: Suppress T.38 SDP c= line if addr is the same. 86/2286/1
Richard Mudgett [Tue, 23 Feb 2016 20:57:42 +0000 (14:57 -0600)] 
chan_sip.c: Suppress T.38 SDP c= line if addr is the same.

Use the correct comparison function since we only care if the address
without the port is the same.

Change-Id: Ibf6c485f843a1be6dee58a47b33d81a7a8cbe3b0

9 years agores_config_sqlite3: Fix crashes when reading peers from sqlite3 tables 84/2284/1
Christof Lauber [Tue, 16 Feb 2016 14:14:15 +0000 (15:14 +0100)] 
res_config_sqlite3: Fix crashes when reading peers from sqlite3 tables

Introduced realloaction of ast_str buf in sqlite3_escape functions in case
the returned buffer from threadstorage was actually too small.

Change-Id: I3c5eb43aaade93ee457943daddc651781954c445

9 years agoMerge "app_queue: fix Calculate talktime when is first call answered" into 11
Joshua Colp [Thu, 18 Feb 2016 19:38:22 +0000 (13:38 -0600)] 
Merge "app_queue: fix Calculate talktime when is first call answered" into 11

9 years agoapp_queue: fix Calculate talktime when is first call answered 69/2269/1
Rodrigo Ramírez Norambuena [Wed, 17 Feb 2016 05:37:43 +0000 (02:37 -0300)] 
app_queue: fix Calculate talktime when is first call answered

Fix calculate of average time for talktime is wrong when is completed the
first call beacuse the time for talked would be that call.

ASTERISK-25800 #close

Change-Id: I94f79028935913cd9174b090b52bb300b91b9492

9 years agocel.c: Fix mismatch in ast_cel_track_event() return type. 65/2265/1
Richard Mudgett [Wed, 17 Feb 2016 19:30:06 +0000 (13:30 -0600)] 
cel.c: Fix mismatch in ast_cel_track_event() return type.

The return type of ast_cel_track_event() is not large enough to return all
64 potential bits of the event enable mask.  Fortunately, the defined CEL
events do not really need all 64 bits and the return value is only used to
determine if the requested CEL event is enabled.

* Made the ast_cel_track_event() return 0 or 1 only so the return value
can fit inside an int type instead of zero or a truncated 64 bit non-zero
value.

Change-Id: I783d932320db11a95c7bf7636a72b6fe2566904c

9 years agomain/asterisk.c: Reverse #if statement in listener() to fix code folding. 44/2244/1
Corey Farrell [Sat, 21 Feb 2015 02:51:35 +0000 (02:51 +0000)] 
main/asterisk.c: Reverse #if statement in listener() to fix code folding.

listener() opens the same code block in two places (#if and #else).  This
confuses some folding editors causing it to think that an extra code block
was opened.  Folding in 'geany' causes all code after listener() to be
folded as if it were part of that procedure.

ASTERISK-24813 #close

Change-Id: I4b8c766e6c91e327dd445e8c18f8a6f268acd961

9 years agofunc_iconv: Ensure output strings are properly terminated. 38/2238/1
Sean Bright [Thu, 11 Feb 2016 17:21:42 +0000 (12:21 -0500)] 
func_iconv: Ensure output strings are properly terminated.

ASTERISK-25272 #close
Reported by: Etienne Lessard
patches:
 AST-25272.patch submitted by Etienne Lessard (license #6394)

Change-Id: Id75ad202300960a1e91afe15e319d992936ecc17

9 years agoMerge "Build: Fix menuselect USAN conflicts" into 11
zuul [Wed, 10 Feb 2016 20:32:07 +0000 (14:32 -0600)] 
Merge "Build: Fix menuselect USAN conflicts" into 11

9 years agoBuild: Added testing compiler to support the system sanitizes 34/2234/1
Badalyan Vyacheslav [Wed, 10 Feb 2016 05:40:32 +0000 (05:40 +0000)] 
Build: Added testing compiler to support the system sanitizes

In older versions of the compiler was not sanitizes.
Compilers other than GCC can not support the Usan and TSAN
or have other options for *FLAGS.

ASTERISK-25767 #close
Reported by: Badalyan Vyacheslav
Tested by: Badalyan Vyacheslav

Change-Id: Iefce6608221fa87884b82ae3cb5649b7b1804916

9 years agoBuild: Fix menuselect USAN conflicts 29/2229/2
Badalyan Vyacheslav [Wed, 10 Feb 2016 02:57:38 +0000 (02:57 +0000)] 
Build: Fix menuselect USAN conflicts

USAN can be used together with other sanitizers.

Reported by: Badalyan Vyacheslav
Tested by: Badalyan Vyacheslav

Change-Id: I3bffa350d70965c3026651dba3a12414d0aaa45f

9 years agoSimplify and fix conditional in FD_SET. 20/2220/1
Corey Farrell [Tue, 9 Feb 2016 20:21:05 +0000 (15:21 -0500)] 
Simplify and fix conditional in FD_SET.

FD_SET contains a conditional statement to protect against buffer
overruns.  The statement was overly complicated and prevented use
of the last array element of ast_fdset.  We now just verify the fd
is less than ast_FDMAX.

Change-Id: I41895c0b497b052aef5bf49d75c817c48b326f40

9 years agochan_misdn: Fix a few issues causing compile errors 10/2210/2
George Joseph [Fri, 5 Feb 2016 16:29:00 +0000 (09:29 -0700)] 
chan_misdn: Fix a few issues causing compile errors

Change-Id: I54b48c24d7ca88ed80496fdfd142d08772a7ab98

9 years agoMerge topic 'ASTERISK-20987' into 11
Joshua Colp [Fri, 5 Feb 2016 17:49:04 +0000 (11:49 -0600)] 
Merge topic 'ASTERISK-20987' into 11

* changes:
  app_confbridge.c: Update CONFBRIDGE and CONFBRIDGE_INFO documentation.
  app_confbridge: Make non-admin users join a muted conference muted.

9 years agoCheck for OpenSSL defines before trying to use them. 03/2203/1
Mark Michelson [Thu, 4 Feb 2016 22:17:55 +0000 (16:17 -0600)] 
Check for OpenSSL defines before trying to use them.

The SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 defines did not exist prior
to OpenSSL version 1.0.1. A recent commit attempts to, by default, set
these options, which can cause problems on systems with older OpenSSL
installations.

This commit adds a configure script check for those defines and will not
attempt to make use of those if they do not exist. We will print a
warning urging the user to upgrade their OpenSSL installation if those
defines are not present.

Change-Id: I6a2eb9a43fd0738b404d8f6f2cf4b5c22d9d752d

9 years agoMerge "res_xmpp: Does not connect in component mode" into 11
Joshua Colp [Thu, 4 Feb 2016 18:26:41 +0000 (12:26 -0600)] 
Merge "res_xmpp: Does not connect in component mode" into 11

9 years agoMerge "AST-2016-003 udptl.c: Fix uninitialized values." into 11
Kevin Harwell [Wed, 3 Feb 2016 21:19:01 +0000 (15:19 -0600)] 
Merge "AST-2016-003 udptl.c: Fix uninitialized values." into 11

9 years agoMerge "AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow." into 11
Kevin Harwell [Wed, 3 Feb 2016 21:16:29 +0000 (15:16 -0600)] 
Merge "AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow." into 11

9 years agoAST-2016-001 http: Provide greater control of TLS and set modern defaults. 60/2160/3
Joshua Colp [Wed, 3 Feb 2016 18:02:01 +0000 (14:02 -0400)] 
AST-2016-001 http: Provide greater control of TLS and set modern defaults.

This change exposes the configuration of various aspects of the TLS
support and sets the default to the modern standards.

The TLS cipher is now set to the best values according to the
Mozilla OpSec team, different TLS versions can now be disabled, and
the cipher order can be forced to be that of the server instead of
the client.

ASTERISK-24972 #close

Change-Id: I7485bc48585979a93a131b01d435e54e6e7d5b97

9 years agoAST-2016-003 udptl.c: Fix uninitialized values. 77/2177/2
Richard Mudgett [Mon, 7 Dec 2015 18:46:53 +0000 (12:46 -0600)] 
AST-2016-003 udptl.c: Fix uninitialized values.

Sending UDPTL packets to Asterisk with the right amount of missing
sequence numbers and enough redundant 0-length IFP packets, can make
Asterisk crash.

ASTERISK-25603 #close
Reported by: Walter Doekes

ASTERISK-25742 #close
Reported by: Torrey Searle

Change-Id: I97df8375041be986f3f266ac1946a538023a5255

9 years agoAST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow. 69/2169/2
Richard Mudgett [Mon, 28 Sep 2015 22:07:42 +0000 (17:07 -0500)] 
AST-2016-002 chan_sip.c: Fix retransmission timeout integer overflow.

Setting the sip.conf timert1 value to a value higher than 1245 can cause
an integer overflow and result in large retransmit timeout times.  These
large timeout times hold system file descriptors hostage and can cause the
system to run out of file descriptors.

NOTE: The default sip.conf timert1 value is 500 which does not expose the
vulnerability.

* The overflow is now detected and the previous timeout time is
calculated.

ASTERISK-25397 #close
Reported by: Alexander Traud

Change-Id: Ia7231f2f415af1cbf90b923e001b9219cff46290

9 years agores_xmpp: Does not connect in component mode 41/2141/2
Karsten Wemheuer [Tue, 2 Feb 2016 10:05:15 +0000 (11:05 +0100)] 
res_xmpp: Does not connect in component mode

The module res_xmpp does not accept usernames in the form used in component
mode (XEP-0114). In component mode there is no @something in the name.
In component mode the connection is now not dropped anymore.

If the xmpp server sends out a "stream" tag before handshake is finished,
the connection gets dropped in res_xmpp. Now this tag will be ignored and
the connection will be established.

After connecting there will be an exchange of presence states. This does
not work as expected in component mode. The responsible function
"xmpp_pak_presence" is left before the states get sent out. Sending
presence states in component mode is now moved to the top of the function.

ASTERISK-25735 #close

Change-Id: I70e036f931c3124ebb2ad1e56f93ed35cfdd9d5c

9 years agochan_sip.c: AMI & CLI notify methods get different values of asterisk's own ip. 28/2128/2
StefanEng86 [Fri, 29 Jan 2016 13:39:06 +0000 (14:39 +0100)] 
chan_sip.c: AMI & CLI notify methods get different values of asterisk's own ip.

When I ask asterisk to send a SIP NOTIFY message to a sip peer using either a)
AMI action: SIPnotify or b) cli command: sip notify <cmd> <peer>, I expect
asterisk to include the same value for its own ip in both cases a) and b),
but it seems a) produces a contact header like Contact:
<sip:asterisk@192.168.1.227:8060> whereas b) produces a contact header like
<sip:asterisk@127.0.0.1:8060>. 0.0.0.0:8060 is my udpbindaddr in sip.conf

My guess is that manager_sipnotify should call
ast_sip_ouraddrfor(&p->sa, &p->ourip, p) the same way sip_cli_notify does,
because after applying this patch, both cases a) and b) produce
the contact header that I expect: <sip:asterisk@192.168.1.227:8060>

Reported by: Stefan Engström
Tested by: Stefan Engström

Change-Id: I86af5e209db64aab82c25417de6c768fb645f476

9 years agobuild_system: Prevent goals needing makeopts from running when it's missing 00/2100/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

9 years agoapp_confbridge.c: Update CONFBRIDGE and CONFBRIDGE_INFO documentation. 06/2106/1
Richard Mudgett [Tue, 26 Jan 2016 23:59:28 +0000 (17:59 -0600)] 
app_confbridge.c: Update CONFBRIDGE and CONFBRIDGE_INFO documentation.

Change-Id: Ic1f9e22ba1f2ff3b3f5cb017c5ddcd9bd48eccc7

9 years agoapp_confbridge: Make non-admin users join a muted conference muted. 05/2105/1
Richard Mudgett [Mon, 25 Jan 2016 21:48:04 +0000 (15:48 -0600)] 
app_confbridge: Make non-admin users join a muted conference muted.

ASTERISK-20987 #close
Reported by: hristo

Change-Id: Ic61a2b524ab3a4cfadf227fc6b3506527bc03f38

9 years agosounds/Makefile: Incremented core and extra sounds versions to 1.5 93/2093/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

9 years agochan_sip: Fix buffer overrun in sip_sipredirect. 80/2080/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

9 years agologger.c: Fix buffer overrun found by address sanitizer. 69/2069/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

9 years agomain/asterisk.c: ast_el_read_char 59/2059/1
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

9 years agotaskprocessor.c: Fix endless loop in CLI "core show taskprocessor" 33/2033/1
Richard Mudgett [Mon, 18 Jan 2016 22:38:12 +0000 (16:38 -0600)] 
taskprocessor.c: Fix endless loop in CLI "core show taskprocessor"

Revert 48dd99d2b4d6938b528f9f6aca98d36b60c5513b which caused an infinite
loop only in v11.

ASTERISK-25701 #close
Reported by: ibercom

Change-Id: I0d9103f4dc03fa31bb8d5e7a7a73b467bbac5349

9 years agomain/config: Clean config maps on shutdown. 26/2026/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

9 years agoastmm.c: Add more stats to CLI "memory show" commands. 21/2021/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

9 years agoapp: Queue hangup if channel is hung up during sub or macro execution. 97/1997/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

9 years agores_musiconhold: Prevent multiple simultaneous reloads. 00/2000/3
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

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

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

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