Commit Graph

31294 Commits

Author SHA1 Message Date
Friendly Automation
b0b229f63c Merge "http: Add ability to disable /httpstatus URI" into 13 2020-01-23 08:43:26 -06:00
George Joseph
4eb2ad5e17 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
2020-01-22 11:56:38 -07:00
Sean Bright
b6ebdabd9c 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
2020-01-22 11:10:08 -05:00
Friendly Automation
9d6c4f437d Merge "func_odbc.conf.sample: Add example lookup" into 13 2020-01-22 08:37:49 -06:00
Friendly Automation
0d9173974e Merge "res_statsd: Document that res_statsd does nothing on its own" into 13 2020-01-22 08:27:49 -06:00
Joshua Colp
63a629c360 Merge "chan_dahdi: Change 999999 to INT_MAX to better reflect "no timeout"" into 13 2020-01-22 07:46:16 -06:00
Joshua Colp
eb78eec8ed Merge "translate.c: Fix silk 24kHz truncation in 'core show translation'" into 13 2020-01-22 07:45:59 -06:00
Friendly Automation
f5128d610d Merge "chan_sip.c: Stop handling continuation lines after reading headers" into 13 2020-01-21 08:20:21 -06:00
Sean Bright
ca7309fd29 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
2020-01-20 15:57:58 -06:00
Sean Bright
14de6b9ba7 func_odbc.conf.sample: Add example lookup
Change-Id: Ia05aab1f579597963d2ea23920d2210cfcb97c84
2020-01-20 16:26:14 -05:00
Sean Bright
9382718f50 res_statsd: Document that res_statsd does nothing on its own
ASTERISK-24484 #close
Reported by: Dan Jenkins

Change-Id: I05f298904511d6739aefb1486b6fcbee27efa9ec
2020-01-20 12:59:06 -05:00
Friendly Automation
537645d28c Merge "queue_log: Add alembic script for generate db table for queue_log" into 13 2020-01-20 11:23:49 -06:00
Joshua Colp
073d67ece0 Merge "app_voicemail, say: Fix various leading whitespace problems" into 13 2020-01-20 09:32:18 -06:00
Rodrigo Ramírez Norambuena
5c5bf49cb1 queue_log: Add alembic script for generate db table for queue_log
Change-Id: I35b928a6251f9da9a1742b2cd14c63a00c3d0f0c
2020-01-20 09:16:23 -06:00
Friendly Automation
46dc85f207 Merge "app_voicemail: Prevent crash when saving message with realtime voicemail" into 13 2020-01-20 09:10:58 -06:00
Joshua Colp
84670cd9aa Merge "pbx.c: Include filesystem cache in free memory calculation" into 13 2020-01-20 07:09:53 -06:00
Andrew Siplas
419fd1da11 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
2020-01-18 16:54:01 -05:00
Friendly Automation
0f89e6e4c0 Merge "res_realtime: Fix 'realtime update2' argument handling" into 13 2020-01-17 08:33:23 -06:00
Joshua Colp
5e30a3e7ee Merge "app_voicemail: Set globals to default values when voicemail.conf missing" into 13 2020-01-17 08:32:07 -06:00
Sean Bright
ee05a43951 app_voicemail, say: Fix various leading whitespace problems
In af90afd90c, 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
2020-01-16 14:55:18 -05:00
Sean Bright
884b86e7c0 pbx.c: Include filesystem cache in free memory calculation
ASTERISK-28695 #close
Reported by: Kevin Flyn

Change-Id: Ief098bb6eb77378daeace8f97ba30701c8de55b8
2020-01-16 13:37:44 -05:00
Sean Bright
d514fa3300 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
2020-01-16 10:16:23 -05:00
Sean Bright
6906e0aa3c 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
2020-01-15 16:52:00 -05:00
Joshua Colp
9ba3bddd37 Merge "res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY" into 13 2020-01-15 06:44:23 -06:00
Joshua Colp
3a135e5827 Merge "app_queue: Deprecate the QueueMemberPause.Reason field" into 13 2020-01-15 06:43:56 -06:00
Sean Bright
d0a412fced 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
2020-01-14 17:30:34 -05:00
Sean Bright
1a4fcaadb2 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
2020-01-14 13:51:18 -06:00
Joshua Colp
9b22061e2c Merge "res_pjsip_endpoint_identifier_ip: Document support for hostnames" into 13 2020-01-14 12:44:30 -06:00
Joshua Colp
a902641833 Merge "func_curl: Add 'followlocation' option to CURLOPT()" into 13 2020-01-14 12:29:48 -06:00
Sean Bright
5e868fc11f res_realtime: Fix 'realtime update2' argument handling
The change in 9b99ef50b5 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
2020-01-14 11:05:29 -05:00
Joshua Colp
8bf22b8abb Merge "app_record: Do not hang up if beep audio is missing" into 13 2020-01-14 09:10:16 -06:00
Joshua Colp
0d1fcf0626 Merge "netsock2: ast_addressfamily_to_sockaddrsize and ast_sockaddr_from_sockaddr." into 13 2020-01-14 09:08:13 -06:00
Sean Bright
53967ebd0f 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
2020-01-13 08:25:03 -06:00
Sean Bright
b8963987a6 res_pjsip_endpoint_identifier_ip: Document support for hostnames
ASTERISK-25429 #close
Reported by: Joshua C. Colp

Change-Id: I7cdfc6026821636acc2465094b7fcde8471a3824
2020-01-10 16:13:49 -05:00
Sean Bright
6648472a28 res_pjsip_notify: Only allow a single Event header to be added to a NOTIFY
ASTERISK-27775 #close
Reported by: AvayaXAsterisk

Change-Id: Iad158e908e34675ad98f74d09c5e73024e50c257
2020-01-10 15:49:44 -05:00
Friendly Automation
3e446508b4 Merge "netsock2: backport ast_sockaddr_copy_sockaddr to asterisk 13." into 13 2020-01-10 08:45:48 -06:00
Jaco Kroon
e7d2ab666b 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>
2020-01-10 08:28:55 +02:00
Kevin Harwell
fa700acf39 Merge "res_pjsip_pubsub: Add ability to persist generator state information." into 13 2020-01-09 17:28:49 -06:00
Joshua Colp
4cefb2f3cb Merge "res_pjsip_endpoint_identifier_ip.c: Add port matching support" into 13 2020-01-09 15:07:45 -06:00
Joshua Colp
81899e71e7 Merge "app_agent_pool: Update XML docs for AgentLogin" into 13 2020-01-09 15:06:21 -06:00
Corey Farrell
7601a5f0f8 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
2020-01-09 06:14:53 -05:00
Kevin Harwell
ba5b0c5c36 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
2020-01-08 13:54:44 -06:00
George Joseph
83077366de 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
2020-01-08 11:11:26 -07:00
Joshua Colp
379050504d Merge "stasis.c: Use correct topic name in stasis_topic_pool_delete_topic" into 13 2020-01-08 09:41:02 -06:00
Joshua C. Colp
9720b29d8e 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
2020-01-08 15:19:41 +00:00
Friendly Automation
1d3739fcbd Merge "sig_pri: Fix deadlock caused by sig_pri_queue_hangup" into 13 2020-01-08 08:57:10 -06:00
Sean Bright
49bb7d85cd 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
2020-01-08 09:34:50 -05:00
George Joseph
aa84bc31e2 Merge "app_chanisavail.c: Simplify dialplan using ChanIsAvail." into 13 2020-01-07 14:28:13 -06:00
Friendly Automation
0b7569a977 Merge "res_pjsip_config_wizard: Fix change detection for wizard settings" into 13 2020-01-07 12:38:14 -06:00
Friendly Automation
1577f6d923 Merge "features.c: Make Bridge application tolerate unspecified channel." into 13 2020-01-07 11:51:37 -06:00