]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
5 years agofunc_odbc.conf.sample: Add example lookup
Sean Bright [Mon, 20 Jan 2020 21:26:14 +0000 (16:26 -0500)] 
func_odbc.conf.sample: Add example lookup

Change-Id: Ia05aab1f579597963d2ea23920d2210cfcb97c84

5 years agoMerge "queue_log: Add alembic script for generate db table for queue_log" into 17
Friendly Automation [Mon, 20 Jan 2020 17:31:12 +0000 (11:31 -0600)] 
Merge "queue_log: Add alembic script for generate db table for queue_log" into 17

5 years agoMerge "app_voicemail, say: Fix various leading whitespace problems" into 17
Joshua Colp [Mon, 20 Jan 2020 15:33:00 +0000 (09:33 -0600)] 
Merge "app_voicemail, say: Fix various leading whitespace problems" into 17

5 years agoMerge "app_voicemail: Prevent crash when saving message with realtime voicemail"...
Friendly Automation [Mon, 20 Jan 2020 15:19:52 +0000 (09:19 -0600)] 
Merge "app_voicemail: Prevent crash when saving message with realtime voicemail" into 17

5 years agoqueue_log: Add alembic script for generate db table for queue_log
Rodrigo Ramírez Norambuena [Sat, 1 Oct 2016 02:56:04 +0000 (23:56 -0300)] 
queue_log: Add alembic script for generate db table for queue_log

Change-Id: I35b928a6251f9da9a1742b2cd14c63a00c3d0f0c

5 years agoMerge "pbx.c: Include filesystem cache in free memory calculation" into 17
Joshua Colp [Mon, 20 Jan 2020 13:10:47 +0000 (07:10 -0600)] 
Merge "pbx.c: Include filesystem cache in free memory calculation" into 17

5 years agoMerge "res_realtime: Fix 'realtime update2' argument handling" into 17
Joshua Colp [Fri, 17 Jan 2020 14:53:19 +0000 (08:53 -0600)] 
Merge "res_realtime: Fix 'realtime update2' argument handling" into 17

5 years agoMerge "app_voicemail: Set globals to default values when voicemail.conf missing"...
Joshua Colp [Fri, 17 Jan 2020 14:37:19 +0000 (08:37 -0600)] 
Merge "app_voicemail: Set globals to default values when voicemail.conf missing" into 17

5 years agoapp_voicemail, say: Fix various leading whitespace problems
Sean Bright [Thu, 16 Jan 2020 19:47:01 +0000 (14:47 -0500)] 
app_voicemail, say: Fix various leading whitespace problems

In af90afd90c64c5183c2207d061f9aa15138081b2, Japanese language support
was added to app_voicemail and main/say.c, but the leading whitespace
is not consistent with Asterisk coding guidelines. This patch fixes
that.

Whitespace only, no functional change.

ASTERISK~23324
Reported by: Kevin McCoy

Change-Id: I72c725f5930084673749bd7c9cc426a987f08e87

5 years agopbx.c: Include filesystem cache in free memory calculation
Sean Bright [Thu, 16 Jan 2020 13:32:34 +0000 (08:32 -0500)] 
pbx.c: Include filesystem cache in free memory calculation

ASTERISK-28695 #close
Reported by: Kevin Flyn

Change-Id: Ief098bb6eb77378daeace8f97ba30701c8de55b8

5 years agoapp_voicemail: Prevent crash when saving message with realtime voicemail
Sean Bright [Wed, 15 Jan 2020 20:29:00 +0000 (15:29 -0500)] 
app_voicemail: Prevent crash when saving message with realtime voicemail

ast_store_realtime() is not NULL tolerant, so we need to initialize
the field values we pass to it to the empty string to avoid a crash.

ASTERISK-23739 #close
Reported by: Stas Kobzar

Change-Id: I756c5dd0299c77f4274368f7c99eb0464367466c

5 years agoMerge "app_queue: Deprecate the QueueMemberPause.Reason field" into 17
Joshua Colp [Wed, 15 Jan 2020 13:03:49 +0000 (07:03 -0600)] 
Merge "app_queue: Deprecate the QueueMemberPause.Reason field" into 17

5 years agoMerge "res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY...
Friendly Automation [Wed, 15 Jan 2020 12:41:09 +0000 (06:41 -0600)] 
Merge "res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY" into 17

5 years agoapp_voicemail: Set globals to default values when voicemail.conf missing
Sean Bright [Tue, 14 Jan 2020 22:20:21 +0000 (17:20 -0500)] 
app_voicemail: Set globals to default values when voicemail.conf missing

If voicemail.conf exists but is empty, the config parsing process will
default a number of global variables to non-zero values. On the other
hand, if voicemail.conf is missing (arguably semantically equivalent
to an empty file), this process is skipped and the globals are
defaulted to 0.

Set the globals to the same values they would be set to if a
configuration were present. This allows voicemail configuration to be
done completely by Realtime without the need to create an empty
voicemail.conf file.

ASTERISK-27622 #close
Reported by: Jim Van Meggelen

Change-Id: Id907d280f310f12e542ca527e6a025432b9fb409

5 years agoapp_queue: Deprecate the QueueMemberPause.Reason field
Sean Bright [Sat, 11 Jan 2020 13:29:46 +0000 (08:29 -0500)] 
app_queue: Deprecate the QueueMemberPause.Reason field

The QueueMemberPause AMI event includes two fields that return the
reason a member was paused.

* In release branches, deprecate Reason in favor of PausedReason.
* In master, remove the Reason field entirely.

ASTERISK-28349 #close
Reported by: Niksa Baldun

Change-Id: I01da58f2b0ab927baeee754870f62b51b7b3d296

5 years agoMerge "res_pjsip_endpoint_identifier_ip: Document support for hostnames" into 17
Joshua Colp [Tue, 14 Jan 2020 18:39:08 +0000 (12:39 -0600)] 
Merge "res_pjsip_endpoint_identifier_ip: Document support for hostnames" into 17

5 years agoMerge "func_curl: Add 'followlocation' option to CURLOPT()" into 17
Friendly Automation [Tue, 14 Jan 2020 18:31:49 +0000 (12:31 -0600)] 
Merge "func_curl: Add 'followlocation' option to CURLOPT()" into 17

5 years agores_realtime: Fix 'realtime update2' argument handling
Sean Bright [Mon, 13 Jan 2020 22:37:00 +0000 (17:37 -0500)] 
res_realtime: Fix 'realtime update2' argument handling

The change in 9b99ef50b5d01ee8111d26efa7b926bdfaf3f980 updated the
syntax of the 'realtime update2' CLI command but did not correctly
update the calls to ast_update2_realtime().

The issue this addresses was originally opened because we aren't
allowing a SQL NULL to be set as part of the update, but this is a
limitation of the Realtime API and is not a bug.

Additionally, this patch:

* Corrects the example in the command documentation to reflect
  'update2' instead of 'update.'

* Fixes the leading spacing of the command documentation.

* Checks that the required 'NULL' literal argument is present where we
  expect it to be.

ASTERISK-21794 #close
Reported by: Cédric Bassaget

Change-Id: Idda63a5dc50d5f9bcb34c27ea3238d90f733b2cd

5 years agoMerge "app_record: Do not hang up if beep audio is missing" into 17
Joshua Colp [Tue, 14 Jan 2020 15:10:45 +0000 (09:10 -0600)] 
Merge "app_record: Do not hang up if beep audio is missing" into 17

5 years agofunc_curl: Add 'followlocation' option to CURLOPT()
Sean Bright [Fri, 10 Jan 2020 19:30:20 +0000 (14:30 -0500)] 
func_curl: Add 'followlocation' option to CURLOPT()

We allow for 'maxredirs' to be set, but this value is ignored when
followlocation is not enabled which, by default, it is not.

ASTERISK-17491 #close
Reported by: candrews

Change-Id: I96a4ab0142f2fb7d2e96ff976f6cf7b2982c761a

5 years agores_pjsip_endpoint_identifier_ip: Document support for hostnames
Sean Bright [Fri, 10 Jan 2020 21:13:49 +0000 (16:13 -0500)] 
res_pjsip_endpoint_identifier_ip: Document support for hostnames

ASTERISK-25429 #close
Reported by: Joshua C. Colp

Change-Id: I7cdfc6026821636acc2465094b7fcde8471a3824

5 years agores_pjsip_notify: Only allow a single Event header to be added to a NOTIFY
Sean Bright [Fri, 10 Jan 2020 20:43:24 +0000 (15:43 -0500)] 
res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY

ASTERISK-27775 #close
Reported by: AvayaXAsterisk

Change-Id: Iad158e908e34675ad98f74d09c5e73024e50c257

5 years agonetsock2: ast_addressfamily_to_sockaddrsize and ast_sockaddr_from_sockaddr.
Jaco Kroon [Tue, 3 Dec 2019 18:27:38 +0000 (20:27 +0200)] 
netsock2: ast_addressfamily_to_sockaddrsize and ast_sockaddr_from_sockaddr.

ast_addressfamily_to_sockaddrize will determine the size that's
required, and ast_sockaddr_from_sockaddr then wraps this new function
and ast_sockaddr_copy_sockaddr to copy arbitrary sockaddr's (without
knowing the address family) into the ast_sockaddr structure.

Change-Id: Iee604e96e9096c79b477d6e5ff310cf0b06dae86
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
5 years agoMerge "res_pjsip_pubsub: Add ability to persist generator state information." into 17
Kevin Harwell [Thu, 9 Jan 2020 23:28:34 +0000 (17:28 -0600)] 
Merge "res_pjsip_pubsub: Add ability to persist generator state information." into 17

5 years agoMerge "app_agent_pool: Update XML docs for AgentLogin" into 17
Joshua Colp [Thu, 9 Jan 2020 21:06:49 +0000 (15:06 -0600)] 
Merge "app_agent_pool: Update XML docs for AgentLogin" into 17

5 years agoMerge "CI: Update buildAsterisk.sh to do a "make full"" into 17
Friendly Automation [Thu, 9 Jan 2020 20:29:27 +0000 (14:29 -0600)] 
Merge "CI: Update buildAsterisk.sh to do a "make full"" into 17

5 years agoMerge "res_pjsip_endpoint_identifier_ip.c: Add port matching support" into 17
Friendly Automation [Thu, 9 Jan 2020 15:47:48 +0000 (09:47 -0600)] 
Merge "res_pjsip_endpoint_identifier_ip.c: Add port matching support" into 17

5 years agoapp_record: Do not hang up if beep audio is missing
Corey Farrell [Thu, 9 Jan 2020 10:37:08 +0000 (05:37 -0500)] 
app_record: Do not hang up if beep audio is missing

Additionally alter the warning to mention that it was "beep" which could
not be streamed to give admins a better clue about what the warning
means.

ASTERISK-28682

Change-Id: If5aed21226a173117ed17589f44826dd1ba6576e

5 years agoapp_agent_pool: Update XML docs for AgentLogin
Kevin Harwell [Wed, 8 Jan 2020 19:54:44 +0000 (13:54 -0600)] 
app_agent_pool: Update XML docs for AgentLogin

This patch fixes some wrongly formatted documentation for the AgentLogin
application. A couple of "see also" links should contain only the function
name, and no parameters.

Change-Id: I3f788b47dce3292e311f8a9856938d59a0bd0661

5 years agoCI: Update buildAsterisk.sh to do a "make full"
George Joseph [Wed, 8 Jan 2020 18:11:26 +0000 (11:11 -0700)] 
CI: Update buildAsterisk.sh to do a "make full"

If you do a "make all" when building Asterisk the xml documentation
produced will be missing certain AMI events where their
documentation is located not at the top of the c source file but
embedded further down next to the event's manager_event()
registration call.  See main/manager_mwi.c for an example.

"make full" does produce the correct documentation so we're changing
it in the build script.  A separate commit/issue will address the
problem with "make all".

ASTERISK-28507
Reported by: David Lee

Change-Id: I4a22635d6eef99eacecc0efb69e28360eebdb86c

5 years agores_pjsip_pubsub: Add ability to persist generator state information.
Joshua C. Colp [Mon, 6 Jan 2020 15:02:54 +0000 (15:02 +0000)] 
res_pjsip_pubsub: Add ability to persist generator state information.

Some body generators, such as dialog-info+xml, require storing state
information which is then conveyed in the NOTIFY request itself. Up
until now there was no way for such body generators to persist this
information.

Two new API calls have been added to allow body generators to set and
get persisted data. This data is persisted out alongside the normal
persistence information and allows the body generator to restore
state information or to simply use this for normal storage of state.
State is stored in the form of JSON and it is up to the body
generator to interpret this as needed.

The dialog-info+xml body generator has been updated to take advantage
of this to persist the version number.

ASTERISK-27759

Change-Id: I5fda56c624fd13c17b3c48e0319b77079e9e27de

5 years agoMerge "sig_pri: Fix deadlock caused by sig_pri_queue_hangup" into 17
Joshua Colp [Wed, 8 Jan 2020 15:41:52 +0000 (09:41 -0600)] 
Merge "sig_pri:  Fix deadlock caused by sig_pri_queue_hangup" into 17

5 years agoMerge "stasis.c: Use correct topic name in stasis_topic_pool_delete_topic" into 17
Friendly Automation [Wed, 8 Jan 2020 14:57:17 +0000 (08:57 -0600)] 
Merge "stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic" into 17

5 years agores_pjsip_endpoint_identifier_ip.c: Add port matching support
Sean Bright [Tue, 24 Dec 2019 15:16:23 +0000 (10:16 -0500)] 
res_pjsip_endpoint_identifier_ip.c: Add port matching support

Adds source port matching support when IP matching is used:

  [example]
  type = identify
  match = 1.2.3.4:5060/32, 1.2.3.4:6000/32, asterisk.org:4444

If the IP matches but the source port does not, we reject and search for
alternatives. SRV lookups are still performed if enabled (srv_lookups = yes),
unless the configured FQDN includes a port number in which case just a host
lookup is performed.

ASTERISK-28639 #close
Reported by: Mitch Claborn

Change-Id: I256d5bd5d478b95f526e2f80ace31b690eebba92

5 years agoMerge "app_chanisavail.c: Simplify dialplan using ChanIsAvail." into 17
Friendly Automation [Tue, 7 Jan 2020 19:59:10 +0000 (13:59 -0600)] 
Merge "app_chanisavail.c: Simplify dialplan using ChanIsAvail." into 17

5 years agoMerge "res_pjsip_config_wizard: Fix change detection for wizard settings" into 17
George Joseph [Tue, 7 Jan 2020 19:05:23 +0000 (13:05 -0600)] 
Merge "res_pjsip_config_wizard: Fix change detection for wizard settings" into 17

5 years agoMerge "features.c: Make Bridge application tolerate unspecified channel." into 17
Friendly Automation [Tue, 7 Jan 2020 18:22:50 +0000 (12:22 -0600)] 
Merge "features.c: Make Bridge application tolerate unspecified channel." into 17

5 years agoMerge "app_dial.c: Simplify dialplan using Dial." into 17
Friendly Automation [Tue, 7 Jan 2020 17:48:42 +0000 (11:48 -0600)] 
Merge "app_dial.c: Simplify dialplan using Dial." into 17

5 years agoMerge "app_page.c: Simplify dialplan using Page." into 17
Friendly Automation [Tue, 7 Jan 2020 17:31:20 +0000 (11:31 -0600)] 
Merge "app_page.c: Simplify dialplan using Page." into 17

5 years agoMerge "app_softhangup.c: Reduce unnecessary warning to verbose message." into 17
Friendly Automation [Tue, 7 Jan 2020 16:51:40 +0000 (10:51 -0600)] 
Merge "app_softhangup.c: Reduce unnecessary warning to verbose message." into 17

5 years agoMerge "websocket: Consider pending SSL data when waiting for socket input" into 17
George Joseph [Tue, 7 Jan 2020 16:12:38 +0000 (10:12 -0600)] 
Merge "websocket: Consider pending SSL data when waiting for socket input" into 17

5 years agoMerge "app_chanspy.c: Reduce log message level from notice to verbose." into 17
Friendly Automation [Tue, 7 Jan 2020 16:07:12 +0000 (10:07 -0600)] 
Merge "app_chanspy.c: Reduce log message level from notice to verbose." into 17

5 years agoMerge "contrib/valgrind: Fix use of frame-level suppression" into 17
George Joseph [Tue, 7 Jan 2020 15:57:41 +0000 (09:57 -0600)] 
Merge "contrib/valgrind: Fix use of frame-level suppression" into 17

5 years agosig_pri: Fix deadlock caused by sig_pri_queue_hangup
George Joseph [Mon, 30 Dec 2019 17:04:23 +0000 (10:04 -0700)] 
sig_pri:  Fix deadlock caused by sig_pri_queue_hangup

The change to add setting hangupsource to sig_pri_queue_hangup()
made in https://gerrit.asterisk.org/c/asterisk/+/12857 casued
deadlocks when a hangup request was received from the core at the
same time a hanguprequest was received from the remote end via the
D channel.

Although the PRI's channel private structure was being unlocked
before setting the hangupsource, the PRI's own lock was still being
held during the process.  If channel actions were also coming from
the core, a deadlock on the PRI could result.  This deadlock could
then escalate to the entire DAHDI subsystem via DAHDI's global
interface list lock, especially if someone used the PRI CLI commands.

Fix:

* We now unlock the PRI as well as the PRI's channel private
  structure before setting the hangupsource, then relock both
  afterwards.

ASTERISK-28605
Reported by: Dirk Wendland

Change-Id: Id74aaa5d4e3746063dbe9deed188eb65193cb9c9

5 years agoapp_chanisavail.c: Simplify dialplan using ChanIsAvail.
Richard Mudgett [Mon, 30 Dec 2019 19:13:46 +0000 (13:13 -0600)] 
app_chanisavail.c: Simplify dialplan using ChanIsAvail.

Dialplan has to be careful about passing an empty device list or empty
positions in the list.  As a result, dialplan has to check for these
conditions before using ChanIsAvail.  Simplify dialplan by making
ChanIsAvail handle these conditions gracefully.

* Made tolerate empty positions in the device list.

* Simplified the code and eliminated some unnecessary indention.

ASTERISK-28638

Change-Id: I9e4b67e2cbf26b2417c2d03485b8568e898931d3

5 years agostasis.c: Use correct topic name in stasis_topic_pool_delete_topic
George Joseph [Thu, 2 Jan 2020 20:25:33 +0000 (13:25 -0700)] 
stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic

When a topic is created for an object, its name is only
<object>:<uniqueid>
For example:
bridge:cb68b3a8-fce7-4738-8a17-d7847562f020

When a topic is added to a pool, its name has the pool's topic
name prepended.  For example:
bridge:all/bridge:cb68b3a8-fce7-4738-8a17-d7847562f020

The topic_pool_entry's name however, is only what was passed
in to stasis_topic_pool_get_topic which is
bridge:cb68b3a8-fce7-4738-8a17-d7847562f020
That's actually correct because the entry is qualified by the
pool that's in.

When you're ready to delete the entry from the pool, you retrieve
the tropic name from the object but since it now has the pool's
topic name prepended, it won't be found in the pool container.

Fix:

* Modified stasis_topic_pool_delete_topic() to skip past the
pool topic's name, if it was prepended to the topic name,
before searching the container for a pool entry.

ASTERISK-28633
Reported by: Joeran Vinzens

Change-Id: I4396aa69dd83e4ab84c5b91b39293cfdbcf483e6

5 years agoapp_dial.c: Simplify dialplan using Dial.
Richard Mudgett [Mon, 30 Dec 2019 04:38:05 +0000 (22:38 -0600)] 
app_dial.c: Simplify dialplan using Dial.

Dialplan has to be careful about passing an empty destination list or
empty positions in the list.  As a result, dialplan has to check for
these conditions before using Dial.  Simplify dialplan by making Dial
handle these conditions gracefully.

* Made tolerate empty positions in the dialed device list.

* Reduced some message log levels from notice to verbose.

ASTERISK-28638

Change-Id: I6edc731aff451f8bdfaee5498078dd18c3a11ab9

5 years agoapp_page.c: Simplify dialplan using Page.
Richard Mudgett [Mon, 30 Dec 2019 02:41:30 +0000 (20:41 -0600)] 
app_page.c: Simplify dialplan using Page.

Dialplan has to be careful about passing an empty destination list or
empty positions in the list.  As a result, dialplan has to check for
these conditions before using Page.  Simplify dialplan by making Page
handle these conditions gracefully.

* Made tolerate empty positions in the paged device list.

* Reduced some warnings associated with the 's' option to verbose
messages.  The warning level for those messages really serves no purpose
as that is why the 's' option exists.

ASTERISK-28638

Change-Id: I95b64a6d6800cd1a25279c88889314ae60fc21e3

5 years agofeatures.c: Make Bridge application tolerate unspecified channel.
Richard Mudgett [Mon, 30 Dec 2019 00:36:54 +0000 (18:36 -0600)] 
features.c: Make Bridge application tolerate unspecified channel.

The Bridge application was inconsistent if the channel to bridge with is
not specified.  If no parameters are given then a warning is issued and
the current channel is hung up.  If options are given but no channel is
specified then a warning is issued and the current channel is not hung up.

* Made the Bridge application give a verbose message instead of a warning
if the channel to bridge with is not specified and made not hang up the
current channel.  As a result dialplan no longer needs to check if a
channel name is passed before calling Bridge and simply needs to check the
BRIDGERESULT channel variable instead.  This is something you likely want
your dialplan to do anyway.

* Fixed up L() option warning message.  It is up to the caller to
determine if the channel is hung up because of the warning.  Dial() hangs
up the current channel while Bridge() does not.

Change-Id: I44349a8dc3912397f28852777de04f19e7bb9c73

5 years agoapp_chanspy.c: Reduce log message level from notice to verbose.
Richard Mudgett [Sun, 29 Dec 2019 23:48:55 +0000 (17:48 -0600)] 
app_chanspy.c: Reduce log message level from notice to verbose.

Change-Id: Ica5f38ccd8cdc077aef14d0c50425e0b29ac7e0a

5 years agoapp_softhangup.c: Reduce unnecessary warning to verbose message.
Richard Mudgett [Sun, 29 Dec 2019 23:31:28 +0000 (17:31 -0600)] 
app_softhangup.c: Reduce unnecessary warning to verbose message.

Why log a warning for something your dialplan explicitly asked for?

Change-Id: I167b90daf4c7d75dd4b7ef94849f6cef05aa43a7

5 years agores_pjsip_config_wizard: Fix change detection for wizard settings
Sean Bright [Sun, 5 Jan 2020 16:00:46 +0000 (11:00 -0500)] 
res_pjsip_config_wizard: Fix change detection for wizard settings

ast_sorcery_changeset_create() is not commutative and will fail to detect
differences between two variable lists depending on what changed, so switch to
ast_variable_lists_match().

ASTERISK-28492 #close
Reported by: Jean-Denis Girard

Change-Id: I7b3256983ddfaa2138d3de92a444a53b5193a4e1

5 years agores_agi: Improve GET FULL VARIABLE documentation
Sean Bright [Fri, 3 Jan 2020 16:20:29 +0000 (11:20 -0500)] 
res_agi: Improve GET FULL VARIABLE documentation

ASTERISK-28673 #close
Reported by: Jonathan Harris

Change-Id: I591afdec669622bfa19243aabec31b579652c92f

5 years agowebsocket: Consider pending SSL data when waiting for socket input
Sean Bright [Tue, 26 Nov 2019 19:24:10 +0000 (14:24 -0500)] 
websocket: Consider pending SSL data when waiting for socket input

When TLS is in use, checking the readiness of the underlying FD is insufficient
for determining if there is data available to be read. So before polling the
FD, check if there is any buffered data in the TLS layer and use that first.

ASTERISK-28562 #close
Reported by: Robert Sutton

Change-Id: I95fcb3e2004700d5cf8e5ee04943f0115b15e10d

5 years agocontrib/valgrind: Fix use of frame-level suppression
Snuffy [Wed, 18 Dec 2019 00:20:49 +0000 (11:20 +1100)] 
contrib/valgrind: Fix use of frame-level suppression

Fix use of frame-level wildcard usage in suppression file.

ASTERISK-27243 #close
Reported-by: Richard Kenner
Change-Id: I1c0c64c5f305d2c9aa124e11f1f64a2eec52dc51

5 years agoMerge "func_odbc: acf_odbc_read() and cli_odbc_read() unicode support" into 17
Friendly Automation [Thu, 2 Jan 2020 15:40:12 +0000 (09:40 -0600)] 
Merge "func_odbc:  acf_odbc_read() and cli_odbc_read() unicode support" into 17

5 years agoMerge "res_fax: wrap v21 detected Asterisk initiated negotiation with config option...
Friendly Automation [Thu, 2 Jan 2020 14:38:49 +0000 (08:38 -0600)] 
Merge "res_fax: wrap v21 detected Asterisk initiated negotiation with config option" into 17

5 years agofunc_odbc: acf_odbc_read() and cli_odbc_read() unicode support
Boris P. Korzun [Wed, 28 Aug 2019 10:07:13 +0000 (20:07 +1000)] 
func_odbc:  acf_odbc_read() and cli_odbc_read() unicode support

Added ast_odbc_ast_str_SQLGetData() considers SQL_DESC_OCTET_LENGTH
column attribute for correct allocating the buffer.

ASTERISK-28497 #close

Change-Id: I50e86c8a277996f13d4a4b9b318ece0d60b279bf

5 years agoMerge "chan_sip: voice frames are no longer transmitted after emitting a COLP" into 17
George Joseph [Tue, 31 Dec 2019 14:39:04 +0000 (08:39 -0600)] 
Merge "chan_sip: voice frames are no longer transmitted after emitting a COLP" into 17

5 years agochan_sip: voice frames are no longer transmitted after emitting a COLP
Jean Aunis [Tue, 3 Dec 2019 11:58:26 +0000 (12:58 +0100)] 
chan_sip: voice frames are no longer transmitted after emitting a COLP

The SIP transaction state was reset when emitting an UPDATE or a re-INVITE
related to a COLP, preventing RTP packets to be emitted.

ASTERISK-28647

Change-Id: Ie7a30fa7a97f711e7ba6cc17f221a0993d48bd8b

5 years agodb: Initialize condition primitive before use
Sean Bright [Fri, 27 Dec 2019 23:29:45 +0000 (18:29 -0500)] 
db: Initialize condition primitive before use

The db_init() function ultimately calls db_sync() which signals the
condition before it is initialized.

Change-Id: Id4a4e025b637bc4ac7d90557fcb71d56598892ab

5 years agoMerge "config.c: Skip UTF-8 BOMs if present when reading config files" into 17
George Joseph [Fri, 27 Dec 2019 19:12:47 +0000 (13:12 -0600)] 
Merge "config.c: Skip UTF-8 BOMs if present when reading config files" into 17

5 years agoMerge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR." into 17
Joshua C. Colp [Fri, 20 Dec 2019 00:39:53 +0000 (18:39 -0600)] 
Merge "app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR." into 17

5 years agoMerge "confbridge: Add support for specifying maximum sample rate." into 17
Joshua C. Colp [Fri, 20 Dec 2019 00:38:49 +0000 (18:38 -0600)] 
Merge "confbridge: Add support for specifying maximum sample rate." into 17

5 years agoMerge "main/file.c: Limit media cache usage to remote files." into 17
Friendly Automation [Thu, 19 Dec 2019 17:23:36 +0000 (11:23 -0600)] 
Merge "main/file.c: Limit media cache usage to remote files." into 17

5 years agoMerge "chan_sip: in case of tcp/tls, be less annoying about tx errors." into 17
Friendly Automation [Thu, 19 Dec 2019 16:28:33 +0000 (10:28 -0600)] 
Merge "chan_sip:  in case of tcp/tls, be less annoying about tx errors." into 17

5 years agoconfig.c: Skip UTF-8 BOMs if present when reading config files
Sean Bright [Wed, 18 Dec 2019 15:13:21 +0000 (10:13 -0500)] 
config.c: Skip UTF-8 BOMs if present when reading config files

ASTERISK-28667 #close

Change-Id: I4767ed365c98f3e1587b7653321048a31d8a53b2

5 years agomain/file.c: Limit media cache usage to remote files.
Kevin Reeves [Thu, 21 Nov 2019 18:48:42 +0000 (12:48 -0600)] 
main/file.c: Limit media cache usage to remote files.

When testing for the existance of a file, the media cache is searched even if
the file has no chance of being in it.  This can cause performance issues
as the media cache size increases.

As a result, calls to applications like Read and Playback using local files
must scan through the media cache before playing.  Under load and with a
large cache, this can delay the playback of those files.

This patch updates the function that checks for the existance of a file to
only consult the media cache database if the requested file is a remote path.
It introduces a new is_remote_path() function in main/file.c.

ASTERISK-28625  #close
Reported-by: kevin@phoneburner.com
Change-Id: If91137493732d9034dafa381c081c69274a7dcc9

5 years agoMerge "res_rtp_asterisk: Add frame list cleanups to ast_rtp_read" into 17
George Joseph [Wed, 18 Dec 2019 14:58:13 +0000 (08:58 -0600)] 
Merge "res_rtp_asterisk:  Add frame list cleanups to ast_rtp_read" into 17

5 years agoMerge "sip_to_pjsip.py: Fix trustrpid typo" into 17
Friendly Automation [Wed, 18 Dec 2019 13:26:25 +0000 (07:26 -0600)] 
Merge "sip_to_pjsip.py: Fix trustrpid typo" into 17

5 years agoMerge "configure: Add check for MySQL client bool and my_bool type usage." into 17
Joshua C. Colp [Wed, 18 Dec 2019 12:37:56 +0000 (06:37 -0600)] 
Merge "configure: Add check for MySQL client bool and my_bool type usage." into 17

5 years agoMerge "res_pjsip_session: Set stream state on created streams for incoming SDP."...
Joshua C. Colp [Wed, 18 Dec 2019 11:46:16 +0000 (05:46 -0600)] 
Merge "res_pjsip_session: Set stream state on created streams for incoming SDP." into 17

5 years agosip_to_pjsip.py: Fix trustrpid typo
Pascal Cadotte Michaud [Tue, 17 Dec 2019 13:38:45 +0000 (08:38 -0500)] 
sip_to_pjsip.py: Fix trustrpid typo

ASTERISK-28664 #close

Change-Id: I6c28b1002fd7075ae0ed36f026f8c1855c9418a6

5 years agoapp_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR.
Frederic LE FOLL [Wed, 27 Nov 2019 17:34:24 +0000 (18:34 +0100)] 
app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR.

Temporary channel lifespan is very short and CDR deactivation request
through ast_cdr_set_property() may happen when CDR is not available
yet. Use CDR_PROP() dialplan function instead, it will first wait
for pending CDR insertion requests to be processed.

ASTERISK-28636

Change-Id: I1cbe09e8d2169c0962c1195133ff260d291f2074

5 years agoconfigure: Add check for MySQL client bool and my_bool type usage.
Joshua C. Colp [Mon, 16 Dec 2019 12:35:31 +0000 (08:35 -0400)] 
configure: Add check for MySQL client bool and my_bool type usage.

Instead of trying to use the defined MySQL client version from the
header use a configure check to determine whether the bool or my_bool
type should be used for defining a boolean.

ASTERISK-28604

Change-Id: Id2225b3785115de074c50c123ff1a68005b4a9c7

5 years agoMerge "res_pjsip_nat: Restore original contact for REGISTER responses" into 17
Friendly Automation [Mon, 16 Dec 2019 16:28:01 +0000 (10:28 -0600)] 
Merge "res_pjsip_nat: Restore original contact for REGISTER responses" into 17

5 years agoconfbridge: Add support for specifying maximum sample rate.
Joshua C. Colp [Thu, 12 Dec 2019 00:03:46 +0000 (00:03 +0000)] 
confbridge: Add support for specifying maximum sample rate.

ConfBridge has the ability to move between different sample
rates for mixing the conference bridge. Up until now there has
only been the ability to set the conference bridge to mix at
a specific sample rate, or to let it move between sample rates
as necessary. This change adds the ability to configure a
conference bridge with a maximum sample rate so it can move
between sample rates but only up to the configured maximum.

ASTERISK-28658

Change-Id: Idff80896ccfb8a58a816e4ce9ac4ebde785963ee

5 years agoMerge "PJSIP_CONTACT: add missing argument documentation" into 17
Friendly Automation [Mon, 16 Dec 2019 12:56:51 +0000 (06:56 -0600)] 
Merge "PJSIP_CONTACT: add missing argument documentation" into 17

5 years agoMerge "ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging...
Joshua Colp [Mon, 16 Dec 2019 12:04:59 +0000 (06:04 -0600)] 
Merge "ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging." into 17

5 years agores_pjsip_session: Set stream state on created streams for incoming SDP.
Joshua C. Colp [Mon, 16 Dec 2019 11:23:07 +0000 (07:23 -0400)] 
res_pjsip_session: Set stream state on created streams for incoming SDP.

A previous review, 13174, made a change whereby on an incoming offer SDP
the pending topology was initialized to the configured. This caused a problem
for bundle with WebRTC where bundle could reference a stream that did not
actually exist if the configuration had both audio and video but the
offer SDP only contained audio.

This change undoes that review and instead fixes the original problem it
sought to solve by setting the state of created streams based on the
contents of the offer SDP. This way the stream state is not inactive
until negotiation later completes.

ASTERISK-28659

Change-Id: Ic5ae5a86437d3e686ac5afd91d133cc916198355

5 years agores_fax: wrap v21 detected Asterisk initiated negotiation with config option
Kevin Harwell [Fri, 13 Dec 2019 19:46:17 +0000 (13:46 -0600)] 
res_fax: wrap v21 detected Asterisk initiated negotiation with config option

A previous patch:

Gerrit Change-Id: I73bb24799bfe1a48adae9c034a2edbae54cc2a39

made it so a T.38 Gateway tries to negotiate with both sides by sending T.38
negotiation request to both endpoints supported T.38 versus the previous
behavior of forwarding negotiation to the "other" channel once a preamble
was detected.

This had the unfortunate side effect of breaking some setups. Specifically
ones that set the max datagram option on an endpoint configuration (configured
max datagram was not propagated since Asterisk now initiates negotiations).

This patch adds a configuration option, "negotiate_both", that when enabled
makes it so Asterisk initiates the negotiation requests to both endpoints vs.
the previous behavior of waiting, and forwarding the request.

The default is disabled keeping with the old behavior.

ASTERISK-28660

Change-Id: I5deb875f3485e20bc75119ec743090655d864a1a

5 years agoUpdate CHANGES and UPGRADE.txt for 17.1.0
Asterisk Development Team [Thu, 12 Dec 2019 11:04:48 +0000 (06:04 -0500)] 
Update CHANGES and UPGRADE.txt for 17.1.0

5 years agoACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging.
Jaco Kroon [Wed, 4 Dec 2019 08:35:52 +0000 (10:35 +0200)] 
ACL: ast_apply_acl_nolog - identical to ast_apply_acl but without logging.

Due to use in res_rtp_asterisk there is a need to be able to apply an
ACL without logging any invalid/denies.  It's probably sensible to at
least validate the ACL once directly after load and report invalid ACLs.

Change-Id: I256169229d945ca7c1bbf228fc492d91df345843
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
5 years agoPJSIP_CONTACT: add missing argument documentation
Pascal Cadotte Michaud [Wed, 11 Dec 2019 16:52:31 +0000 (11:52 -0500)] 
PJSIP_CONTACT: add missing argument documentation

add missing argument "rtt" and "status" to the documentation

The change to the dtd file allow an enumlist to contain one or many
configOptionToEnum or enum.

This is different from the previous patch I submitted when you could have a
configOptionToEnum or (a configOptionToEnum followed by one or manu enums) or
(one or many enums)

ASTERISK-28626

Change-Id: Ia71743ee7ec813f40297b0ddefeee7909db63b6d

5 years agoMerge "Revert "PJSIP_CONTACT: add missing argument documentation"" into 17
George Joseph [Wed, 11 Dec 2019 16:36:42 +0000 (10:36 -0600)] 
Merge "Revert "PJSIP_CONTACT: add missing argument documentation"" into 17

5 years agoRevert "PJSIP_CONTACT: add missing argument documentation"
Joshua Colp [Wed, 11 Dec 2019 13:01:23 +0000 (07:01 -0600)] 
Revert "PJSIP_CONTACT: add missing argument documentation"

This reverts commit 450173a0ae3aace0bbdcbfbcd336c5069747b0d1.

Reason for revert: Regression in XML validation.

validity error : Content model of enumlist is not determinist:
(configOptionToEnum | (configOptionToEnum , enum+) | enum+)

As we are preparing to do releases and this is not critical
I am reverting this for now until resolved.

Change-Id: I47a6714bb555b35a371861d434daf5b97c0cdcbd

5 years agores_rtp_asterisk: Add frame list cleanups to ast_rtp_read
George Joseph [Wed, 4 Dec 2019 21:01:22 +0000 (14:01 -0700)] 
res_rtp_asterisk:  Add frame list cleanups to ast_rtp_read

In Asterisk 16+, there are a few places in ast_rtp_read where we've
allocated a frame list but return a null frame instead of the list.
In these cases, any frames left in the list won't be freed.  In the
vast majority of the cases, the list is empty when we return so
there's nothing to free but there have been leaks reported in the
wild that can be traced back to frames left in the list before
returning.

The escape paths now all have logic to free frames left in the
list.

ASTERISK-28609
Reported by: Ted G

Change-Id: Ia1d7075857ebd26b47183c44b1aebb0d8f985f7a

5 years agoMerge "res_pjsip_registrar.c: Prevent potential double free if AOR is not found"...
Friendly Automation [Mon, 9 Dec 2019 16:34:41 +0000 (10:34 -0600)] 
Merge "res_pjsip_registrar.c: Prevent potential double free if AOR is not found" into 17

5 years agochan_sip: in case of tcp/tls, be less annoying about tx errors.
Jaco Kroon [Wed, 4 Dec 2019 14:35:35 +0000 (16:35 +0200)] 
chan_sip:  in case of tcp/tls, be less annoying about tx errors.

chan_sip.c:3782 __sip_xmit: sip_xmit of 0x7f1478069230 (len 600) to
213.150.203.60:1492 returned -2: Interrupted system call

returned -2 implies this wasn't actually an OS error, so errno makes no
sense either.  Internal error was already logged higher up, and -2
generally means that either there isn't a valid connection available, or
the pipe notification failed, and that is already correctly logged.

ASTERISK-28651 #close

Change-Id: I46eb82924beeff9dfd86fa6c7eb87d2651b950f2
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
5 years agoMerge "app_queue: Fix old confusing comment about when the members are called" into 17
Friendly Automation [Fri, 6 Dec 2019 19:27:59 +0000 (13:27 -0600)] 
Merge "app_queue: Fix old confusing comment about when the members are called" into 17

5 years agores_pjsip_nat: Restore original contact for REGISTER responses
George Joseph [Mon, 26 Aug 2019 02:20:13 +0000 (20:20 -0600)] 
res_pjsip_nat: Restore original contact for REGISTER responses

RFC3261 Section 10 "Registrations", specifically paragraph
"10.2.4: Refreshing Bindings", states that a user agent compares
each contact address (in a 200 REGISTER response) to see if it
created the contact.  If the Asterisk endpoint has the
rewrite_contact option set however, the contact host and port sent
back in the 200 response will be the rewritten one and not the
one sent by the user agent.  This prevents the user agent from
matching its own contact.  Some user agents get very upset when
this happens and will not consider the registration successful.
While this is rare, it is acceptable behavior especially if more
than 1 user agent is allowed to register to a single endpoint/aor.

This commit updates res_pjsip_nat (where rewrite_contact is
implemented) to store the original incoming Contact header in
a new "x-ast-orig-host" URI parameter before rewriting it, and to
restore the original host and port to the Contact headers in the
outgoing response.

This is only done if the request is a REGISTER and rewrite_contact
is enabled.

pjsip_message_filter was also updated to ensure that if a request
comes in with any existing x-ast-* URI parameters, we remove them
so they don't conflict.  Asterisk will never send a request
with those headers in it but someone might just decide to add them
to a request they craft and send to Asterisk.

NOTE: If a device changes its contact address and registers again,
it's a NEW registration.  If the device didn't unregister the
original registration then all existing behavior based
on aor/remove_existing and aor/max_contacts apply.

ASTERISK-28502
Reported-by: Ross Beer
Change-Id: Idc263ad2d2d7bd8faa047e5804d96a5fe1cd282e

5 years agoMerge "channel.c: Resolve issue with receiving SIP INFO packets for DTMF" into 17
George Joseph [Fri, 6 Dec 2019 18:41:09 +0000 (12:41 -0600)] 
Merge "channel.c: Resolve issue with receiving SIP INFO packets for DTMF" into 17

5 years agoMerge "res_pjsip_outbound_registration: add support for SRV failover" into 17
Friendly Automation [Fri, 6 Dec 2019 15:35:43 +0000 (09:35 -0600)] 
Merge "res_pjsip_outbound_registration: add support for SRV failover" into 17

5 years agoMerge "res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases...
Friendly Automation [Fri, 6 Dec 2019 15:09:02 +0000 (09:09 -0600)] 
Merge "res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases" into 17

5 years agoMerge "PJSIP_CONTACT: add missing argument documentation" into 17
Friendly Automation [Thu, 5 Dec 2019 00:45:22 +0000 (18:45 -0600)] 
Merge "PJSIP_CONTACT: add missing argument documentation" into 17

5 years agoMerge "chan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime...
Friendly Automation [Thu, 5 Dec 2019 00:02:33 +0000 (18:02 -0600)] 
Merge "chan_sip+native_bridge_rtp: no directmedia for ptime other than default ptime." into 17

5 years agoMerge "res_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled" into 17
Friendly Automation [Wed, 4 Dec 2019 23:45:05 +0000 (17:45 -0600)] 
Merge "res_pjsip_session.c: Prevent use-after-free with TEST_FRAMEWORK enabled" into 17

5 years agoMerge "parking: Fall back to parker channel name even if it matches parkee." into 17
Friendly Automation [Wed, 4 Dec 2019 23:07:48 +0000 (17:07 -0600)] 
Merge "parking: Fall back to parker channel name even if it matches parkee." into 17

5 years agores_pjsip_registrar.c: Prevent potential double free if AOR is not found
Sean Bright [Wed, 4 Dec 2019 21:26:46 +0000 (16:26 -0500)] 
res_pjsip_registrar.c: Prevent potential double free if AOR is not found

The simple fix here is simply to NULL out username and password after we call
ast_free on them. Unfortunately, I noticed that we weren't checking for
allocation failures for username and password, and adding those checks made
things noisy and cumbersome.

So instead we partially rollback the recent LGTM patch, and move the alloca
calls into find_aor_name().

ASTERISK-28641 #close
Reported by: Ross Beer

Change-Id: Ic9d01624e717a020be0b0aee31f0814e7f1ffbe2

5 years agores_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases
Sean Bright [Wed, 4 Dec 2019 21:12:39 +0000 (16:12 -0500)] 
res_pjsip_registrar.c: Prevent possible buffer overflow with domain aliases

We're appropriately sizing the id_domain_alias buffer, but then copying the data
into the id_domain one. We were then using the uninitialized id_domain_alias
buffer we just allocated.

This is ASTERISK~28641 adjacent, but significant enough to warrant its own
patch.

Change-Id: I81c38724d18deab8c6573153e2b99dbb6e2f33d9