]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
5 years agoinstall_prereq: Install aptitude non-interactively
Sylvain Afchain [Wed, 5 Feb 2020 08:26:58 +0000 (09:26 +0100)] 
install_prereq: Install aptitude non-interactively

Currently aptitude is installed using interactive mode. This patch
changes this to use the non-interactive mode as it can block
automatic dependencies installation, ex: CI, Docker build.

ASTERISK-28726 #close

Change-Id: I271ee00d230513a6f044810351a32d83b2181133
(cherry picked from commit 0c02d0a4500cbd4f657c26eb609928c110ebccb9)

5 years agomessage.c: Add option to suppress the Message channel AMI and ARI events
George Joseph [Mon, 3 Feb 2020 16:24:58 +0000 (09:24 -0700)] 
message.c: Add option to suppress the Message channel AMI and ARI events

In order to reduce the amount of AMI and ARI events generated,
the global "Message/ast_msg_queue" channel can be set to suppress
it's normal channel housekeeping events such as "Newexten",
"VarSet", etc. This can greatly reduce load on the manager
and ARI applications when the Digium Phone Module for Asterisk
is in use.  To enable, set "hide_messaging_ami_events" in
asterisk.conf to "yes"  In Asterisk versions <18, the default
is "no" preserving existing behavior.  Beginning with
Asterisk 18, the option will default to "yes".

NOTE:  This change does not affect UserEvents or the ARI
TextMessageReceived events.

* Added the "hide_messaging_ami_events" option to asterisk.conf.

* Changed message.c to set the AST_CHAN_TP_INTERNAL property on
  the "Message/ast_msg_queue" channel if the option is set in
  asterisk.conf.  This suppresses the reporting of the events.

Change-Id: Ia2e3516d43f4e0df994fc6598565d6bba2d7018b

5 years agoMerge "res_pjsip_messaging: Allow Content-Type to be overridden" into 17
Joshua Colp [Mon, 3 Feb 2020 12:11:56 +0000 (06:11 -0600)] 
Merge "res_pjsip_messaging: Allow Content-Type to be overridden" into 17

5 years agoMerge "res_stasis: trigger cleanup after update" into 17
Friendly Automation [Thu, 30 Jan 2020 16:02:40 +0000 (10:02 -0600)] 
Merge "res_stasis: trigger cleanup after update" into 17

5 years agoMerge "res_pjsip_pubsub: Increment persistence data ref when recreating." into 17
George Joseph [Thu, 30 Jan 2020 15:22:21 +0000 (09:22 -0600)] 
Merge "res_pjsip_pubsub: Increment persistence data ref when recreating." into 17

5 years agoMerge "stasis/app: don't lock an app before a call to send" into 17
Friendly Automation [Thu, 30 Jan 2020 15:14:56 +0000 (09:14 -0600)] 
Merge "stasis/app: don't lock an app before a call to send" into 17

5 years agoMerge "res_pjsip_messaging: Ensure MESSAGE_SEND_STATUS is set properly" into 17
Friendly Automation [Tue, 28 Jan 2020 16:22:09 +0000 (10:22 -0600)] 
Merge "res_pjsip_messaging: Ensure MESSAGE_SEND_STATUS is set properly" into 17

5 years agores_pjsip_pubsub: Increment persistence data ref when recreating.
Joshua C. Colp [Tue, 28 Jan 2020 15:18:45 +0000 (15:18 +0000)] 
res_pjsip_pubsub: Increment persistence data ref when recreating.

Each subscription needs to have a reference to the persisted data
for it, as well as the main JSON contained within the tree. When
recreating a subscription this did not occur and they both shared
the same reference.

ASTERISK-28714

Change-Id: I706abd49ea182ea367a4ac3feca2706460ae9f4a

5 years agores_pjsip_messaging: Allow Content-Type to be overridden
Sean Bright [Tue, 28 Jan 2020 01:58:53 +0000 (20:58 -0500)] 
res_pjsip_messaging: Allow Content-Type to be overridden

ASTERISK-26082 #close
Reported by: Alex

Change-Id: I6549e90932016349bc72b0f053432dc25286f4fb

5 years agoMerge "chan_sip: Always process updated SDP on media source change" into 17
Friendly Automation [Tue, 28 Jan 2020 00:27:52 +0000 (18:27 -0600)] 
Merge "chan_sip: Always process updated SDP on media source change" into 17

5 years agostasis/app: don't lock an app before a call to send
Kevin Harwell [Mon, 27 Jan 2020 18:01:15 +0000 (12:01 -0600)] 
stasis/app: don't lock an app before a call to send

Calling 'app_send' eventually calls the app's message handler. It's possible
for a handler to obtain a lock on another object, and then need/want to lock
the app object. If the caller of 'app_send' locks the app object prior to
calling then there's a potential for a deadlock, if another thread calls
'app_send' without locking.

This patch makes it so 'app_send' is not called with the app object locked in
the section of code doing such.

ASTERISK-28423 #close

Change-Id: I6767c6d0933c7db1b984018966eefca4c0638a27

5 years agores_stasis: trigger cleanup after update
Kevin Harwell [Mon, 27 Jan 2020 17:44:45 +0000 (11:44 -0600)] 
res_stasis: trigger cleanup after update

The cleanup code in stasis shuts down applications if they are in a deactivated
state, and no longer have explicit subscriptions. When registering an app the
cleanup code was running before calling 'update'. When it should be executed
after 'update' since a call to register may re-activate the app. We don't want
it to shutdown before the 'update' otherwise the app won't be re-activated,
or registered.

This patch makes it so the cleanup code is executed post 'update'.

ASTERISK-28679 #close

Change-Id: I8f2c0b17e33bb8128441567b97fd4c7bf74a327b

5 years agores_pjsip_messaging: Ensure MESSAGE_SEND_STATUS is set properly
Sean Bright [Mon, 27 Jan 2020 14:03:38 +0000 (09:03 -0500)] 
res_pjsip_messaging: Ensure MESSAGE_SEND_STATUS is set properly

We need to wait for the message sending callback to finish to know if
we succeeded or failed.

ASTERISK-25421 #close
Reported by:  Dmitriy Serov

Change-Id: I22b954398821d2caf4c6fe58f0607c8cfa378059

5 years agochan_sip: Always process updated SDP on media source change
Walter Doekes [Mon, 13 Jan 2020 10:13:41 +0000 (11:13 +0100)] 
chan_sip: Always process updated SDP on media source change

Fixes no-audio issues when the media source is changed and
strictrtp is enabled (default).

If the peer media source changes, the SDP session version also changes.
If it is lower than the one we had stored, chan_sip would ignore it.

This changeset keeps track of the remote media origin identifier,
comparing that as well. If it changes, the session version needn't be
higher for us to accept the SDP.

Common scenario where this would've caused problems: a separate media
gateway that informs the caller about premium rates before handing off
the call to the final destination.

(An alternative fix would be to set ignoresdpversion=yes on the peer.)

ASTERISK-28686

Change-Id: I88fdbc5aeb777b583e7738c084254c482a7776ee

5 years agochan_pjsip: Ignore RTP that we haven't negotiated
Sean Bright [Thu, 23 Jan 2020 15:06:35 +0000 (10:06 -0500)] 
chan_pjsip: Ignore RTP that we haven't negotiated

If chan_pjsip receives an RTP packet whose payload differs from the
channel's native format, and asymmetric_rtp_codec is disabled (the
default), Asterisk will switch the channel's native format to match
that of the incoming packet without regard to the negotiated payloads.

We now check that the received frame is in a format we have negotiated
before switching payloads which results in these packets being dropped
instead of causing the session to terminate.

ASTERISK-28139 #close
Reported by: Paul Brooks

Change-Id: Icc3b85cee1772026cee5dc1b68459bf9431c14a3

5 years agoUpdate CHANGES and UPGRADE.txt for 17.2.0
Asterisk Development Team [Thu, 23 Jan 2020 16:15:46 +0000 (11:15 -0500)] 
Update CHANGES and UPGRADE.txt for 17.2.0

5 years agoMerge "http: Add ability to disable /httpstatus URI" into 17
Friendly Automation [Thu, 23 Jan 2020 14:48:37 +0000 (08:48 -0600)] 
Merge "http: Add ability to disable /httpstatus URI" into 17

5 years agocdr.c: Set event time on party b when leaving a parking bridge
George Joseph [Wed, 22 Jan 2020 18:56:38 +0000 (11:56 -0700)] 
cdr.c: Set event time on party b when leaving a parking bridge

When Alice calls Bob and Bob does a blind transfer to Charlie,
Bob's bridge leave event generates a finalize on both the party_a
and party_b CDRs but while the party_a CDR has the correct end time
set from the event time, party_b's leg did not. This caused that
CDR's end time to be equal to the answered time and resulted in a
billsec of 0.

* We now pass the bridge leave message event time to
cdr_object_party_b_left_bridge_cb() and set it on that CDR before
calling cdr_object_finalize() on it.

NOTE:  This issue affected transfers using chan_sip most of the
time but also occasionally affected chan_pjsip probably due to
message timing.

ASTERISK-28677
Reported by: Maciej Michno

Change-Id: I790720f1e7326f9b8ce8293028743b0ef0fb2cca

5 years agohttp: Add ability to disable /httpstatus URI
Sean Bright [Wed, 22 Jan 2020 15:39:47 +0000 (10:39 -0500)] 
http: Add ability to disable /httpstatus URI

Add a new configuration option 'enable_status' which allows the
/httpstatus URI handler to be administratively disabled.

We also no longer unconditionally register the /static and /httpstatus
URI handlers, but instead do it based upon configuration.

Behavior change: If enable_static was turned off, the URI handler was
still installed but returned a 403 when it was accessed. Because we
now register/unregister the URI handlers as appropriate, if the
/static URI is disabled we will return a 404 instead.

Additionally:

* Change 'enablestatic' to 'enable_static' but keep the former for
  backwards compatibility.
* Improve some internal variable names

ASTERISK-28710 #close

Change-Id: I647510f796473793b1d3ce1beb32659813be69e1

5 years agoMerge "func_odbc.conf.sample: Add example lookup" into 17
Friendly Automation [Wed, 22 Jan 2020 15:21:57 +0000 (09:21 -0600)] 
Merge "func_odbc.conf.sample: Add example lookup" into 17

5 years agoMerge "res_statsd: Document that res_statsd does nothing on its own" into 17
Friendly Automation [Wed, 22 Jan 2020 14:43:01 +0000 (08:43 -0600)] 
Merge "res_statsd: Document that res_statsd does nothing on its own" into 17

5 years agoMerge "translate.c: Fix silk 24kHz truncation in 'core show translation'" into 17
Friendly Automation [Wed, 22 Jan 2020 13:51:05 +0000 (07:51 -0600)] 
Merge "translate.c: Fix silk 24kHz truncation in 'core show translation'" into 17

5 years agoMerge "chan_dahdi: Change 999999 to INT_MAX to better reflect "no timeout"" into 17
Joshua Colp [Wed, 22 Jan 2020 13:49:04 +0000 (07:49 -0600)] 
Merge "chan_dahdi: Change 999999 to INT_MAX to better reflect "no timeout"" into 17

5 years agoMerge "chan_sip.c: Stop handling continuation lines after reading headers" into 17
Friendly Automation [Tue, 21 Jan 2020 14:25:33 +0000 (08:25 -0600)] 
Merge "chan_sip.c: Stop handling continuation lines after reading headers" into 17

5 years agochan_dahdi: Change 999999 to INT_MAX to better reflect "no timeout"
Andrew Siplas [Sat, 18 Jan 2020 21:54:01 +0000 (16:54 -0500)] 
chan_dahdi: Change 999999 to INT_MAX to better reflect "no timeout"

The no-entry timeout set to 999999 == 16⅔ minutes, change to INT_MAX
to match behavior of "no timeout" defined in comment.

ASTERISK-28702 #close

Change-Id: I4ea015986e061374385dba247b272f7aac60bf11

5 years agotranslate.c: Fix silk 24kHz truncation in 'core show translation'
Sean Bright [Mon, 20 Jan 2020 19:53:46 +0000 (14:53 -0500)] 
translate.c: Fix silk 24kHz truncation in 'core show translation'

SILK @ 24kHz is not shown in the 'core show translation' output because of an
off-by-one-error. Discovered while looking into ASTERISK~19871.

ASTERISK-28706
Reported by: Sean Bright

Change-Id: Ie1a551a8a484e07b45c8699cc0c90f1061029510

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 agores_statsd: Document that res_statsd does nothing on its own
Sean Bright [Mon, 20 Jan 2020 17:18:17 +0000 (12:18 -0500)] 
res_statsd: Document that res_statsd does nothing on its own

ASTERISK-24484 #close
Reported by: Dan Jenkins

Change-Id: I05f298904511d6739aefb1486b6fcbee27efa9ec

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 agochan_sip.c: Stop handling continuation lines after reading headers
Sean Bright [Thu, 16 Jan 2020 15:09:47 +0000 (10:09 -0500)] 
chan_sip.c: Stop handling continuation lines after reading headers

lws2sws() does not stop trying to handle header continuation lines
even after all headers have been found. This is problematic if the
first character of a SIP message body is a space or tab character, so
we update to recognize the end of the message header.

ASTERISK-28693 #close
Reported by: Frank Matano

Change-Id: Idec8fa58545cd3fd898cbe0075d76c223f8d33df

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