]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
8 years agoMESSAGE: Flush Message/ast_msg_queue channel alert pipe. 27/4627/1
Richard Mudgett [Tue, 13 Dec 2016 00:38:42 +0000 (18:38 -0600)] 
MESSAGE: Flush Message/ast_msg_queue channel alert pipe.

ASTERISK-25083

Change-Id: Id54baa57a8dbca84e29f28bcd2ffc0a5ac12d8b2

8 years agoMerge "res_pjsip_registrar: AMI Add RegistrationInboundContactStatuses command" into...
zuul [Fri, 9 Dec 2016 03:12:38 +0000 (21:12 -0600)] 
Merge "res_pjsip_registrar: AMI Add RegistrationInboundContactStatuses command" into certified/13.13

8 years agoMerge "res_format_attr_opus: Fix crash when fmtp contains spaces." into certified...
Kevin Harwell [Thu, 8 Dec 2016 17:07:35 +0000 (11:07 -0600)] 
Merge "res_format_attr_opus: Fix crash when fmtp contains spaces." into certified/13.13

8 years agochan_sip: Do not allow non-SP/HTAB between header key and colon. 85/4585/1
Walter Doekes [Wed, 30 Nov 2016 15:31:39 +0000 (16:31 +0100)] 
chan_sip: Do not allow non-SP/HTAB between header key and colon.

RFC says SIP headers look like:

    HCOLON  =  *( SP / HTAB ) ":" SWS
    SWS     =  [LWS]                    ; sep whitespace
    LWS     =  [*WSP CRLF] 1*WSP        ; linear whitespace
    WSP     =  SP / HTAB                ; from rfc2234

chan_sip implemented this:

    HCOLON  =  *( LOWCTL / SP ) ":" SWS
    LOWCTL  = %x00-1F                   ; CTL without DEL

This discrepancy meant that SIP proxies in front of Asterisk with
chan_sip could pass on unknown headers with \x00-\x1F in them, which
would be treated by Asterisk as a different (known) header.  For
example, the "To\x01:" header would gladly be forwarded by some proxies
as irrelevant, but chan_sip would treat it as the relevant "To:" header.

Those relying on a SIP proxy to scrub certain headers could mistakenly
get unexpected and unvalidated data fed to Asterisk.

This change fixes so chan_sip only considers SP/HTAB as valid tokens
before the colon, making it agree on the headers with other speakers of
SIP.

ASTERISK-26433 #close
AST-2016-009

Change-Id: I78086fbc524ac733b8f7f78cb423c91075fd489b

8 years agores_format_attr_opus: Fix crash when fmtp contains spaces. 81/4581/1
Joshua Colp [Tue, 15 Nov 2016 00:18:21 +0000 (00:18 +0000)] 
res_format_attr_opus: Fix crash when fmtp contains spaces.

When an opus offer or answer was received that contained an
fmtp line with spaces between the attributes the module would
fail to properly parse it and crash due to recursion.

This change makes the module handle the space properly and
also removes the recursion requirement.

ASTERISK-26579

Change-Id: I01f53e5d9fa9f1925a7365f8d25071b5b3ac2dc3

8 years agores_pjsip_registrar: AMI Add RegistrationInboundContactStatuses command 70/4570/2
George Joseph [Tue, 6 Dec 2016 20:54:25 +0000 (13:54 -0700)] 
res_pjsip_registrar: AMI Add RegistrationInboundContactStatuses command

The PJSIPShowRegistrationsInbound AMI command was just dumping out
all AORs which was pretty useless and resource heavy since it had
to get all endpoints, then all aors for each endpoint, then all
contacts for each aor.

PJSIPShowRegistrationInboundContactStatuses sends ContactStatusDetail
events which meets the intended purpose of the other command and has
significantly less overhead.  Also, some additional fields that were
added to Contact since the original creation of the ContactStatusDetail
event have been added to the end of the event.

For compatibility purposes, PJSIPShowRegistrationsInbound is left
intact.

ASTERISK-26644 #close

Change-Id: I326f12c9ecb52bf37ba03f0748749de4da01490a

8 years agoMerge "Bundled pjproject: Fix finding SIP transactions." into certified/13.13
Joshua Colp [Wed, 7 Dec 2016 19:38:41 +0000 (13:38 -0600)] 
Merge "Bundled pjproject:  Fix finding SIP transactions." into certified/13.13

8 years agoBundled pjproject: Fix finding SIP transactions. 68/4568/2
Richard Mudgett [Tue, 6 Dec 2016 22:45:38 +0000 (16:45 -0600)] 
Bundled pjproject:  Fix finding SIP transactions.

Occasionally SIP message transactions are not found when they should be.
In the particular case an incoming INVITE transaction is CANCELed but the
INVITE transaction cannot be found so a 481 response is returned for the
CANCEL.  The problematic calls have a '_' character in the Via branch
parameter.

The problem is in the pjproject PJ_HASH_USE_OWN_TOLOWER feature's code.
The problem with the "own tolower" code is that it does not calculate the
same hash value as when the pj_tolower() function is used.  The "own
tolower" code will erroneously modify the ASCII characters '@', '[', '\\',
']', '^', and '_'.  Calls to pj_hash_calc_tolower() can use the
PJ_HASH_USE_OWN_TOLOWER substitute algorithm when enabled.  Calls to
pj_hash_get_lower(), pj_hash_set_lower(), and pj_hash_set_np_lower() call
find_entry() which never uses the PJ_HASH_USE_OWN_TOLOWER algorithm.  As a
result you may not be able to find a hash tabled entry because the
calculated hash values would differ.

* Simply disable PJ_HASH_USE_OWN_TOLOWER.

ASTERISK-26490 #close

Change-Id: If89bfdb5f301b8b685881a9a2a6e0c3c5af32253

8 years agopjproject_bundled: Fix missing inclusion of symbols 60/4560/1
George Joseph [Tue, 6 Dec 2016 18:06:45 +0000 (11:06 -0700)] 
pjproject_bundled:  Fix missing inclusion of symbols

Added back in a -g3, and an -O3 when DONT_OPTIMIZE is not set, to
the CFLAGS.  Not sure how they went missing.

Also fixed an uninstall problem where we weren't removing the
symlink from libasteriskpj.so.2 to libasteriskpj.so.  While I was
there, I fixed it for libasteriskssl as well.

Change-Id: I9e00873b1e9082d05b5549d974534b48a2142556

8 years agoFrame deferral: Re-queue deferred frames one-at-a-time. 33/4533/1
Mark Michelson [Wed, 30 Nov 2016 16:48:39 +0000 (10:48 -0600)] 
Frame deferral: Re-queue deferred frames one-at-a-time.

The recent change that made frame deferral into an API had a behavior
change to it. When frame deferral was completed, we would take all of
the deferred frames and queue them all onto the channel in one call to
ast_queue_frame_head(). Before frame deferral was API-ized, places that
performed manual frame deferral would actually take each deferred frame
and queue them onto the channel.

This change in behavior caused the confbridge_recording test to start
failing consistently. Without going too crazily deep into the details,
a channel was getting "stuck" in an ast_safe_sleep(). An AMI redirect
was attempting to break it out of the sleep, but because there were more
frames in the channel read queue than expected, the channel ended up
being unable to break from its sleep loop.

By restoring the behavior of individual frame queuing after deferral,
the test starts passing again.

Note, this points to a potential underlying issue pointing to an
"unbalance" that can occur when queuing multiple frames at once,
and so a follow-up issue is being created to investigate that
possibility.

Change-Id: Ied5dacacda06d343dea751ed5814a03364fe5a7d

8 years agobuild_tools: Fix download_externals to handle certified branches 06/4506/1
George Joseph [Mon, 28 Nov 2016 17:03:23 +0000 (10:03 -0700)] 
build_tools:  Fix download_externals to handle certified branches

download_externals wasn't handling the "certified/13.x" version
correctly.

Change-Id: I124d195bb117ca36fd7bf1150c630f3b474a9d9a

8 years agoUpdate for certified/13.13-cert1-rc1 certified/13.13-cert1-rc1
Kevin Harwell [Wed, 23 Nov 2016 21:58:56 +0000 (16:58 -0500)] 
Update for certified/13.13-cert1-rc1

8 years agoapp_talkdectect: Now core supported, enable for cert
Kevin Harwell [Wed, 23 Nov 2016 21:20:31 +0000 (15:20 -0600)] 
app_talkdectect: Now core supported, enable for cert

Change-Id: Ic0b2cacb21a6e11a25ebbff7e508e106ea156f6c

8 years agoDisable extended support modules
Kevin Harwell [Wed, 23 Nov 2016 21:01:09 +0000 (15:01 -0600)] 
Disable extended support modules

Change-Id: Ib6b4f9451b5b68b738d8ab07a27de1c87c28f819

8 years ago.version: Update for certified/13.13
Kevin Harwell [Wed, 23 Nov 2016 20:57:35 +0000 (14:57 -0600)] 
.version: Update for certified/13.13

Change-Id: Ia1a0f035359d88b8885c7aca22f0d70b73aeb05d

8 years agoUpdate for 13.13.0 13.13.0
Kevin Harwell [Wed, 23 Nov 2016 15:26:01 +0000 (10:26 -0500)] 
Update for 13.13.0

8 years agoUpdate for 13.13.0-rc2 13.13.0-rc2
Kevin Harwell [Tue, 22 Nov 2016 18:02:41 +0000 (13:02 -0500)] 
Update for 13.13.0-rc2

8 years agoMerge branch '13.13' of ssh://gerrit.asterisk.org:29418/asterisk into 13.13
Kevin Harwell [Tue, 22 Nov 2016 18:02:14 +0000 (12:02 -0600)] 
Merge branch '13.13' of ssh://gerrit.asterisk.org:29418/asterisk into 13.13

8 years agobuild: Backport addition of librt check to configure.ac 88/4488/1
George Joseph [Mon, 21 Nov 2016 15:40:59 +0000 (08:40 -0700)] 
build:  Backport addition of librt check to configure.ac

A while back, a master-only change was made to check for librt which
should probably have been cherry-picked to 13 at that time.  Sometime
between then and now, part of that change did make it into 13 but it
was incomplete and non-functional.  This patch backports the rest
of the librt check and allows the link of libasteriskpj to use the
results.

Change-Id: I1424008fd8c90f389dda53162ec4a340b253a3c1

8 years agoUpdate for 13.13.0
Kevin Harwell [Tue, 22 Nov 2016 17:20:29 +0000 (12:20 -0500)] 
Update for 13.13.0

8 years agoUpdate for 13.13.0-rc1 13.13.0-rc1
Joshua Colp [Fri, 18 Nov 2016 18:59:31 +0000 (13:59 -0500)] 
Update for 13.13.0-rc1

8 years agoMerge "build: Various OpenBSD issues" into 13
Joshua Colp [Fri, 18 Nov 2016 18:37:59 +0000 (12:37 -0600)] 
Merge "build:  Various OpenBSD issues" into 13

8 years agoMerge "Bump ARI version to 1.10.0" into 13
Joshua Colp [Fri, 18 Nov 2016 18:35:45 +0000 (12:35 -0600)] 
Merge "Bump ARI version to 1.10.0" into 13

8 years agoBump ARI version to 1.10.0 74/4474/3
Mark Michelson [Fri, 18 Nov 2016 15:45:27 +0000 (09:45 -0600)] 
Bump ARI version to 1.10.0

The video-related bridge changes mean that the version needs to be
bumped.

Change-Id: I41c4495068562bef03aa76728f188b8ac4bd393d

8 years agomanager: update minor version 67/4467/1
Mark Michelson [Thu, 17 Nov 2016 16:50:58 +0000 (10:50 -0600)] 
manager: update minor version

Based on bridge video AMI event changes, bump the minor version of AMI.

Change-Id: I02586bd6cafc0baa33ea98c2f75356c0f5e03435

8 years agoMerge "res_pjsip_outbound_authenticator_digest.c: Fix memory pool leak." into 13
zuul [Thu, 17 Nov 2016 05:20:10 +0000 (23:20 -0600)] 
Merge "res_pjsip_outbound_authenticator_digest.c: Fix memory pool leak." into 13

8 years agoMerge "res_format_attr_opus: Fix fmtp generation." into 13
George Joseph [Thu, 17 Nov 2016 04:41:00 +0000 (22:41 -0600)] 
Merge "res_format_attr_opus: Fix fmtp generation." into 13

8 years agobuild: Various OpenBSD issues 65/4465/1
George Joseph [Thu, 17 Nov 2016 02:24:08 +0000 (19:24 -0700)] 
build:  Various OpenBSD issues

OpenBSD's 'find' doesn't take the -delete argument so you have to pipe
through 'xargs rm -rf'.

'echo -e' doesn't like \t starting a line. It just prints 't' which
causes the libasteriskpj.exports file to be garbage.  They were just
cosmetic so they were removed.

librt doesn't exist so the link of libasteriskpj.so fails. It's not
actually needed for linux anyway so -lrt was removed from the link.

res_rtp_asterisk was failing to load because of an undefined
DTLS_method. '|| defined(LIBRESSL_VERSION_NUMBER)' was added to the #if
so DTLSv1_method is used instead.

ASTERISK-26608

Change-Id: I926ec95b0b69633231e3ad1d6e803b977272c49c

8 years agoMerge "channel: Fix issues in hangup scenarios caused by frame deferral" into 13
George Joseph [Wed, 16 Nov 2016 23:42:17 +0000 (17:42 -0600)] 
Merge "channel:  Fix issues in hangup scenarios caused by frame deferral" into 13

8 years agochannel: Fix issues in hangup scenarios caused by frame deferral 22/4422/4
George Joseph [Tue, 15 Nov 2016 00:45:01 +0000 (17:45 -0700)] 
channel:  Fix issues in hangup scenarios caused by frame deferral

ASTERISK-26343

Change-Id: I06dbf7366e26028251964143454a77d017bb61c8

8 years agoMerge "codec_opus: Fix warning when Opus negotiated but codec_opus not loaded." into 13
Joshua Colp [Wed, 16 Nov 2016 23:40:36 +0000 (17:40 -0600)] 
Merge "codec_opus: Fix warning when Opus negotiated but codec_opus not loaded." into 13

8 years agoMerge "res/ari/resource_bridges: Add the ability to manipulate the video source"...
zuul [Wed, 16 Nov 2016 22:48:14 +0000 (16:48 -0600)] 
Merge "res/ari/resource_bridges: Add the ability to manipulate the video source" into 13

8 years agores_format_attr_opus: Fix fmtp generation. 60/4460/1
Mark Michelson [Wed, 16 Nov 2016 21:42:39 +0000 (15:42 -0600)] 
res_format_attr_opus: Fix fmtp generation.

res_format_attr_opus assumed that the string being passed into it was
empty. It tried to determine if the only thing it had written was

a=fmtp:<num>

And if it had, it would reset the string. Its calculation was off when
working with chan_sip, though. chan_sip passes the entire built SDP
rather than an empty string. This resulted in always putting an empty
fmtp line in the SDP.

ASTERISK-26520 #close
Reported by scgm11

Change-Id: Ib2e8712d26a47067e5f36d5973577added01dbb5

8 years agoMerge "Revert "Revert "channel: Use frame deferral API for safe sleep.""" into 13
Joshua Colp [Wed, 16 Nov 2016 21:39:00 +0000 (15:39 -0600)] 
Merge "Revert "Revert "channel: Use frame deferral API for safe sleep.""" into 13

8 years agoMerge "Revert "Revert "autoservice: Use frame deferral API""" into 13
Joshua Colp [Wed, 16 Nov 2016 21:38:55 +0000 (15:38 -0600)] 
Merge "Revert "Revert "autoservice: Use frame deferral API""" into 13

8 years agoMerge "Revert "Revert "AGI: Only defer frames when in an interception routine.""...
zuul [Wed, 16 Nov 2016 21:06:25 +0000 (15:06 -0600)] 
Merge "Revert "Revert "AGI: Only defer frames when in an interception routine.""" into 13

8 years agoMerge "Revert "Revert "Add API for channel frame deferral.""" into 13
zuul [Wed, 16 Nov 2016 21:06:24 +0000 (15:06 -0600)] 
Merge "Revert "Revert "Add API for channel frame deferral.""" into 13

8 years agoMerge "apps/app_echo: Only relay a single video source change frame" into 13
zuul [Wed, 16 Nov 2016 21:06:23 +0000 (15:06 -0600)] 
Merge "apps/app_echo: Only relay a single video source change frame" into 13

8 years agocodec_opus: Fix warning when Opus negotiated but codec_opus not loaded. 54/4454/2
Richard Mudgett [Tue, 15 Nov 2016 22:23:35 +0000 (16:23 -0600)] 
codec_opus: Fix warning when Opus negotiated but codec_opus not loaded.

When Opus is negotiated but not loaded, the log is spammed with messages
because the system does not know how to calculate the number of samples in
a frame.

* Suppress the warning by supplying a function that assumes 20ms of
samples in the frame.  For pass through support it doesn't really seem to
matter what number of samples is returned anyway.

ASTERISK-26605 #close

Change-Id: Icf2273692f040dc2c45b01e72a790d11092f9e0f

8 years agoMerge "Add X.509 subject alternative name support to TLS certificate verification...
Joshua Colp [Wed, 16 Nov 2016 19:14:42 +0000 (13:14 -0600)] 
Merge "Add X.509 subject alternative name support to TLS certificate verification." into 13

8 years agoMerge "cli: Fix ast_el_read_char to work with libedit >= 3.1" into 13
Joshua Colp [Wed, 16 Nov 2016 18:50:15 +0000 (12:50 -0600)] 
Merge "cli:  Fix ast_el_read_char to work with libedit >= 3.1" into 13

8 years agores_pjsip_outbound_authenticator_digest.c: Fix memory pool leak. 42/4442/2
Richard Mudgett [Mon, 14 Nov 2016 20:36:52 +0000 (14:36 -0600)] 
res_pjsip_outbound_authenticator_digest.c: Fix memory pool leak.

Responding to authentication challenges leaks PJSIP memory pools.

The leak was introduced with a pjproject 2.5.5 API change.
https://trac.pjsip.org/repos/ticket/1929 changed the API usage of
pjsip_auth_clt_init() to require the new API pjsip_auth_clt_deinit() to
clean up cached authentication allocations that get allocated with
pjsip_auth_clt_reinit_req().

ASTERISK-26516 #close

Change-Id: I4473141b8c3961d0dc91c382beb3876b3efb45c8

8 years agoMerge "file.c/__ast_file_read_dirs: Fix issues on filesystems without d_type" into 13
Joshua Colp [Wed, 16 Nov 2016 17:12:16 +0000 (11:12 -0600)] 
Merge "file.c/__ast_file_read_dirs:  Fix issues on filesystems without d_type" into 13

8 years agofile.c/__ast_file_read_dirs: Fix issues on filesystems without d_type 46/4446/4
George Joseph [Tue, 15 Nov 2016 18:01:04 +0000 (11:01 -0700)] 
file.c/__ast_file_read_dirs:  Fix issues on filesystems without d_type

One of the code paths in __ast_file_read_dirs will only get executed if
the OS doesn't support dirent->d_type OR if the filesystem the
particular file is on doesn't support it.  So, while standard Linux
systems support the field, some filesystems like XFS do not.  In this
case, we need to call stat() to determine whether the directory entry
is a file or directory so we append the filename to the supplied
directory path and call stat.  We forgot to truncate path back to just
the directory afterwards though so we were passing a complete file name
to the callback in the dir_name parameter instead of just the directory
name.

The logic has been re-written to only create a full_path if we need to
call stat() or if we need to descend into another directory.

Change-Id: I54e4228bd8355fad65200c6df3ec4c9c8a98dfba

8 years agoAdd X.509 subject alternative name support to TLS certificate 51/4451/1
Maciej Szmigiero [Thu, 14 May 2015 22:12:41 +0000 (00:12 +0200)] 
Add X.509 subject alternative name support to TLS certificate
verification.

This way one X.509 certificate can be used for hosts that
can be reached under multiple DNS names or for multiple hosts.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
ASTERISK-25063 #close

Change-Id: I13302c80490a0b44c43f1b45376c9bd7b15a538f

8 years agopjproject: Use a much higher limit for PJ_ICE_MAX_CHECKS 33/4433/1
Matt Jordan [Mon, 14 Nov 2016 21:57:08 +0000 (15:57 -0600)] 
pjproject: Use a much higher limit for PJ_ICE_MAX_CHECKS

The PJ_ICE_MAX_CHECKS constant is used by pjproject to determine how
many pairs of local/remote candidates will be made. If for some reason
we reach this upper bound, ICE will generally fail and no media will
flow between the browser and Asterisk.

This patch makes PJ_ICE_MAX_CHECKS set to the total possible number of
pairs of candidates we'd theoretically allow, which is
PJ_ICE_MAX_CAND^2. Prior to this patch, we simply multiplied
PJ_ICE_MAX_CAND by two; on systems with multiple interfaces (I blame
Docker), this is far too low to allow WebRTC calls to succeed.

Setting this to be PJ_ICE_MAX_CAND^2 allowed WebRTC calls to succeed
even when the system Asterisk was running on had quite a few virtual
interfaces.

Change-Id: Icd4f17de0ac9d3a83dddfc8bf1cb7616bc107d55

8 years agoapps/app_echo: Only relay a single video source change frame 32/4432/1
Matt Jordan [Mon, 14 Nov 2016 21:32:14 +0000 (15:32 -0600)] 
apps/app_echo: Only relay a single video source change frame

In 9785e8d0, app_echo was updated to relay video source updates to the
channel for the purposes of displaying video in WebRTC tests.
Unfortunately, this can cause a Kafkaesque nightmare if two or more
Local channels are in a bridge together where their ends are in
app_echo. When this situation occurs, a video update sent into app_echo
will cause the video update to be relayed to the other Local channels,
causing another round of video updates, etc. In not much time at all,
the channel length queues will be overwhelmed, channel alert pipes will
fail, and all hell will break loose as Asterisk merrily continues to
throw more video update requests onto the channels.

This patch updates app_echo to *only* relay a single video update. Once
a video update has been made, all further video updates are dropped.
This meets the intended purpose of the original patch: if we get a video
update and we're in app_echo, go ahead and ask the sender to update
themselves. However, once we've got that video stream sync'd up, don't
keep spamming the world.

Change-Id: I9210780b08d4c17ddb38599d1c64453adfc34f74

8 years agores/ari/resource_bridges: Add the ability to manipulate the video source 31/4431/1
Matt Jordan [Tue, 8 Nov 2016 16:11:41 +0000 (10:11 -0600)] 
res/ari/resource_bridges: Add the ability to manipulate the video source

In multi-party bridges, Asterisk currently supports two video modes:
 * Follow the talker, in which the speaker with the most energy is shown
   to all participants but the speaker, and the speaker sees the
   previous video source
 * Explicitly set video sources, in which all participants see a locked
   video source

Prior to this patch, ARI had no ability to manipulate the video source.
This isn't important for two-party bridges, in which Asterisk merely
relays the video between the participants. However, in a multi-party
bridge, it can be advantageous to allow an external application to
manipulate the video source.

This patch provides two new routes to accomplish this:
(1) setVideoSource: POST /bridges/{bridgeId}/videoSource/{channelId}
    Sets a video source to an explicit channel
(2) clearVideoSource: DELETE /bridges/{bridgeId}/videoSource
    Removes any explicit video source, and sets the video mode to talk
    detection

ASTERISK-26595 #close

Change-Id: I98e455d5bffc08ea5e8d6b84ccaf063c714e6621

8 years agoRevert "Revert "channel: Use frame deferral API for safe sleep."" 21/4421/2
George Joseph [Mon, 14 Nov 2016 20:22:31 +0000 (15:22 -0500)] 
Revert "Revert "channel: Use frame deferral API for safe sleep.""

This reverts commit 58c88cfbaa80cb43419cde9186d643d1c5d24baf.

Change-Id: I72692e2b2e83ef6da9390075ff20b138b2c374b6

8 years agoRevert "Revert "autoservice: Use frame deferral API"" 20/4420/2
George Joseph [Mon, 14 Nov 2016 20:22:10 +0000 (15:22 -0500)] 
Revert "Revert "autoservice: Use frame deferral API""

This reverts commit 1df434e2b4bd7cc34b9b4addf405a3caa7ac16b8.

Change-Id: Id2b8a8bccbb4bbdd82b792275d4cd6f32563e401

8 years agoRevert "Revert "AGI: Only defer frames when in an interception routine."" 19/4419/2
George Joseph [Mon, 14 Nov 2016 20:21:48 +0000 (15:21 -0500)] 
Revert "Revert "AGI: Only defer frames when in an interception routine.""

This reverts commit 6be5d8de0da7e804544507f70382425af9a07b3f.

Change-Id: I4b548137f52ae0686d8f09e21496b778d1c6a797

8 years agoRevert "Revert "Add API for channel frame deferral."" 18/4418/1
George Joseph [Mon, 14 Nov 2016 20:21:26 +0000 (15:21 -0500)] 
Revert "Revert "Add API for channel frame deferral.""

This reverts commit 6b5a7ced136b7178ae0b2ba39221eba1cd2e37c9.

Change-Id: I61d1dbb2e69e1977f684b7dfc8e98211024e1cd1

8 years agoMerge "res_pjsip.c: Rework endpt_send_request() req_wrapper code." into 13
zuul [Mon, 14 Nov 2016 18:44:41 +0000 (12:44 -0600)] 
Merge "res_pjsip.c: Rework endpt_send_request() req_wrapper code." into 13

8 years agocli: Fix ast_el_read_char to work with libedit >= 3.1 11/4411/1
George Joseph [Mon, 14 Nov 2016 18:16:03 +0000 (11:16 -0700)] 
cli:  Fix ast_el_read_char to work with libedit >= 3.1

Libedit 3.1 is not build with unicode on as a default and so the
prototype for the el_gets callback changed from expecting a char buffer
to accepting a wchar buffer.  If ast_el_read_char isn't changed,
the cli reads garbage from teh terminal.

Added a configure test for (*el_rfunc_t)(EditLine *, wchar_t *) and
updated ast_el_read_char to use the HAVE_ define to detemrine whether
to use char or wchar.

ASTERISK-26592 #close

Change-Id: I9099b46f68e06d0202ff80e53022a2b68b08871a

8 years agoMerge "Fix closing rtp ports after call finished in chan_unistim." into 13
Joshua Colp [Mon, 14 Nov 2016 14:05:38 +0000 (08:05 -0600)] 
Merge "Fix closing rtp ports after call finished in chan_unistim." into 13

8 years agoMerge "res_pjsip: Fix tdata leaks in off nominal paths." into 13
Joshua Colp [Mon, 14 Nov 2016 12:15:44 +0000 (06:15 -0600)] 
Merge "res_pjsip: Fix tdata leaks in off nominal paths." into 13

8 years agoFix closing rtp ports after call finished in chan_unistim. 02/4402/1
Igor Goncharovskiy [Fri, 11 Nov 2016 08:41:36 +0000 (11:41 +0300)] 
Fix closing rtp ports after call finished in chan_unistim.

Fix ASTERISK-26565 by adding ast_rtp_instance_stop before
rtp instance destroy for chan_unistim. Also several fixes
for displayed text translation.

Change-Id: If42a03eea09bd1633471406bdc829cf98bf6affc

8 years agoMerge "res_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp." into 13
Joshua Colp [Fri, 11 Nov 2016 21:17:54 +0000 (15:17 -0600)] 
Merge "res_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp." into 13

8 years agoMerge "build: Fix default values for some SANITIZER options" into 13
zuul [Fri, 11 Nov 2016 04:09:02 +0000 (22:09 -0600)] 
Merge "build:  Fix default values for some SANITIZER options" into 13

8 years agores_pjsip.c: Rework endpt_send_request() req_wrapper code. 87/4387/1
Richard Mudgett [Fri, 23 Sep 2016 22:54:07 +0000 (17:54 -0500)] 
res_pjsip.c: Rework endpt_send_request() req_wrapper code.

* Don't hold the req_wrapper lock too long in endpt_send_request().  We
could block the PJSIP monitor thread if the timeout timer expires.
sip_get_tpselector_from_endpoint() does a sorcery access that could take
awhile accessing a database.  pjsip_endpt_send_request() might take awhile
if selecting a transport.

* Shorten the time that the req_wrapper lock is held in the callback
functions.

* Simplify endpt_send_request() req_wrapper->timeout code.

* Removed some redundant req_wrapper->timeout_timer->id assignments.

Change-Id: I3195e3a8e0207bb8e7f49060ad2742cf21a6e4c9

8 years agores_pjsip: Fix tdata leaks in off nominal paths. 84/4384/1
Richard Mudgett [Wed, 21 Sep 2016 20:10:29 +0000 (15:10 -0500)] 
res_pjsip: Fix tdata leaks in off nominal paths.

Change-Id: Ie83e06e88c2d60157775263b07e40b61718ac97b

8 years agores_pjsip_registrar_expire.c: Remove extra linefeed in debug message. 81/4381/1
Richard Mudgett [Mon, 24 Oct 2016 17:41:38 +0000 (12:41 -0500)] 
res_pjsip_registrar_expire.c: Remove extra linefeed in debug message.

Change-Id: I1f9adb911f23376503396ec8867e8005b755eb94

8 years agores_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp. 92/4392/1
Joshua Colp [Thu, 10 Nov 2016 16:57:49 +0000 (16:57 +0000)] 
res_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp.

When optimistic SRTP was on it was possible for us to still
set up a call without an audio stream if an offer was received
with required SRTP.

This change makes it so this scenario will now fail with a 488
response.

ASTERISK-26575

Change-Id: I7d14187037681f48879bd20319ac79d0877318f3

8 years agoapp_queue: Add mention of 'ABANDON' variable to CHANGES. 77/4377/1
Joshua Colp [Thu, 10 Nov 2016 14:33:41 +0000 (14:33 +0000)] 
app_queue: Add mention of 'ABANDON' variable to CHANGES.

ASTERISK-26558

Change-Id: I1127010181e79c8ac291f72f036cb8e430dc7f7e

8 years agoMerge "Revert "autoservice: Use frame deferral API"" into 13
George Joseph [Thu, 10 Nov 2016 13:42:37 +0000 (07:42 -0600)] 
Merge "Revert "autoservice: Use frame deferral API"" into 13

8 years agoMerge "Revert "Add API for channel frame deferral."" into 13
George Joseph [Thu, 10 Nov 2016 13:42:36 +0000 (07:42 -0600)] 
Merge "Revert "Add API for channel frame deferral."" into 13

8 years agoMerge "Revert "AGI: Only defer frames when in an interception routine."" into 13
George Joseph [Thu, 10 Nov 2016 13:42:36 +0000 (07:42 -0600)] 
Merge "Revert "AGI: Only defer frames when in an interception routine."" into 13

8 years agoMerge "Revert "channel: Use frame deferral API for safe sleep."" into 13
George Joseph [Thu, 10 Nov 2016 13:42:35 +0000 (07:42 -0600)] 
Merge "Revert "channel: Use frame deferral API for safe sleep."" into 13

8 years agoRevert "Add API for channel frame deferral." 76/4376/1
George Joseph [Thu, 10 Nov 2016 13:41:55 +0000 (08:41 -0500)] 
Revert "Add API for channel frame deferral."

This reverts commit 9231a56cf3d6f5eca1bf2d37d827453400690773.
Multiple testsuite failures were detected after the fact.

Change-Id: I3bac8d7c3ddb69a4ddf6c5d6de0ffa5ff7ff3af7

8 years agoRevert "AGI: Only defer frames when in an interception routine." 75/4375/1
George Joseph [Thu, 10 Nov 2016 13:41:43 +0000 (08:41 -0500)] 
Revert "AGI: Only defer frames when in an interception routine."

This reverts commit 5c10091f3d1430c6fc04015226f8c3e3aa9d8282.
Multiple testsuite failures were detected after the fact.

Change-Id: I397a841acc17ae230c512449cd6bed89d2ef3b73

8 years agoRevert "autoservice: Use frame deferral API" 74/4374/1
George Joseph [Thu, 10 Nov 2016 13:41:25 +0000 (08:41 -0500)] 
Revert "autoservice: Use frame deferral API"

This reverts commit 2e3a3545754749de21873bfdc6d1a40ec7d8893f.
Multiple testsuite failures were detected after the fact.

Change-Id: Ia45fa4633fae74dca345b24bb6722737c63035de

8 years agoRevert "channel: Use frame deferral API for safe sleep." 73/4373/1
George Joseph [Thu, 10 Nov 2016 13:40:59 +0000 (08:40 -0500)] 
Revert "channel: Use frame deferral API for safe sleep."

This reverts commit 44f7e252397fd87420b3374df26941d7436401b3.
Multiple testsuite failures were detected after the fact.

Change-Id: I56299087da22128a95f0c8f3955f740890d7ca65

8 years agoMerge "app_queue: new variable set when abandoned" into 13
Joshua Colp [Thu, 10 Nov 2016 12:52:41 +0000 (06:52 -0600)] 
Merge "app_queue: new variable set when abandoned" into 13

8 years agobuild: Fix default values for some SANITIZER options 61/4361/1
George Joseph [Thu, 10 Nov 2016 00:18:00 +0000 (17:18 -0700)] 
build:  Fix default values for some SANITIZER options

2 of the sanitizers didn't have default values so in systems that
don't support sanitizers menuselect would spit out warnings.  They
were harmless but confusing.  They've now been set to "0".

Change-Id: I08dc495e3b83f1feac3160b421f538c375fc5d58

8 years agoMerge "res_pjsip_session: Do not call session supplements when it's too late." into 13
George Joseph [Wed, 9 Nov 2016 19:23:59 +0000 (13:23 -0600)] 
Merge "res_pjsip_session: Do not call session supplements when it's too late." into 13

8 years agoapp_queue: new variable set when abandoned 23/4323/4
Sebastian Gutierrez [Sun, 6 Nov 2016 12:04:00 +0000 (09:04 -0300)] 
app_queue: new variable set when abandoned

sets the variable ABANDONED to TRUE if the call was not answered.

ASTERISK-26558

Change-Id: I4729af9bff4eba436d8a776afd3374065d0036d3

8 years agores_pjsip_session: Do not call session supplements when it's too late. 51/4351/1
Mark Michelson [Tue, 8 Nov 2016 16:48:32 +0000 (10:48 -0600)] 
res_pjsip_session: Do not call session supplements when it's too late.

res_pjsip_sesssion was hooking into transaction and invite state
changes. One of the reasons for doing so was due to the
PJSIP_EVENT_TX_MSG event. The idea was that we were hooking into the
message sending process, and so we should call session supplements to
alter the outgoing message.

In reality, this event was meant to indicate that the message either
a) had already been sent, or
b) required a DNS lookup and would be sent when the DNS query
completed.

In case (a), this meant we were altering an already-sent
request/response for no reason. In case (b), this potentially meant we
could be trying to alter a request/response at the same time that the
DNS resolution completed. In this case, it meant we might be stomping on
memory being used by the thread actually sending the message. This
caused potential crashes and memory corruption.

This patch removes the calls to session supplements from the case where
the PJSIP_EVENT_TX_MSG event occurs. In all of these cases, trying to
alter the message at this point is too late, and it can cause nothing
but harm to try to do it. Because there were no longer any calls to the
handle_outgoing() function, it has been removed.

Change-Id: Ibcc223fb1c3a237927f38754e0429e80ee301e92

8 years agochannel: Use frame deferral API for safe sleep. 00/4300/2
Mark Michelson [Thu, 3 Nov 2016 21:46:41 +0000 (16:46 -0500)] 
channel: Use frame deferral API for safe sleep.

This is another case where manual frame deferral can be replaced with
centralized routines instead.

Change-Id: I42cdf205f8f29a7977e599751a57efbaac07c30e

8 years agoautoservice: Use frame deferral API 99/4299/2
Mark Michelson [Thu, 3 Nov 2016 21:46:03 +0000 (16:46 -0500)] 
autoservice: Use frame deferral API

Rather than use manual frame deferral, just let the channel API do it
for us.

ASTERISK-26343

Change-Id: I688386f36e765dbc07be863943a43f26bd5eac49

8 years agoAGI: Only defer frames when in an interception routine. 98/4298/2
Mark Michelson [Thu, 3 Nov 2016 21:42:40 +0000 (16:42 -0500)] 
AGI: Only defer frames when in an interception routine.

AGI recently was modified to defer important frames. This was because
when AGI was used in a connected line interception routine, the
resulting connected line frame would end up getting discarded by the
AGI.

However, this caused bad behavior in other cases. Specifically, during a
transfer, if someone attempted to manually set the Caller ID on a
channel in an AGI, the deferred connected line frame would end up
overwriting what had been manually set in the AGI.

Since the initial issue was specific to interception routines, this
change removes the manual frame deferral from AGI and instead uses the
new frame deferral API in interception routines.

ASTERISK-26343 #close
Reported by Morton Tryfoss

Change-Id: Iab7d39436d0ee99bfe32ad55ef91e9bd88db4208

8 years agoMerge "automon: restore mixing of the both channels after recording stops" into 13
zuul [Tue, 8 Nov 2016 13:58:28 +0000 (07:58 -0600)] 
Merge "automon: restore mixing of the both channels after recording stops" into 13

8 years agoMerge "Add API for channel frame deferral." into 13
zuul [Tue, 8 Nov 2016 13:58:25 +0000 (07:58 -0600)] 
Merge "Add API for channel frame deferral." into 13

8 years agoMerge "chan_ooh323: reset rrq count on gk registration" into 13
Joshua Colp [Tue, 8 Nov 2016 10:59:03 +0000 (04:59 -0600)] 
Merge "chan_ooh323: reset rrq count on gk registration" into 13

8 years agoMerge "chan_ooh323: Fixes to work right with Cisco devices" into 13
Joshua Colp [Tue, 8 Nov 2016 10:58:25 +0000 (04:58 -0600)] 
Merge "chan_ooh323: Fixes to work right with Cisco devices" into 13

8 years agoMerge "stasis_recording/stored: remove calls to deprecated readdir_r function." into 13
Joshua Colp [Tue, 8 Nov 2016 10:57:47 +0000 (04:57 -0600)] 
Merge "stasis_recording/stored: remove calls to deprecated readdir_r function." into 13

8 years agoMerge "res_stasis: Don't unsubscribe from a NULL bridge." into 13
Joshua Colp [Tue, 8 Nov 2016 01:48:23 +0000 (19:48 -0600)] 
Merge "res_stasis: Don't unsubscribe from a NULL bridge." into 13

8 years agoMerge "res_http_websocket: Increase the buffer size for non-LOW_MEMORY systems" into 13
Joshua Colp [Tue, 8 Nov 2016 01:32:05 +0000 (19:32 -0600)] 
Merge "res_http_websocket: Increase the buffer size for non-LOW_MEMORY systems" into 13

8 years agoMerge "res_stasis: Set a video source mode on Stasis created bridges" into 13
Joshua Colp [Tue, 8 Nov 2016 00:23:26 +0000 (18:23 -0600)] 
Merge "res_stasis: Set a video source mode on Stasis created bridges" into 13

8 years agoMerge "main/bridge: Add some verbose logging for video source changes" into 13
Joshua Colp [Mon, 7 Nov 2016 22:53:27 +0000 (16:53 -0600)] 
Merge "main/bridge: Add some verbose logging for video source changes" into 13

8 years agoMerge "main/bridge_channel: Fix channel reference leak on video source" into 13
Joshua Colp [Mon, 7 Nov 2016 22:31:45 +0000 (16:31 -0600)] 
Merge "main/bridge_channel: Fix channel reference leak on video source" into 13

8 years agoMerge "bridges/bridge_softmix: Remove SSRC changes on join/leave; update video source...
Joshua Colp [Mon, 7 Nov 2016 20:23:35 +0000 (14:23 -0600)] 
Merge "bridges/bridge_softmix: Remove SSRC changes on join/leave; update video source" into 13

8 years agoAdd API for channel frame deferral. 97/4297/2
Mark Michelson [Thu, 3 Nov 2016 21:36:13 +0000 (16:36 -0500)] 
Add API for channel frame deferral.

There are several places in Asterisk that have duplicated logic
for deferring important frames until later.

This commit adds a couple of API calls to facilitate this automatically.

ast_channel_start_defer_frames(): Future reads of deferrable frames on
this channel will be deferred until later.

ast_channel_stop_defer_frames(): Any frames that have been deferred get
requeued onto the channel.

ASTERISK-26343

Change-Id: I3e1b87bc6796f222442fa6f7d1b6a4706fb33641

8 years agoMerge "pjproject_bundled: Fix issue with libasteriskpj needing libresample" into 13
zuul [Mon, 7 Nov 2016 16:18:59 +0000 (10:18 -0600)] 
Merge "pjproject_bundled:  Fix issue with libasteriskpj needing libresample" into 13

8 years agochan_ooh323: Fixes to work right with Cisco devices 32/4332/1
Alexander Anikin [Thu, 3 Nov 2016 12:42:20 +0000 (16:42 +0400)] 
chan_ooh323: Fixes to work right with Cisco devices

Changed output packets queue processing algo to one read-one write
instead of all read-all send

Remove h.245 tunneling parameter from ReleaseComplete packet

ASTERISK-24400 #close
Reported by: Dmitry Melekhov
Tested by: Dmitry Melekhov

Change-Id: I0b31933b062a21011dbac9a82b8bcfe345f406f6

8 years agochan_ooh323: reset rrq count on gk registration 29/4329/1
Alexander Anikin [Thu, 3 Nov 2016 18:10:53 +0000 (22:10 +0400)] 
chan_ooh323: reset rrq count on gk registration

reset registration attempts count on success registration on gatekeeper

Change-Id: I5f47351852e0ca76c9ac78421659600e0f106336

8 years agoMerge "chan_ooh323: Fix infinite loop on read second part of H.225 packet" into 13
zuul [Mon, 7 Nov 2016 13:50:38 +0000 (07:50 -0600)] 
Merge "chan_ooh323: Fix infinite loop on read second part of H.225 packet" into 13

8 years agoMerge "rtp_engine: Allow more than 32 dynamic payload types." into 13
zuul [Mon, 7 Nov 2016 12:38:25 +0000 (06:38 -0600)] 
Merge "rtp_engine: Allow more than 32 dynamic payload types." into 13

8 years agoautomon: restore mixing of the both channels after recording stops 19/4319/2
Michael Kuron [Sun, 6 Nov 2016 09:46:30 +0000 (10:46 +0100)] 
automon: restore mixing of the both channels after recording stops

This is a regression over Asterisk 11, introduced by
2dc8a060064f359a17f5ebcd515d85fe5203c019. Previously, recordings started via
the automon DTMF code would automatically be mixed together using sox because
app_monitor would be called with the m option. This commit restores this
behavior.

Change-Id: Ibaf58684285c3f1b6ca3714524e6d638ae3b3759

8 years agores_http_websocket: Increase the buffer size for non-LOW_MEMORY systems 13/4313/1
Matt Jordan [Fri, 4 Nov 2016 20:42:09 +0000 (15:42 -0500)] 
res_http_websocket: Increase the buffer size for non-LOW_MEMORY systems

Not surprisingly, using Respoke (and possibly other systems) it is
possible to blow past the 16k limit for a WebSocket packet size. This
patch bumps it up to 32k, which, at least for Respoke, is sufficient.
For now.

Because 32k is laughable on a LOW_MEMORY system (as is 16k, for that
matter), this patch adds a LOW_MEMORY directive that sets the buffer to
8k for systems who have asked for their reduced memory availability to
be considered.

Change-Id: Id235902537091b58608196844dc4b045e383cd2e

8 years agores_stasis: Set a video source mode on Stasis created bridges 12/4312/1
Matt Jordan [Fri, 4 Nov 2016 20:40:58 +0000 (15:40 -0500)] 
res_stasis: Set a video source mode on Stasis created bridges

When a bridge is created via ARI (through res_stasis), no video source
mode is set by default. As a result, any endpoint sending video media
won't ever see any video reflected back to it.

This patch defaults a bridge to a 'follow the talker' video mode.
Further work can be done to add routes that allow for the video mode to
be controlled through the /bridges resource.

Change-Id: I7e9d530a5d7a97a4524a9ee4e468e1a6b3443866