]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
8 years agoMerge "chan_iax2: Fix use of uninited memory in try_transfer." into 11
zuul [Fri, 28 Oct 2016 03:23:03 +0000 (22:23 -0500)] 
Merge "chan_iax2: Fix use of uninited memory in try_transfer." into 11

8 years agoapp_voicemail: Clear voice mailbox in MailboxExists and MAILBOX_EXISTS. 86/4186/1
Joshua Colp [Wed, 26 Oct 2016 12:51:50 +0000 (12:51 +0000)] 
app_voicemail: Clear voice mailbox in MailboxExists and MAILBOX_EXISTS.

When executing the MailboxExists dialplan application and
MAILBOX_EXISTS dialplan function the passed in temporary voice
mailbox was not cleared, causing it to try to free garbage.

ASTERISK-26503 #close

Change-Id: Ie21ccfa1b80b9c59318e596f6b8e17da2b5a7cb3

8 years agochan_iax2: Fix use of uninited memory in try_transfer. 71/4171/2
Walter Doekes [Tue, 25 Oct 2016 09:09:59 +0000 (11:09 +0200)] 
chan_iax2: Fix use of uninited memory in try_transfer.

- if newip contained the right stack garbage, it would overwrite the
  correct IP
- memmove was unnecessary

Reported by: saltsa (on IRC)

Change-Id: I9375589f832b08cdff5b05ba975f3c62eef80619

8 years agoMerge "chan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia." into 11
zuul [Wed, 19 Oct 2016 15:08:04 +0000 (10:08 -0500)] 
Merge "chan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia." into 11

8 years agocli: Auto-complete File not Module for core set debug. 38/4138/1
Alexander Traud [Tue, 18 Oct 2016 08:01:47 +0000 (10:01 +0200)] 
cli: Auto-complete File not Module for core set debug.

Since Asterisk 1.8, the command "core set debug" on the command-line interface
asks not for a file (.c) but a module name. This change shows modules (.so) on
the auto-completion via a tabulator or the question mark. Now, when you
partially type a module name, TAB or ?, you get the correct candidiates.

ASTERISK-26480

Change-Id: I1213f1dd409bd4ff8de08ad80cb0c73cafb1bae0

8 years agoMerge "menuselect: invalid test for GTK2" into 11
zuul [Tue, 18 Oct 2016 03:20:18 +0000 (22:20 -0500)] 
Merge "menuselect: invalid test for GTK2" into 11

8 years agoMerge "app_queue: Added initialization for "context" parameter" into 11
zuul [Mon, 17 Oct 2016 20:45:45 +0000 (15:45 -0500)] 
Merge "app_queue: Added initialization for "context" parameter" into 11

8 years agomenuselect: invalid test for GTK2 23/4123/3
Tzafrir Cohen [Sun, 11 Sep 2016 15:13:00 +0000 (10:13 -0500)] 
menuselect: invalid test for GTK2

configuire.ac was only checking for the existence of pkg-config
and not the gtk2 package itself.  Now it calls AST_PKG_CONFIG_CHECK
for gtk+-2.0.

ASTERISK-26356 #close

Change-Id: I8079d515d6ea99f9ab320a7eaa71c2aaa101ccd5

8 years agoapp_queue: Added initialization for "context" parameter 27/4127/1
Leandro Dardini [Thu, 13 Oct 2016 19:09:18 +0000 (21:09 +0200)] 
app_queue: Added initialization for "context" parameter

When using Asterisk Realtime Architecture, empty fields are skipped and the
default values are used. If the "context" parameter in queue was set and then
cleared from the database, the old value remains in memory and it continues
to be used. This change initialize the "context" parameter with an empty value,
allowing clearing the parameter.

ASTERISK-26462 #close

Change-Id: I64be73d5044ce38dd02408bd0e53de965ef65905

8 years agochan_sip: Only send video on outgoing channel if incoming channel supports it 11/4111/1
Michael Kuron [Sat, 15 Oct 2016 09:58:05 +0000 (11:58 +0200)] 
chan_sip: Only send video on outgoing channel if incoming channel supports it

Previously, the settings videosupport=always and videosupport=yes behaved
identically and unconditionally caused a video offer to be sent in the SDP on
an outgoing call. This was a regression introduced with commit
5a1d90e1fbfc4b48927aad55311f3b38efbf1f54 in Asterisk 1.6.1.

This commit restores correct behavior: videosupport=always causes a video offer
to be sent unconditionally, while videosupport=yes will only offer video on an
outbound channel if the incoming channel it is bridged to also supports video.
That way, the device receiving the outgoing call can display the correct user
interface elements for audio or video and will not unnecessarily show a blank
video window on an audio-only call.

ASTERISK-17470 #close

Change-Id: I782f4409d436114dbc97061c3570c0cd24f7c3ae

8 years agoMerge "res_fax: Fix a tight race condition causing fax to crash in audio fallback...
zuul [Wed, 12 Oct 2016 13:15:25 +0000 (08:15 -0500)] 
Merge "res_fax: Fix a tight race condition causing fax to crash in audio fallback" into 11

8 years agores_fax: Fix a tight race condition causing fax to crash in audio fallback 01/4001/3
Torrey Searle [Thu, 29 Sep 2016 18:08:07 +0000 (20:08 +0200)] 
res_fax: Fix a tight race condition causing fax to crash in audio fallback

When T.38 gets rejected and G711 failback occurs there is a period of
time where neither AST_FAX_TECH_T38 nor AST_FAX_TECH_AUDIO is set,
leading to a crash.

Change-Id: Icc3f457b2292d48a9d7843dac0028347420cc982

8 years agochan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia. 69/4069/1
Alexander Traud [Tue, 11 Oct 2016 11:55:13 +0000 (13:55 +0200)] 
chan_sip: Support nat=auto_comedia or nat=force_rport,auto_comedia.

In the SIP channel driver chan_sip, auto_comedia was expected to be used in
tandem with auto_force_rport. Or stated differently: Only when auto_force_rport
was chosen (the default), auto_comedia worked. This change allows auto_comedia
to be set independently of the state of (auto_)force_rport. For example,
nat=force_rport,auto_comedia is useful for IPv4/IPv6 Dual Stack deployments
when IPv6 clients are behind a Firewall.

ASTERISK-26457 #close

Change-Id: Ib29d66c6dbb61648e371e01fc36c6978ddae5bc2

8 years agoMerge "res_rtp_asterisk: Fix infinite DTMF issue when switching to P2P bridge" into 11
zuul [Tue, 11 Oct 2016 11:48:01 +0000 (06:48 -0500)] 
Merge "res_rtp_asterisk: Fix infinite DTMF issue when switching to P2P bridge" into 11

8 years agores_rtp_asterisk: Fix infinite DTMF issue when switching to P2P bridge 99/3999/3
Torrey Searle [Thu, 29 Sep 2016 17:52:45 +0000 (19:52 +0200)] 
res_rtp_asterisk: Fix infinite DTMF issue when switching to P2P bridge

If a bridge switched to P2P when a DTMF was in progress it
was possible for the DTMF to continue being sent indefinitely.

Change-Id: I7e2a3efe0d59d4b214ed50cd0b5d0317e2d92e29

8 years agocel_odbc: Fix memory leak on module unload 44/4044/1
Badalyan Vyacheslav [Mon, 10 Oct 2016 02:53:07 +0000 (22:53 -0400)] 
cel_odbc: Fix memory leak on module unload

Change-Id: Ic7a1236eba2408090fdabb5f717b5fa455ead715

8 years agochan_sip: Honor support of Symmetric Response (rport) for SIP requests. 29/4029/1
Alexander Traud [Wed, 5 Oct 2016 09:42:30 +0000 (11:42 +0200)] 
chan_sip: Honor support of Symmetric Response (rport) for SIP requests.

In the SIP channel driver chan_sip, the default is "auto_force_rport". When no
NAT was detected, for example in case of IPv6, Asterisk uses the IP address
from the headers within the SIP-REGISTER for subsequent SIP signaling. When
the remote party specifies support for Symmetric Response (RFC 3581) via the
parameter "rport", Asterisk should not extract the port from the SIP headers
but reuse the port of the transport. This did not happen because of a typo.

ASTERISK-26438 #close

Change-Id: If6e7891848aaf96666dee5305695f7c6667cd5a6

8 years agochan_sip: Resolve externhost not to IPv6; instead go for IPv4. 69/3969/1
Alexander Traud [Fri, 23 Sep 2016 14:54:28 +0000 (16:54 +0200)] 
chan_sip: Resolve externhost not to IPv6; instead go for IPv4.

For the channel driver chan_sip, you specify externhost=example.com in sip.conf
when your Asterisk is behind a NAT and your IP address is assigned dynamically.
Or stated differently: You do not have a static IP address to use "externaddr"
directly. This NAT support is quite handy but just about IPv4. Previously,
Asterisk resolved "externhost" to any IP version. When the first DNS answer
resolved to an IPv6, Asterisk sent an IPv6 in SIP/SDP for origin (o=) and
connection (c=). This happened in outgoing SIP-REGISTER and while answering
SIP-INVITE. If the remote peer is IPv4-only, it might not handle o=/c= with an
IPv6. This change makes sure, no IPv6 is resolved anymore for "externhost".

ASTERISK-18232 #close
Reported by: Jacek Kowalski
Tested by: Alexander Traud
patches:
 changes.patch submitted by Alessandro Crespi

Change-Id: If68eedbeff65bd1c1d8a9ed921c02ba464b32dac

8 years agoMerge "cdr_mysql: fix UTC support" into 11
zuul [Thu, 22 Sep 2016 12:21:49 +0000 (07:21 -0500)] 
Merge "cdr_mysql: fix UTC support" into 11

8 years agoMerge "logger: Fix default console settings." into 11
zuul [Wed, 21 Sep 2016 16:31:56 +0000 (11:31 -0500)] 
Merge "logger: Fix default console settings." into 11

8 years agocdr_mysql: fix UTC support 50/3950/1
Tzafrir Cohen [Mon, 12 Sep 2016 12:37:30 +0000 (15:37 +0300)] 
cdr_mysql: fix UTC support

* Make 'cdrzone=UTC' work properly.
* Fix the documentation of cdr_mysql.conf: it's cdrzone and not timezone

ASTERISK-26359 #close

Change-Id: I2a6f67b71bbbe77cac31a34d0bbfb1d67c933778
(cherry picked from commit d3ddf4b0fdaf3e9562ede947c2367031434b3b5e)

8 years agologger: Fix default console settings. 30/3930/2
Corey Farrell [Tue, 20 Sep 2016 15:05:43 +0000 (11:05 -0400)] 
logger: Fix default console settings.

When logger.conf is missing or invalid we should be printing notices,
warnings and errors to the console.  The logmask was incorrectly
calculated.

Change-Id: Ibaa9465a8682854bc1a5e9ba07079bea1bfb6bb3

8 years agoasterisk.c: Non-root users also get the astcanary after core restart. 23/3923/2
Walter Doekes [Mon, 19 Sep 2016 19:21:23 +0000 (21:21 +0200)] 
asterisk.c: Non-root users also get the astcanary after core restart.

Without this change, a 'core restart' would kill the astcanary forever
if you're not running as root. Both with and without this patch, the
scheduling priority was still SCHED_RR after restart.

Additionally, the astcanary is now spawned if you start with high
priority and Asterisk doesn't get a chance to lower it. For example
through: `chrt -r 10 sudo -u asterisk asterisk -c`

Also reap killed astcanary processes on core restart.

ASTERISK-26352 #close

Change-Id: Iacb49f26491a0717084ad46ed96b0bea5f627a55

8 years agoMerge "asterisk.c: When astcanary dies on linux, reset priority on all threads."...
zuul [Mon, 19 Sep 2016 23:03:31 +0000 (18:03 -0500)] 
Merge "asterisk.c: When astcanary dies on linux, reset priority on all threads." into 11

8 years agoasterisk.c: When astcanary dies on linux, reset priority on all threads. 19/3919/2
Walter Doekes [Mon, 19 Sep 2016 19:26:56 +0000 (21:26 +0200)] 
asterisk.c: When astcanary dies on linux, reset priority on all threads.

Previously only the canary checking thread itself had its priority set
to SCHED_OTHER. Now all threads are traversed and adjusted.

ASTERISK-19867 #close
Reported by: Xavier Hienne

Change-Id: Ie0dd02a3ec42f66a78303e9c1aac28f7ed9aae39

8 years agoFix showing of swap details when sysinfo() is available 15/3915/1
Timo Teräs [Fri, 9 Sep 2016 11:35:43 +0000 (14:35 +0300)] 
Fix showing of swap details when sysinfo() is available

If sysinfo() is available, but not sysctl() or swapctl() the
printing code for swap buffer sizes is incorrectly omitted.
The above condition happens with musl c-library.

Fix #if rule to consider defined(HAVE_SYSINFO). And also
remove the redundant || defined(HAVE_SYSCTL) which was
incorrectly there to start with. Now swap information is
displayed only if an actual libc function to get it is
available.

This also fixes warnings previously seen with musl libc:

   [CC] asterisk.c -> asterisk.o
asterisk.c: In function 'handle_show_sysinfo':
asterisk.c:773:6: warning: variable 'totalswap' set but not used
 [-Wunused-but-set-variable]
  int totalswap = 0;
      ^~~~~~~~~
asterisk.c:770:11: warning: variable 'freeswap' set but not used
 [-Wunused-but-set-variable]
  uint64_t freeswap = 0;
           ^~~~~~~~

Change-Id: I1fb21dad8f27e416c60f138c6f2bff03fb626eca

8 years agoMerge "chan_sip: Fix session timeout on retransmit of non-UDP packets" into 11
zuul [Thu, 15 Sep 2016 00:42:24 +0000 (19:42 -0500)] 
Merge "chan_sip: Fix session timeout on retransmit of non-UDP packets" into 11

8 years agochan_sip: Fix session timeout on retransmit of non-UDP packets 87/3887/3
Steve Davies [Tue, 13 Sep 2016 10:34:47 +0000 (11:34 +0100)] 
chan_sip: Fix session timeout on retransmit of non-UDP packets

Change-Id I1cd33453c77c56c8e1394cd60a6f17bb61c1d957 Enable Session-Timers for
SIP over TCP (and TLS) also disables SIP retransmits in chan_sip for non-UDP
connections, allowing the TCP layer to handle the retransmits. Unfortunately,
this caused sessions to be terminated with a retransmit timeout becasue it
stopped at the point of the first retrans call.

This patch waits for the 64*T1 timer to expire instead.

ASTERISK-19968

Change-Id: I844f26801aada10bc94e9bebe6e151f0a8443204

8 years agoMerge "chan_sip: Allow target refresh (Contact update) on re-INVITE." into 11
zuul [Tue, 13 Sep 2016 14:59:15 +0000 (09:59 -0500)] 
Merge "chan_sip: Allow target refresh (Contact update) on re-INVITE." into 11

8 years agoapp_queue: Fix CLI "queue show" and AMI Queues action output truncation. 81/3881/1
Richard Mudgett [Mon, 12 Sep 2016 17:25:54 +0000 (12:25 -0500)] 
app_queue: Fix CLI "queue show" and AMI Queues action output truncation.

The output of CLI "queue show" and AMI Queues action is truncated and
"failed to extend from 240 to 327" messages are generated if the queue
member and interface names are lengthy.

* Increase the string buffer size from 240 to 512 in order to accommodate
for more information fields added to the output since v1.8.

ASTERISK-26360 #close
Reported by: Richard Mudgett

Change-Id: Id99c03cf5362453b80491a4b3b0434cb67aa966d

8 years agochan_sip: Allow target refresh (Contact update) on re-INVITE. 80/3880/1
Walter Doekes [Mon, 12 Sep 2016 08:28:17 +0000 (10:28 +0200)] 
chan_sip: Allow target refresh (Contact update) on re-INVITE.

Previously, the Contact was stored only on initial INVITE and on any
18X and 200. That meant that after re-INVITEs from *us* the Contact
could get updated, but after re-INVITEs from the *peer*, it did not.

This changeset fixes this inconsistency, properly allowing target
refreshes through re-INVITES (RFC3261, 12.2).

If your strictrtp setting allows it, this change allows you to switch
the source IP of a connected/calling device mid-call with a simple
re-INVITE from the new IP.

ASTERISK-26358 #close

Change-Id: Ibb8512054ab27c8c3d2514022568fde943bf2435

8 years agocontrib: Let safe_asterisk script continue without /dev/tty9. 70/3870/1
Walter Doekes [Fri, 9 Sep 2016 11:26:01 +0000 (13:26 +0200)] 
contrib: Let safe_asterisk script continue without /dev/tty9.

If you use the safe_asterisk script, it uses hardcoded defaults before
running configurable values from /etc/asterisk/startup.d. The hardcoded
default has TTY=9. Some containerized environments don't have such a
TTY, and safe_asterisk would stop.

The custom configuration from /etc/asterisk/startup.d/* isn't read until
after it stopped, so changing TTY in a custom config did not help.

This changeset changes safe_asterisk to continue if the TTY setting was
untouched and /dev/tty9 and /dev/vc/9 aren't found.

Change-Id: I2c7cdba549b77f418a0af4cb1227e8e6fe4148fc

8 years agochan_sip: Don't allocate new RTP instances on top of old ones.
Joshua Colp [Tue, 23 Aug 2016 11:31:05 +0000 (11:31 +0000)] 
chan_sip: Don't allocate new RTP instances on top of old ones.

In some scenarios dialog_initialize_rtp can be called multiple times on
the same dialog.  This can cause RTP instances to be leaked along with
multiple file descriptors for each instance.

This change makes it so the existing RTP instances are destroyed and
not overwritten, stopping the memory leak.

ASTERISK-26272 #close
patches:
  ASTERISK-26272-11.patch submitted by Corey Farrell (license 5909)

Change-Id: I3c1d94dea8594fe0702168cb979b898ae0f5fc5d

8 years agofollowme: initialize all config items on reload 81/3581/2
Tzafrir Cohen [Thu, 11 Aug 2016 17:10:44 +0000 (20:10 +0300)] 
followme: initialize all config items on reload

Some configuration directives were not initialized on reload, and hence
were not reset to default if they were removed from followme.conf.

ASTERISK-26288 #close

Change-Id: Ief829e16374ad1e0ecfd63e6ee4923b5a1d1c150

8 years agochan_sip: Don't refuse calls with "optional crypto"; fall back to RTP. 31/3831/1
Walter Doekes [Tue, 6 Sep 2016 08:04:30 +0000 (10:04 +0200)] 
chan_sip: Don't refuse calls with "optional crypto"; fall back to RTP.

Certain SNOM phones send so-called "optional crypto" in their SDP body.
Regular SRTP setup looks like this:

    m=audio 64620 RTP/SAVP 8 0 9 99 3 18 4 101
    a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:...

SNOM-style "optional crypto" looks like this:

    m=audio 61438 RTP/AVP 8 0 9 99 3 18 4 101
    a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:...

A crypto line is supplied, but the m-line does not have SAVP.

When res_srtp.so is *not* loaded, then chan_sip.so treats the optional
crypto as regular RTP, but when res_srtp.so *is* loaded, it refuses the
incoming call with the following message:

    WARNING: process_sdp: Failed to receive SDP offer/answer with
    required SRTP crypto attributes for audio

For platforms that want to start providing SRTP this presents a
compatibility problem.

This changeset lets chan_sip handle the SDP as if no crypto-line was
supplied: i.e. accept the call as regular RTP, just like it did before
res_srtp was loaded.

Now you'll get this informative warning instead:

    WARNING: Ignoring crypto attribute in SDP because RTP transport is
    insecure

ASTERISK-23989 #close
Reported by: Olle Johansson

Change-Id: I91a15ae05a0296e398d6b65f53bb11afde1d80e2

8 years agoapp_mp3: Use correct buffer size and the same sample rate as the channel 39/3739/2
Michael Kuron [Wed, 31 Aug 2016 17:23:09 +0000 (19:23 +0200)] 
app_mp3: Use correct buffer size and the same sample rate as the channel

Previously, the buffer used for MP3 streamed from HTTP servers had a size of
1 MB. For 8 kHz mono audio at 16 bit resolution, such a buffer covers about 1
minute. Only when the buffer is full does audio start to play.
For MP3 files streamed from a server, that is usually not a big deal as long as
the connection to the server is fast enough to supply that much data within a
second or two. For MP3 live streams however, it takes 1 minute to download 1
minute of audio, so without this change, app_mp3 wasn't really usable for MP3
live streams.
This commit changes the buffer size so that it covers 6 seconds of an MP3 file
streamed from a server and 0.5 seconds of an MP3 live stream. The latter is
identified by the use of a .m3u file extension.

app_mp3 so far only supported 8 kHz audio.
Now it always runs at the sample rate of the channel.

ASTERISK-26085 #close

Change-Id: Id1ee274733cd804a0edecf7450329b72f1235af0

8 years agoMerge "pbx.c: Prevent infinite recursion in manager_show_dialplan_helper." into 11
Joshua Colp [Mon, 29 Aug 2016 19:57:53 +0000 (14:57 -0500)] 
Merge "pbx.c: Prevent infinite recursion in manager_show_dialplan_helper." into 11

8 years agoMerge "app_queue: Ensure member is removed from pending when hanging up." into 11
zuul [Mon, 29 Aug 2016 18:16:50 +0000 (13:16 -0500)] 
Merge "app_queue: Ensure member is removed from pending when hanging up." into 11

8 years agoapp_macro: Consider '~~s~~' as a macro start extension. 58/3758/1
chrisderock [Wed, 17 Aug 2016 07:51:17 +0000 (09:51 +0200)] 
app_macro: Consider '~~s~~' as a macro start extension.

As described in issue ASTERISK-26282 the AEL parser creates macros with
extension '~~s~~'.  app_macro searches only for extension 's' so the
created extension cannot be found.  with this patch app_macro searches for
both extensions and performs the right extension.

ASTERISK-26282 #close

Change-Id: I939aa2a694148cc1054dd75ec0c47c47f47c90fb

8 years agopbx.c: Prevent infinite recursion in manager_show_dialplan_helper. 54/3754/1
Etienne Lessard [Mon, 29 Aug 2016 12:11:47 +0000 (08:11 -0400)] 
pbx.c: Prevent infinite recursion in manager_show_dialplan_helper.

Previously, if context A was including context B and context B was including
context A, i.e. if there was a circular dependency between contexts, then
calling manager_show_dialplan_helper could lead to an infinite recursion,
resulting in a crash.

This commit applies the same solution as the one implemented in the
show_dialplan_helper function. The manager_show_dialplan_helper and
show_dialplan_helper functions contain lots of code in common, but the former
was missing the "infinite recursion avoidance" code.

ASTERISK-26226 #close

Change-Id: I1aea85133c21787226f4f8442253a93000aa0897

8 years agoapp_queue: Ensure member is removed from pending when hanging up. 45/3745/1
Joshua Colp [Thu, 25 Aug 2016 12:06:41 +0000 (12:06 +0000)] 
app_queue: Ensure member is removed from pending when hanging up.

When dialing channels it is possible that they may not ever
leave the not in use state (Local channels in particular) by
the time we cancel them. If this occurs but we know they were
dialed we explicitly remove them from the pending members
container so that subsequent call attempts occur.

ASTERISK-26299 #close

Change-Id: I6ad0d17c36480c92cebf840626228ce3f7e4bd65

8 years agoMerge "channel: No hung-up on failing security requirements." into 11
zuul [Fri, 26 Aug 2016 23:21:34 +0000 (18:21 -0500)] 
Merge "channel: No hung-up on failing security requirements." into 11

8 years agochannel: No hung-up on failing security requirements. 28/3728/2
Alexander Traud [Fri, 26 Aug 2016 13:41:16 +0000 (15:41 +0200)] 
channel: No hung-up on failing security requirements.

In your Diaplan, if you specify
 same => n,Set(CHANNEL(secure_bridge_media)=1)
 same => n,Set(CHANNEL(secure_bridge_signaling)=1)
only the SIP channel driver chan_sip supports this. All other channels drivers
like res_pjsip fail. In case of failure, the original sRTP source code released
the whole channel, even if not hung-up, yet. This change does not release the
channel but instead hangs-up the channel.

ASTERISK-26306

Change-Id: I0489f0cb660fab6673b0db8af027d116e70a66db

8 years agores_fax: Fix deadlock in ast_channel_get_t38_state(). 05/3705/1
Richard Mudgett [Tue, 23 Aug 2016 16:02:35 +0000 (11:02 -0500)] 
res_fax: Fix deadlock in ast_channel_get_t38_state().

ast_channel_get_t38_state() calls ast_channel_queryoption() with
AST_OPTION_T38_STATE.  If the passed in channel is a local channel then a
deadlock can happen if a channel lock is held when called.

* Made ast_channel_get_t38_state() callers not hold a channel lock before
calling.

* Update ast_channel_get_t38_state() doxygen to note that no channel locks
can be held when calling the function.

ASTERISK-26203 #close
Reported by: Etienne Lessard

ASTERISK-24822 #close
Reported by: David Brillert

ASTERISK-22732 #close
Reported by: Richard Mudgett

Change-Id: I49fd76fa9af628b4198009b5c0b82c8b03681214

8 years agores_fax.c, res_fax_spandsp.c: Misc deadlock fixes. 04/3704/1
Richard Mudgett [Tue, 23 Aug 2016 20:57:58 +0000 (15:57 -0500)] 
res_fax.c, res_fax_spandsp.c: Misc deadlock fixes.

* Fixed locking inconsistency in fax_gateway_start() when calling the
gateway technology start_session callback.  The callback was called with
and without the channel lock held.  Calling the callback with the channel
lock held could deadlock in spandsp_fax_gateway_start() which calls
ast_channel_get_t38_state().

* Fixed deadlock potential in fax_detect_framehook() when calling
ast_channel_make_compatible().

ASTERISK-26203
Reported by: Etienne Lessard

ASTERISK-24822
Reported by: David Brillert

ASTERISK-22732
Reported by: Richard Mudgett

Change-Id: I5a7b8e9e7b198802df06dff0ea48d96bd6d7b912

8 years agores_fax.c: Fix deadlock in fax_gateway_indicate_t38(). 03/3703/1
Richard Mudgett [Mon, 22 Aug 2016 17:31:24 +0000 (12:31 -0500)] 
res_fax.c: Fix deadlock in fax_gateway_indicate_t38().

fax_gateway_indicate_t38() calls ast_indicate_data() which cannot be
called with any channel locks already held.  A deadlock can happen if the
function is operating on a local channel.

* Made fax_gateway_indicate_t38() unlock the channel before calling
ast_indicate_data() since fax_gateway_indicate_t38() is always called with
the channel locked.

* Made fax_gateway_indicate_t38() return void since nothing cared about
its return value.

ASTERISK-26203
Reported by: Etienne Lessard

ASTERISK-24822
Reported by: David Brillert

ASTERISK-22732
Reported by: Richard Mudgett

Change-Id: I701ff2d26c5fc23e0d5a48a3fd98759a9fd09407

8 years agores_fax.c: Add chan locked precondition comments. 02/3702/1
Richard Mudgett [Tue, 23 Aug 2016 16:16:04 +0000 (11:16 -0500)] 
res_fax.c: Add chan locked precondition comments.

Change-Id: Ic10ae434536bbf7fb7055d6ab36cc50b8748a4e7

8 years agoast_framehook_detach() must be called with the channel locked. 01/3701/1
Richard Mudgett [Tue, 23 Aug 2016 15:42:08 +0000 (10:42 -0500)] 
ast_framehook_detach() must be called with the channel locked.

The framehook container could become corrupted if the channel lock is not
held before calling.

Change-Id: If0a1c7ba0484ed3a191106a7516526b905952584

8 years agores_fax: Fix latent bug exposed by ASTERISK-24841 changes. 00/3700/1
Richard Mudgett [Fri, 17 Apr 2015 23:05:37 +0000 (18:05 -0500)] 
res_fax: Fix latent bug exposed by ASTERISK-24841 changes.

Three fax related tests started failing as a result of changes made for
ASTERISK-24841:
tests/fax/pjsip/gateway_t38_g711
tests/fax/sip/gateway_mix1
tests/fax/sip/gateway_mix3

Historically, ast_channel_make_compatible() did nothing if the channels
were already "compatible" even if they had a sub-optimal translation path
already setup.  With the changes from ASTERISK-24841 this is no longer
true in order to allow the best translation paths to always be picked.  In
res_fax.c:fax_gateway_framehook() code manually setup the channels to go
through slin and then called ast_channel_make_compatible().  With the
previous version of ast_channel_make_compatible() this was always a
no-operation.

* Remove call to ast_channel_make_compatible() in fax_gateway_framehook()
that now undoes what was just setup when the framehook is attached.

* Fixed locking around saving the channel formats in
fax_gateway_framehook() to ensure that the formats that are saved are
consistent.

* Fix copy pasta errors in fax_gateway_framehook() that confuses read and
write when dealing with saved channel formats.

ASTERISK-24841
Reported by: Matt Jordan

Backported from v13 revision 82bc0fd3ade77394e13062b6097732c224e77eaa
mainly to get the diff between v11 and v13 smaller but this also fixes
a potential deadlock when dealing with the chan and the peer together.

Change-Id: I6fda0877104a370af586a5e8cf9e161a484da78d

8 years agores_fax.c: Remove redundant locking. 99/3699/1
Richard Mudgett [Thu, 15 Jan 2015 17:35:05 +0000 (17:35 +0000)] 
res_fax.c: Remove redundant locking.

When FAX was developed, apparently the faxregistry.container used to be a
linked list that was converted to an ao2 container.  Some of the
replacement ao2 container operations still had explicit lock/unlocks
around them.

Two off nominal code paths in res_fax.c unlock the channel even though the
routine did not lock the channel and other code paths in the routine do
not unlock the channel.

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

Backported from v13 revision fa80d9658df8aff71a8975ab7d1fe477ea3f99b9.

Change-Id: I59a1b95a91dac8375e0db568ddb217bcd6d7d2fa

8 years agores_fax: Fix some curlies on the end of function definitions. 98/3698/1
Richard Mudgett [Thu, 15 Jan 2015 17:18:14 +0000 (17:18 +0000)] 
res_fax: Fix some curlies on the end of function definitions.

Backported from v13 revision 6c426e86bd470c3a2f3b73b3a070583c92c19af4.

Change-Id: Iaa561a17c88d4383971f4b4fc8cee24318e779c4

8 years agoMerge "Fix checks for allocation debugging." into 11
Joshua Colp [Wed, 24 Aug 2016 21:53:10 +0000 (16:53 -0500)] 
Merge "Fix checks for allocation debugging." into 11

8 years agoFix checks for allocation debugging. 93/3693/1
Corey Farrell [Fri, 19 Aug 2016 23:19:28 +0000 (19:19 -0400)] 
Fix checks for allocation debugging.

MALLOC_DEBUG should not be used to check if debugging is actually
enabled, __AST_DEBUG_MALLOC should be used instead.  MALLOC_DEBUG only
indicates that debugging is requested, __AST_DEBUG_MALLOC indicates it
is active.

Change-Id: I3ce9cdb6ec91b74ee1302941328462231be1ea53

8 years agoMerge "sip.conf: tlsclientmethod is using sslv23 as default." into 11
zuul [Fri, 19 Aug 2016 19:20:37 +0000 (14:20 -0500)] 
Merge "sip.conf: tlsclientmethod is using sslv23 as default." into 11

8 years agosip.conf: tlsclientmethod is using sslv23 as default. 38/3638/2
Alexander Traud [Thu, 18 Aug 2016 14:25:53 +0000 (16:25 +0200)] 
sip.conf: tlsclientmethod is using sslv23 as default.

When 'tlsclientmethod' is not specified in sip.conf, chan_sip uses the OpenSSL
SSLv23_method. This was documented incorrectly in the file sip.conf.sample.

SSLv23_method got its name in the 90s. Today, with OpenSSL 1.0.2, this method
enables (just) the secure TLSv1.0 and TLSv1.2. Or stated differently, that
function should have been called 'secure_method' or 'automatic_method' back in
the 90s.

Consequently please, specify 'tlsclientmethod=tlsv1' in your sip.conf only if
you face a server which has problems like not falling back to TLSv1.0
automatically.

ASTERISK-24425

Change-Id: I502ce6146b4504cadfd3973af8d6ec3994f54fa3

8 years agopbx.c: Crash in handle_hint_change due to uninitialized values 01/3601/2
Kevin Harwell [Wed, 17 Aug 2016 21:40:49 +0000 (16:40 -0500)] 
pbx.c: Crash in handle_hint_change due to uninitialized values

handle_hint_change calls extension_presence_state_helper, which returns the
presence state subtype and message when a valid state is available. If the
state is invalid then those values are not filled. If they have not been
properly initialized to NULL then when ast_free is later called on them
Asterisk crashes.

This patch initializes the subtype and message to NULL.

ASTERISK-25706 #close
patches:
  0008-handle_hint_change-initialize-presence_state.patch
   submitted by Tzafrir Cohen (license 5035)

Change-Id: I2eb08c68951b327c42df0798de60484c3a225a50

8 years agopbx.c: Additional fixes to ast_context_remove_extension_callerid2. 57/3557/1
Corey Farrell [Fri, 12 Aug 2016 04:30:27 +0000 (00:30 -0400)] 
pbx.c: Additional fixes to ast_context_remove_extension_callerid2.

Do not check registrar of the first extension head.  We should only check
the registrar when we match the priority.

Additionally fix a couple calls to strcmp which used the input callerid
instead of the clean version ex.cidmatch.

ASTERISK-26233

Change-Id: I17ea6881a18f40840ae9c1f5394aab1fbb3769f1

8 years agoRun mandatory cleanup when startup fails. 15/3515/1
Corey Farrell [Fri, 12 Aug 2016 03:11:23 +0000 (23:11 -0400)] 
Run mandatory cleanup when startup fails.

Errors during startup result in an exit.  These error branches should be
calling ast_run_atexit(0) to ensure mandatory cleanup is run.

ASTERISK-26267 #close

Change-Id: If226f2326ae2df7add20040696132214cf2bb680

9 years agoAdd missing checks during startup. 10/3410/1
Corey Farrell [Wed, 3 Aug 2016 20:38:21 +0000 (16:38 -0400)] 
Add missing checks during startup.

This ensures startup is canceled due to allocation failures from the
following initializations.
* channel.c: ast_channels_init
* format.c: ast_format_attr_init and ast_format_list_init

ASTERISK-26265 #close

Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611

9 years agoMerge "pbx.c: Fix handling of '-' in extension name and callerid" into 11
zuul [Mon, 1 Aug 2016 13:36:07 +0000 (08:36 -0500)] 
Merge "pbx.c: Fix handling of '-' in extension name and callerid" into 11

9 years agoMerge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 11
zuul [Fri, 29 Jul 2016 10:49:37 +0000 (05:49 -0500)] 
Merge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 11

9 years agopbx.c: Fix handling of '-' in extension name and callerid 53/3353/6
Corey Farrell [Tue, 26 Jul 2016 22:42:50 +0000 (18:42 -0400)] 
pbx.c: Fix handling of '-' in extension name and callerid

This adds a two strings to ast_exten.  name to go with exten and
cidmatch_display to go with cidmatch.  The new fields contain input used
to add the extension in the first place.  The existing fields now
contain stripped input that excludes insignificant spaces and dashes.
These stripped fields should always be used for comparisons.  The
unstripped fields should normally be used for display, but displaying
stripped values will not cause runtime errors.

Note the actual string is only stored twice if it contains dashes.  If
no dashes are found then both 'char *' fields point to the same memory.
So this change has a minimum effect on memory usage.

The existing functions ast_get_extension_name and
ast_get_extension_cidmatch return unstripped values as they did before
this change.  Other similar bugs likely still exist where unstripped
extensions are saved outside pbx.c then passed back in.

ASTERISK-26233 #close

Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f

9 years agopbx.c: Allow dangerous functions when adding a hint to dialplan. 68/3368/1
Richard Mudgett [Wed, 27 Jul 2016 22:17:53 +0000 (17:17 -0500)] 
pbx.c: Allow dangerous functions when adding a hint to dialplan.

We can allow dangerous functions when adding a hint since altering
dialplan is itself a privileged activity.  Otherwise, we could never
execute dangerous functions.

ASTERISK-25996 #close
Reported by: Andrew Nagy

Change-Id: I4929ff100ad1200a0198262d069a34f2296e77ba

9 years agodsp.c: Correct DTMF twist dsp.conf documentation. 35/3335/2
Richard Mudgett [Tue, 26 Jul 2016 02:18:21 +0000 (21:18 -0500)] 
dsp.c: Correct DTMF twist dsp.conf documentation.

Change-Id: Idf97e3a72f1edc5fca58f2fa7b20785922be0cae

9 years agodsp.c: Fix erroneous fax tone detection. 34/3334/1
Richard Mudgett [Fri, 22 Jul 2016 03:28:25 +0000 (22:28 -0500)] 
dsp.c: Fix erroneous fax tone detection.

The Goertzel calculations get less accurate the lower the signal level
being worked with becomes because there is less resolution remaining.
If it is too low we can erroneously detect a tone where none really
exists.  The searched for fax frequencies not only need to be so much
stronger than the background noise they must also be a minimum strength.

* Add needed minimum threshold test to tone_detect().

* Set TONE_THRESHOLD to allow low volume frequency spread detection.

ASTERISK-26237 #close
Reported by: Richard Mudgett

Change-Id: I84dbba7f7628fa13720add6a88eae3b129e066fc

9 years agoMerge "chan_sip: Enable Session-Timers for SIP over TCP (and TLS)." into 11
zuul [Fri, 22 Jul 2016 21:07:00 +0000 (16:07 -0500)] 
Merge "chan_sip: Enable Session-Timers for SIP over TCP (and TLS)." into 11

9 years agochan_sip: Enable Session-Timers for SIP over TCP (and TLS). 32/3232/2
Alexander Traud [Tue, 19 Jul 2016 11:30:39 +0000 (13:30 +0200)] 
chan_sip: Enable Session-Timers for SIP over TCP (and TLS).

Asterisk defaults to timers=accept/refresher=uas. In that scenario, only in that
scenario, Sessions-Timers (RFC 4028) had no effect via TCP. This change enables
Session-Timers for SIP over TCP (and for SIP over TLS).

However with longer international calls via TCP, the SIP channel might break,
because all hops on the Internet route must stay online (have not a single power
outage, for example). Therefore with Session-Timers enabled (which are enabled
at default), you might see dropped calls. Consequently even with this change,
you might be better-off going for session-timers=refuse in your sip.conf.

ASTERISK-19968 #close

Change-Id: I1cd33453c77c56c8e1394cd60a6f17bb61c1d957

9 years agochan_sip: Prevent deadlock when issuing "sip show channels" 73/3273/4
George Joseph [Thu, 21 Jul 2016 14:05:03 +0000 (08:05 -0600)] 
chan_sip: Prevent deadlock when issuing "sip show channels"

sip_show_channels locks the dialogs container first then locks each
sip_pvt so it can spit out the details.  The rest of sip dialog
processing locks the sip_pvt first then locks the dialogs container
if it needs to.  Both lock in the order they need but deadlocks can
result.  To fix, sip_show_channels and sip_show_channelstats have
been converted to use an iterator rather than ao2_callback.  This way
the container is locked only while getting the next entry and is
unlocked when the callback is called.

ASTERISK-23013 #close

Change-Id: Id9980419909e811f89484950ed46ef117b9eb990

9 years agoMerge "Add conditional support for noreturn functions." into 11
zuul [Thu, 21 Jul 2016 19:20:36 +0000 (14:20 -0500)] 
Merge "Add conditional support for noreturn functions." into 11

9 years agoMerge "Unit tests: Use AST_TEST_DEFINE in conditional code only." into 11
zuul [Wed, 20 Jul 2016 15:57:51 +0000 (10:57 -0500)] 
Merge "Unit tests: Use AST_TEST_DEFINE in conditional code only." into 11

9 years agoMerge "res_rtp_asterisk: Count a roll-over of the sequence number even on lost packet...
zuul [Wed, 20 Jul 2016 15:29:21 +0000 (10:29 -0500)] 
Merge "res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets." into 11

9 years agoAdd conditional support for noreturn functions. 56/3256/1
Corey Farrell [Wed, 20 Jul 2016 03:37:22 +0000 (23:37 -0400)] 
Add conditional support for noreturn functions.

This adds support for tagging functions with the noreturn attribute.
If DO_CRASH is enabled then ast_do_crash never returns.  If AST_DEVMODE
and DO_CRASH are enabled then failed assertions never return.  This can
resolve a large number of false positives with static analyzers.

ASTERISK-26220 #close

Change-Id: Icfb61e5fe54574eced4c3e88b317244f467ec753

9 years agoUnit tests: Use AST_TEST_DEFINE in conditional code only. 25/3225/1
Corey Farrell [Mon, 18 Jul 2016 23:36:02 +0000 (19:36 -0400)] 
Unit tests: Use AST_TEST_DEFINE in conditional code only.

If AST_TEST_DEFINE is not conditional to TEST_FRAMEWORK it produces dead
code.  This places all existing unit tests into a conditional block if
they weren't already.

ASTERISK-26211 #close

Change-Id: I8ef83ee11cbc991b07b7a37ecb41433e8c734686

9 years agores_rtp_asterisk: Count a roll-over of the sequence number even on lost packets. 22/3222/1
Alexander Traud [Mon, 18 Jul 2016 10:13:25 +0000 (12:13 +0200)] 
res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets.

With this change, the initial RTP sequence number is randomly chosen not between
0 and 65535 (0xffff) but 0 and 32767 (0x7fff). This assures, the roll-over
counter (ROC) synchronization is not lost for sRTP, when the very first RTP
packets get lost; see http://srtp.sourceforge.net/faq.html#Q6

ASTERISK-26207 #close

Change-Id: I9a527e3aa3ce8f3becc5131d7ba32b57b5845464

9 years agoMakefile: Suppress echoing of target 'config' again. 19/3219/1
Alexander Traud [Mon, 18 Jul 2016 09:35:33 +0000 (11:35 +0200)] 
Makefile: Suppress echoing of target 'config' again.

ASTERISK-26038 #close

Change-Id: I5746cf639f3fdc6332e8a97cf01f979e30bf403f

9 years agoMerge "app_queue: Only remove queue member from pending when state changes." into 11
zuul [Fri, 15 Jul 2016 17:26:54 +0000 (12:26 -0500)] 
Merge "app_queue: Only remove queue member from pending when state changes." into 11

9 years agoMerge "pbx: Fix leak of timezone for time based includes." into 11
zuul [Thu, 14 Jul 2016 17:05:22 +0000 (12:05 -0500)] 
Merge "pbx: Fix leak of timezone for time based includes." into 11

9 years agoMerge "BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf." into 11
zuul [Thu, 14 Jul 2016 15:48:55 +0000 (10:48 -0500)] 
Merge "BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf." into 11

9 years agoMerge "res_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS." into 11
zuul [Thu, 14 Jul 2016 14:55:09 +0000 (09:55 -0500)] 
Merge "res_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS." into 11

9 years agoapp_queue: Only remove queue member from pending when state changes. 04/3204/1
Joshua Colp [Thu, 14 Jul 2016 12:45:10 +0000 (09:45 -0300)] 
app_queue: Only remove queue member from pending when state changes.

It is possible for a not in use state change to occur multiple
times causing a queue member to be removed from the pending call
container prematurely.

The first not in use state change will remove the queue member
from the container. At this moment the member may be called and
placed in the pending container. After this another not in use
state change can be received which will remove it from the
container. Despite being called at this point the code will
incorrectly see that there are no pending calls to it.

This change only removes it from the pending container if the
state has actually changed.

ASTERISK-26133 #close
patches:
  app_queue.diff submitted by Richard Miller (license 5685)

Change-Id: Ie5a7f17a44f98e9159e9b85009ce3f8393aa78c0

9 years agopbx: Fix leak of timezone for time based includes. 01/3201/1
Corey Farrell [Thu, 14 Jul 2016 07:40:26 +0000 (03:40 -0400)] 
pbx: Fix leak of timezone for time based includes.

Create include_free to run ast_destroy_timing and ast_free, use that in
all places that freed an ast_include structure.  This fixes a couple of
paths that previously did not run ast_destroy_timing.

ASTERISK-26196 #close

Change-Id: I1671bd111bef0dc113e8bf8f77f89fcfc395d838

9 years agores_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS. 68/3068/4
Alexander Traud [Wed, 22 Jun 2016 12:29:26 +0000 (14:29 +0200)] 
res_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS.

Since July 2014, TLS based protocols (SIP over TLS, Secure WebSockets, HTTPS)
support PFS thanks to ASTERISK-23905. In July 2015, the same feature was added
for DTLS. The source code from main/tcptls.c should have been re-used to ease
security audits. Therefore, this change rolls back the change from July 2015 and
re-uses the code from July 2014. This has the additional benefits to work under
CentOS 7 and enabling not just ECDHE but DHE based cipher suites as well.

ASTERISK-25659 #close
Reported by: StefanEng86, urbaniak, pay123
Tested by: sarumjanuch, traud
patches:
res_rtp_asterisk.patch submitted by sarumjanuch
dtls_centos_step_1.patch submitted by traud
dtls_centos_step_2.patch submitted by traud

Change-Id: I537cadf4421f092a613146b230f2c0ee1be28d5c

9 years agoBuildSystem: Avoid obsolete warning with pthread.m4 on autoconf. 85/3185/1
Alexander Traud [Wed, 13 Jul 2016 13:57:08 +0000 (15:57 +0200)] 
BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf.

Updated the macro-set autoconf/ax_pthread.m4 to its latest upstream version.

ASTERISK-26046 #close

Change-Id: I11abc11d17acd2b6a8a5a5be8ae8e0949dab9cc7

9 years agoMerge "BuildSystem: Allow own CFLAGS on ./configure." into 11
zuul [Wed, 13 Jul 2016 11:13:29 +0000 (06:13 -0500)] 
Merge "BuildSystem: Allow own CFLAGS on ./configure." into 11

9 years agoMerge "BuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf." into 11
zuul [Tue, 12 Jul 2016 20:44:40 +0000 (15:44 -0500)] 
Merge "BuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf." into 11

9 years agoBuildSystem: Allow own CFLAGS on ./configure. 71/3171/1
Alexander Traud [Tue, 12 Jul 2016 08:50:22 +0000 (10:50 +0200)] 
BuildSystem: Allow own CFLAGS on ./configure.

Before this change, make failed with the error
Unknown value '' found in build_tools/menuselect-deps for NATIVE_ARCH
when CFLAGS were supplied to the configure script. This was introduced with
<https://reviewboard.asterisk.org/r/1852/> which disabled BUILD_NATIVE when
CFLAGS were supplied. Those who need different -march= values, please, go for
./configure
make menuselect.makeopts or make menuselect
./menuselect/menuselect --disable BUILD_NATIVE

ASTERISK-25289 #close

Change-Id: Ic6365d5a97bb9b3556858f06432a8d1cfa83eebc

9 years agoast_expr2: Fix off-nominal memory leak. 66/3166/1
Richard Mudgett [Mon, 11 Jul 2016 18:42:55 +0000 (13:42 -0500)] 
ast_expr2: Fix off-nominal memory leak.

Thanks to ibercom for pointing out a memory leak that was missed
in the earlier patch for the issue.

ASTERISK-26119
Reported by: Alexei Gradinari

Change-Id: I9a151f5c4725d97fb82a9e938bc73dc659532b71

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 agoBuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf. 43/3143/1
Alexander Traud [Mon, 4 Jul 2016 10:58:39 +0000 (12:58 +0200)] 
BuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf.

Updated the macro-set autoconf/libcurl.m4 to its latest upstream version. This
avoids a warning about an obsolete macro on AC_HELP_STRING, because Asterisk is
using AS_HELP_STRING everywhere else already.

ASTERISK-26046

Change-Id: I8299faf504ceaeee3e39930c59293809e116c631

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