]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
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 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

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

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

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

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

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

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

9 years agopbx: Deadlock between contexts container and context_merge locks 60/1960/2
Kevin Harwell [Wed, 6 Jan 2016 19:03:28 +0000 (13:03 -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

9 years agodevicestate: Cleanup engine thread during graceful shutdown. 85/1985/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

9 years agomanager: Cleanup manager_channelvars during shutdown. 81/1981/1
Corey Farrell [Sun, 10 Jan 2016 19:40:11 +0000 (14:40 -0500)] 
manager: Cleanup manager_channelvars during shutdown.

ASTERISK-25680 #close

Change-Id: I3251d781cbc3f48a6a7e1b969ac4983f552b2446

9 years agores_calendar: Cleanup scheduler context at unload. 78/1978/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

9 years agopbx_dundi: Run cleanup on failed load. 70/1970/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

9 years agores_crypto: Perform cleanup at shutdown. 67/1967/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

9 years agoinclude/asterisk/time.h: Renamed global declaration:tv 35/1935/1
Diederik de Groot [Thu, 7 Jan 2016 09:21:03 +0000 (10:21 +0100)] 
include/asterisk/time.h: Renamed global declaration:tv

Renamed global declaration:tv to dummy_tv_var_for_types,
which would oltherwise cause 'shadow' warnings when 'tv'
was declared as a local variable elsewhere.

Added comment to note that dummy_tv_var_for_types is never
really exported and only used as a place holder.

ASTERISK-25627 #close

Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28

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

Change-Id: I1d9f4e532caa6dfabe034745dd16d06134efdce5

9 years agoccss.c: Replace space in taskprocessor name. 38/1938/1
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

9 years agotaskprocessor.c: Add CLI "core ping taskprocessor" missing unlock. 39/1939/1
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

9 years agoMerge "cel/cel_radius: Fix wrong pointer." into 11
Joshua Colp [Wed, 6 Jan 2016 18:02:52 +0000 (12:02 -0600)] 
Merge "cel/cel_radius: Fix wrong pointer." into 11

9 years agocel/cel_radius: Fix wrong pointer. 22/1922/1
Aaron An [Mon, 4 Jan 2016 10:26:55 +0000 (18:26 +0800)] 
cel/cel_radius: Fix wrong pointer.

The macro ADD_VENDOR_CODE defined in the cel_radius.c should use the parameter
y not the address of y.

I capture the radius UDP packet via tcpdump, and the AV pairs are not correct,
then i review the source code and compare it with cdr/cdr_radius.c. Fix it and
 it works.

ASTERISK-25647 #close
Reported by: Aaron An
Tested by: Aaron An

Change-Id: I72889bccd8fde120d47aa659edc0e7e6d4d019f0

9 years agoasterisk.h: Add ASTERISK_REGISTER_FILE macro 19/1919/1
George Joseph [Tue, 5 Jan 2016 20:52:16 +0000 (13:52 -0700)] 
asterisk.h: Add ASTERISK_REGISTER_FILE macro

The 11/13 branches and master use 2 different file version macros. 11/13
uses ASTERISK_FILE_VERSION but master uses ASTERISK_REGISTER_FILE. This
means a new file added to 11/13 can't just be cherry-picked to master
because the macro has to be changed.

To make cherry-picking possible, ASTERISK_REGISTER_FILE was added
to asterisk.h as a simple alias for ASTERISK_FILE_VERSION(__FILE__, NULL)
The "$Revision$" tag doesn't do anything since Asterisk moved to git so
just passing NULL as the verison works fine.  asterisk.h was also
annotated to deprecate ASTERISK_FILE_VERSION and suggest using
ASTERISK_REGISTER_FILE for all new files.

Change-Id: I5867ed898818d26ee49bb6e5c7d4c1a45d4789a5

9 years agoapp_queue: Add member flag "in_call" to prevent reading wrong lastcall time 81/1881/3
Martin Tomec [Tue, 29 Dec 2015 11:44:29 +0000 (12:44 +0100)] 
app_queue: Add member flag "in_call" to prevent reading wrong lastcall time

Member lastcall time is updated later than member status. There was chance to
check wrapuptime for available member with wrong (old) lastcall time.
New boolean flag "in_call" is set to true right before connecting call, and
reset to false after update of lastcall time. Members with "in_call" set to true
are treat as unavailable.

ASTERISK-19820 #close

Change-Id: I1923230cf9859ee51563a8ed420a0628b4d2e500

9 years agoapp_dial: Immediately exit dial if the caller is already hung up. 02/1902/1
Richard Mudgett [Fri, 4 Dec 2015 23:22:29 +0000 (17:22 -0600)] 
app_dial: Immediately exit dial if the caller is already hung up.

If a caller hangs up before dial is executed within an AGI then the AGI
has likely eaten all queued frames before executing the dial in DeadAGI
mode.  With the caller hung up and no pending frames from the caller's
read queue, dial would not know that the call has hung up until a called
channel answers.  It is rather annoying to whoever just answered the
non-existent call.

Dial should not continue execution in DeadAGI mode, hangup handlers, or
the h exten.

* Added a check early in dial to abort dialing if the caller has hungup.

ASTERISK-25307 #close
Reported by: David Cunningham

Change-Id: Icd1bc0764726ef8c809f76743ca008d0f102f418

9 years agoMerge "res_http_websocket.c: prevent avoidable disconnections caused by write errors...
Joshua Colp [Thu, 31 Dec 2015 00:43:28 +0000 (18:43 -0600)] 
Merge "res_http_websocket.c: prevent avoidable disconnections caused by write errors" into 11

9 years agotest_time: Provide a timeout when waiting. 75/1875/1
Joshua Colp [Mon, 28 Dec 2015 20:02:19 +0000 (16:02 -0400)] 
test_time: Provide a timeout when waiting.

The test_timezone_watch unit test is written to expect a
condition to be signaled when the inotify daemon thread runs.
There exists a small window where the test_timezone_watch
thread can signal the inotify daemon thread while it is not
reading on the underlying file descriptor. If this occurs
the test_timezone_watch thread will wait indefinitely for a
signal that will never arrive.

This change adds a timeout to the condition so it will return
regardless after a period of time.

Change-Id: Ifed981879df6de3d93acd3ee0a70f92546517390

9 years agores_http_websocket.c: prevent avoidable disconnections caused by write errors 63/1863/2
Dade Brandon [Fri, 25 Dec 2015 04:19:59 +0000 (20:19 -0800)] 
res_http_websocket.c: prevent avoidable disconnections caused by write errors

Updated ast_websocket_write to encode the entire frame in to one
write operation, to ensure that we don't end up with a situation
where the websocket header has been sent, while the body can not
be written.

Previous to August's patch in commit b9bd3c14, certain network
conditions could cause the header to be written, and then the
sub-sequent body to fail - which would cause the next successful
write to contain a new header, and a new body (resulting in
the peer receiving two headers - the second of which would be
read as part of the body for the first header).

This was patched to have both write operations individually fail
by closing the websocket.

In a case available to the submitter of this patch, the same
body which would consistently fail to write, would succeed
if written at the same time as the header.

This update merges the two operations in to one, adds debug messages
indicating the reason for a websocket connection being closed during
a write operation, and clarifies some variable names for code legibility.

Change-Id: I4db7a586af1c7a57184c31d3d55bf146f1a40598

9 years agochan_sip.c: fix websocket_write_timeout default value 68/1868/1
Dade Brandon [Fri, 25 Dec 2015 15:56:44 +0000 (07:56 -0800)] 
chan_sip.c: fix websocket_write_timeout default value

websocket_write_timeout was not being set to its default value
during sip config reload, which meant that prior to this commit,
1) the default value of 100 was not used, unless an invalid value
(or 1) was specified in sip.conf for websocket_write_timeout, and
2) if the websocket_write_timeout directive was removed from sip.conf
without a full restart of asterisk, then the previous value would
continue to be used indefinitely.

This essentially lead to a 0ms write timeout (the first write attempt
in ast_careful_fwrite must have succeeded) in websocket write requests
from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf.

Changes to websocket_write_timeout still only apply to new websocket
sessions, after the sip reload -- timeouts on existing sessions are
not adjusted during sip reload.

Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953

9 years agores_rtp_asterisk: rtp->ice check not wrapped in USE_PJPROJECT ifdef 50/1850/2
Kevin Harwell [Thu, 24 Dec 2015 16:10:53 +0000 (10:10 -0600)] 
res_rtp_asterisk: rtp->ice check not wrapped in USE_PJPROJECT ifdef

Change-Id: I19b49112e1b630bd04e859f14ccf96f8ebd6b151

9 years agoMerge "app_amd: Correct documentation to reflect functionality" into 11
Matt Jordan [Wed, 23 Dec 2015 02:22:15 +0000 (20:22 -0600)] 
Merge "app_amd: Correct documentation to reflect functionality" into 11

9 years agoapp_amd: Correct documentation to reflect functionality 44/1844/2
Dade Brandon [Mon, 21 Dec 2015 03:33:02 +0000 (19:33 -0800)] 
app_amd: Correct documentation to reflect functionality

Update documentation to reflect that maximum_number_of_words
has functionality inconsistent with the variable name (and inconsistent
with prior documentation.)

Update documentation for silence_threshold, which previously implied
that it was measuring time, rather than noise averages in the sample.

Update the comments in amd.conf.sample.

ASTERISK-25639 #close
Change-Id: I4b1451e5dc9cb3cb06d59b6ab872f5275ba79093

9 years agores_rtp_asterisk: Resolve further timing issues with DTLS negotiation 38/1838/2
Dade Brandon [Fri, 18 Dec 2015 01:05:00 +0000 (17:05 -0800)] 
res_rtp_asterisk: Resolve further timing issues with DTLS negotiation

Resolves an edge case dtls negotiation delay for certain networks which
somehow manage to drop the rtcp side's packet when these are both sent
ast_rtp_remote_address_set, causing it to have to time-out and restart
the handshake.

Move dtls pending bio flush in to it's own function, and call it from
ast_rtp_on_ice_complete, when we're rtp->ice, rather than when
ast_rtp_remote_address_set.

Keep the existing flush from the recent change to res_rtp_remote_address_set
if ice is not being used.

ASTERISK-25614 #close
Reported-by: XenCALL
Tested by: XenCALL

Change-Id: Ie2caedbdee1783159f375589b6fd3845c8577ba5

9 years agoapp_queue: update RT members when the 1st call joins a queue with no agents 43/1843/1
Carlos Oliva [Fri, 18 Dec 2015 15:54:41 +0000 (16:54 +0100)] 
app_queue: update RT members when the 1st call joins a queue with no agents

If a call enters on a queue and the members on that queue are updated in
realtime (ex: using mysql inserting a new agent) the queue members are
never refreshed and the call will stay in the queue until other event occurs.
This happens only if this is the first call of the queue and there is no
agents servicing.
This patch prevent this issue, ensuring realtime members are updated if
there is one call in the queue and no available agents

ASTERISK-25442 #close

Change-Id: If1e036d013a5c1d8b0bf60d71d48fe98694a8682

9 years agoMerge "AMI: Fixed OriginateResponse message" into 11
Matt Jordan [Wed, 16 Dec 2015 03:12:33 +0000 (21:12 -0600)] 
Merge "AMI: Fixed OriginateResponse message" into 11

9 years agoAMI: Fixed OriginateResponse message 16/1816/11
pchero [Wed, 9 Dec 2015 23:23:59 +0000 (00:23 +0100)] 
AMI: Fixed OriginateResponse message

When asterisk sends the OriginateResponse event message, it
doesn't send the correct information for origination to an
application.

ASTERISK-25624 #close

Change-Id: I8fb6bc533d7f812c66a24cc2b0354ddb09d0f640

9 years agores_rtp_asterisk.c: Fix DTLS negotiation delays. 13/1813/2
server-pandora [Mon, 14 Dec 2015 19:53:20 +0000 (11:53 -0800)] 
res_rtp_asterisk.c: Fix DTLS negotiation delays.

- Trigger pending DTLS packets to send out, once the RTP instance's remote
  address is set.
- Avoids locking the DTLS structure unnecessarily by only doing this if
  DTLS is passive.
- Add DTLS locks around the structurally sensitive calls in the SSL
  portion of __rtp_recvfrom, since dtls_srtp_check_pending does not lock
  inside of itself, and we're dealing with the SSL BIO in at least two
  threads.

WebRTC channels may receive a DTLS handshake before
ast_rtp_remote_address_set is called, which causes there to be a pending
response to send out.   Previous to 1ad827, this was handled by calling
dtls_srtp_check_pending on receipt of any RTP packet - a STUN or RTP
packet could trigger the pending handshake response.  Since that was
rightfully removed, whenever the DTLS handshake is received before the
remote address is set, we would have to wait until another SSL packet
arrives.

As of Chrome M47's optimizations to their handshake process, WebRTC
conversations between Chrome M47+ and Asterisk, where Asterisk is passive,
experience a 1 second delay without this patch, because the SSL handshake
is received before ICE negotation stores the remote_address, and the next
SSL packet isn't received until after a 1 second timeout in Chrome, which
causes a new handshake request.

ASTERISK-25614 #close

Change-Id: I547f1be7e302dbf71f6553dd8cbc0657b1d0b908

9 years agoMerge "main/utils: Don't emit an ERROR message if the read end of a pipe closes"...
Matt Jordan [Mon, 14 Dec 2015 12:44:58 +0000 (06:44 -0600)] 
Merge "main/utils: Don't emit an ERROR message if the read end of a pipe closes" into 11

9 years agomain/utils: Don't emit an ERROR message if the read end of a pipe closes 10/1810/3
Matt Jordan [Sun, 13 Dec 2015 19:13:55 +0000 (13:13 -0600)] 
main/utils: Don't emit an ERROR message if the read end of a pipe closes

An ERROR or WARNING message should generally indicate that something has gone
wrong in Asterisk. In the case of writing to a file descriptor, Asterisk is not
in control of when the far end closes its reading on a file descriptor. If the
far end does close the file descriptor in an unclean fashion, this isn't a bug
or error in Asterisk, particularly when the situation can be gracefully
handled in Asterisk.

Currently, when this happens, a user would see the following somewhat cryptic
ERROR message:

  "utils.c: write() returned error: Broken pipe"

There's a few problems with this:
(1) It doesn't provide any context, other than 'something broke a pipe'
(2) As noted, it isn't actually an error in Asterisk
(3) It can get rather spammy if the thing breaking the pipe occurs often, such
    as a FastAGI server
(4) Spammy ERROR messages make Asterisk appear to be having issues, or can even
    mask legitimate issues

This patch changes ast_carefulwrite to only log an ERROR if we actually had one
that was reasonably under our control. For debugging purposes, we still emit
a debug message if we detect that the far side has stopped reading.

Change-Id: Ia503bb1efcec685fa6f3017bedf98061f8e1b566

9 years agochan_sip: Add TCP/TLS keepalive to TCP/TLS server 99/1799/2
Jonathan Rose [Thu, 10 Dec 2015 17:44:03 +0000 (11:44 -0600)] 
chan_sip: Add TCP/TLS keepalive to TCP/TLS server

Adds the TCP Keep Alive option to TCP and TLS server sockets. Previously
this option was only being set on session sockets.
http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/
According to the link above, the SO_KEEPALIVE option is useful for knowing
when a TCP connected endpoint has severed communication without indicating
it or has become unreachable for some reason. Without this patch, keep
alive is not set on the socket listening for incoming TCP sessions and
in Komatsu's report this resulted in the thread listening for TCP becoming
stuck in a waiting state.

ASTERISK-25364 #close
Reported by: Hiroaki Komatsu

Change-Id: I7ed7bcfa982b367dc64b4b73fbd962da49b9af36

9 years agoapp_meetme: Set default value for audio_buffers. 93/1793/2
Corey Farrell [Mon, 7 Dec 2015 19:07:32 +0000 (14:07 -0500)] 
app_meetme: Set default value for audio_buffers.

The default value was never set for audio_buffers, causing bad
audio quality.  This ensures the default is always set.

ASTERISK-25569 #close

Change-Id: I2d2ee3e644120b0f9f6ea6ab9286d7d590942a44

9 years agochan_sip: Check sip_pvt pointer in ast_channel_get_t38_state(c) 91/1791/1
Filip Jenicek [Tue, 8 Dec 2015 07:57:22 +0000 (08:57 +0100)] 
chan_sip: Check sip_pvt pointer in ast_channel_get_t38_state(c)

Asterisk may crash when calling ast_channel_get_t38_state(c)
on a locked channel which is being hung up.

ASTERISK-25609 #close

Change-Id: Ifaa707c04b865a290ffab719bd2e5c48ff667c7b

9 years agoMerge "chan_sip.c: Start ICE negotiation when response is sent or received." into 11
Joshua Colp [Wed, 9 Dec 2015 14:54:09 +0000 (08:54 -0600)] 
Merge "chan_sip.c: Start ICE negotiation when response is sent or received." into 11

9 years agochan_sip.c: Start ICE negotiation when response is sent or received. 51/1751/3
Eugene Voityuk [Wed, 2 Dec 2015 18:42:15 +0000 (20:42 +0200)] 
chan_sip.c: Start ICE negotiation when response is sent or received.

The current logic for ICE negotiation starts it
when receiving an SDP with ICE candidates. This is
incorrect as ICE negotiation can only start when each
call party have at least one pair of local and remote
candidate. Starting ICE negotiation early would result
in negotiation failure and ultimately no audio.

This change makes it so ICE negotiation is only started
when a response with SDP is received or when a response
with SDP is sent.

ASTERISK-24146

Change-Id: I55a632bde9e9827871b09141d82747e08379a8ca

9 years agoMerge "translate: Avoid a warning message when doing FEC within Opus Codec." into 11
Joshua Colp [Tue, 8 Dec 2015 19:14:36 +0000 (13:14 -0600)] 
Merge "translate: Avoid a warning message when doing FEC within Opus Codec." into 11

9 years agocodec_resample: Increase buffer for Opus Codec with FEC. 84/1784/1
Alexander Traud [Tue, 8 Dec 2015 14:39:03 +0000 (15:39 +0100)] 
codec_resample: Increase buffer for Opus Codec with FEC.

ASTERISK-25599 #close

Change-Id: Idbd187f711b2ec63dda949ca0f79aa0c1a0a0b6e

9 years agotranslate: Avoid a warning message when doing FEC within Opus Codec. 79/1779/1
Alexander Traud [Tue, 8 Dec 2015 09:46:21 +0000 (10:46 +0100)] 
translate: Avoid a warning message when doing FEC within Opus Codec.

ASTERISK-25616 #close

Change-Id: Ibe729aaf2e6e25506cff247cec5149ec1e589319