Commit Graph

31482 Commits

Author SHA1 Message Date
George Joseph
66f2c78513 Merge "RTP/ICE: Send on first valid pair." into 13 2020-02-20 09:23:07 -06:00
Sean Bright
cbbf192f0a tcptls.c: Log more informative OpenSSL errors
Dump OpenSSL's error stack to the error log when things fail.

ASTERISK-28750 #close
Reported by: Martin Zeh

Change-Id: Ib63cd0df20275586e68ac4c2ddad222ed7bd9c0a
2020-02-19 14:20:18 -05:00
Sean Bright
66388abbb1 ast_tls_cert: Allow private key size to be set on command line
The default size in release branches will be 1024 but we'll use 2048 in master.

ASTERISK~28750

Change-Id: I435cea18bdd58824ed2b55259575c7ec7133842a
2020-02-19 09:38:31 -05:00
George Joseph
31dea3d7d9 Merge "res_pjsip_sdp_rtp: implement hold state handling on moh_passthrough" into 13 2020-02-18 10:07:54 -06:00
Ben Ford
f928600a98 RTP/ICE: Send on first valid pair.
When handling ICE negotiations, it's possible that there can be a delay
between STUN binding requests which in turn will cause a delay in ICE
completion, preventing media from flowing. It should be possible to send
media when there is at least one valid pair, preventing this scenario
from occurring.

A change was added to PJPROJECT that adds an optional callback
(on_valid_pair) that will be called when the first valid pair is found
during ICE negotiation. Asterisk uses this to start the DTLS handshake,
allowing media to flow. It will only be called once, either on the first
valid pair, or when ICE negotiation is complete.

ASTERISK-28716

Change-Id: Ia7b68c34f06d2a1d91c5ed51627b66fd0363d867
2020-02-18 09:53:46 -06:00
Joshua C. Colp
a60071610c pjsip: Update ACLs on named ACL changes.
This change extends the Sorcery API to allow a wizard to be
told to explicitly reload objects or a specific object type
even if the wizard believes that nothing has changed.

This has been leveraged by res_pjsip and res_pjsip_acl to
reload endpoints and PJSIP ACLs when a named ACL changes.

ASTERISK-28697

Change-Id: Ib8fee9bd9dd490db635132c479127a4114c1ca0b
2020-02-18 13:24:32 +00:00
Sean Bright
0246bca581 app_mixmonitor: Set MIXMONITOR_FILENAME to correct value when wav49 is used
When opening a file for writing, Asterisk silently converts filenames
ending with 'wav49' to 'WAV.' We aren't taking that in to account when
setting the MIXMONITOR_FILENAME variable in MixMonitor.

* If the user wants to write to a wav49 file, make sure that it is
  reflected properly in MIXMONITOR_FILENAME.

* Add a note to the documentation describing this behavior.

* Add a note in main/file.c indicating that app_mixmonitor needs to be
  changed if the logic in build_filename was changed.

ASTERISK-24798 #close
Reported by: xrobau

Change-Id: I384691ce624eb55c80a125b9ca206d2d691c574c
2020-02-17 11:56:45 -05:00
Torrey Searle
21ed671893 res_pjsip_sdp_rtp: implement hold state handling on moh_passthrough
When moh_passthrough is used, asterisk is only generating invites
of type sendonly and sendrecv instead of taking fully into account
the on hold state of the local and remote parties

ASTERISK-28738 #close

Change-Id: Iaaad9fbc033cb14803d433b8a4071bc337047761
2020-02-17 08:35:26 +01:00
Joshua Colp
10632beb50 Merge "res_musiconhold: Avoid spurious warning when 'format' is the empty string" into 13 2020-02-13 19:00:55 -06:00
George Joseph
796680cc57 Merge "doc: Fix CHANGES entries to have .txt suffix and update READMEs" into 13 2020-02-13 08:30:13 -06:00
Sean Bright
7687d1bda5 res_musiconhold: Avoid spurious warning when 'format' is the empty string
The change to res_config_odbc that allowed empty strings to be
returned to realtime consumers¹ causes a warning to be emitted when
loading MoH classes. So we need to treat an empty 'format' as if it
was not specified to avoid the warning.

ASTERISK-28735 #close
Reported by: Ross Beer

[1] https://gerrit.asterisk.org/c/asterisk/+/13722

Change-Id: I9a271d721e1a0973e80ebe7d75b46a0d8fa0e5a5
2020-02-11 08:51:10 -05:00
Sean Bright
ea1f318534 func_odbc: Prevent snprintf() truncation warning
For reasons that are not clear to me - this only appears for me when
_not_ building in dev-mode.

Change-Id: Ib45c54daaea8e0d571cb470cab1daaae2edba968
2020-02-10 16:40:16 -05:00
George Joseph
74d0244dc3 doc: Fix CHANGES entries to have .txt suffix and update READMEs
Although the wiki page for the new CHANGES and UPGRADE scheme
states that the files must have the ".txt" suffix, the READMEs
didn't.

Change-Id: I490306aa2cc24d6f014738e9ebbc78592efe0f05
(cherry picked from commit 7416703f04)
2020-02-07 14:08:09 -06:00
Joshua Colp
40ef98e959 Merge "pjproject_bundled: Allow brackets in via parameters" into 13 2020-02-07 07:05:04 -06:00
Joshua Colp
c95192e7ac Merge "chan_sip: Return 503 if we're out of RTP ports" into 13 2020-02-06 07:16:30 -06:00
Joshua Colp
4f93e1427d Merge "install_prereq: Install aptitude non-interactively" into 13 2020-02-06 07:14:32 -06:00
Sean Bright
d5fa23e72a pjproject_bundled: Allow brackets in via parameters
ASTERISK-26955 #close
Reported by: Peter Sokolov

Change-Id: Ib2803640905a77b65d0cee2d0ed2c7b310d470ac
2020-02-06 06:35:03 -06:00
Friendly Automation
bf1d5faea4 Merge "chan_sip: Clarify in sample docs how directmediapermit/-acl should be used" into 13 2020-02-05 10:27:23 -06:00
Friendly Automation
169922e5ee Merge "res_config_odbc: Preserve empty strings returned by the database" into 13 2020-02-05 09:40:35 -06:00
Sylvain Afchain
9419295aee 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 0c02d0a450)
2020-02-05 14:19:59 +01:00
Walter Doekes
44e1c7d93f chan_sip: Return 503 if we're out of RTP ports
If you're for some reason out of RTP ports, chan_sip would previously
responde to an INVITE with a 403, which will fail the call.

Now, it returns a 503, allowing the device/proxy to retry the call on a
different machine.

ASTERISK-28718

Change-Id: I968dcf6c1e30ecddcce397dcda36db727c83ca90
2020-02-05 06:32:48 -06:00
Walter Doekes
cea6cad343 chan_sip: Clarify in sample docs how directmediapermit/-acl should be used
It said "restrict [...] which peers should be able to pass [audio]
to each other".

However, these settings are not global (for which you would expect
signaling IPs to be checked). These settings are available per peer
only, and the IPs being checked, are the RTP IPs.

Change-Id: I2a6c6cd7c2f5f30d1df4844e3e0308a077021660
2020-02-05 06:26:57 -06:00
Joshua Colp
08ba741a8e Merge "res_pjsip_messaging: Allow Content-Type to be overridden" into 13 2020-02-03 06:11:23 -06:00
George Joseph
a02f14ab9f Merge "res_stasis: trigger cleanup after update" into 13 2020-01-30 10:19:26 -06:00
George Joseph
104e72e588 Merge "stasis/app: don't lock an app before a call to send" into 13 2020-01-30 09:25:00 -06:00
George Joseph
8855b1b63c Merge "res_pjsip_pubsub: Increment persistence data ref when recreating." into 13 2020-01-30 09:22:04 -06:00
Sean Bright
a3a2fbaec6 res_config_odbc: Preserve empty strings returned by the database
When res_config_odbc (and perhaps other realtime backends) reads a SQL
NULL from the database, it coalesces the value to the empty string
which prevents it from being returned to the realtime core.

However, if it instead reads the empty string from the database, it
needs a way to encode that fact without having the value omitted
entirely. It does this by changing the value to a string with a single
space. The realtime code in main/config.c recognizes this special case
and _turns the string back into the empty string_ before passing it to
realtime API consumers.

For all of this to work, we need to ensure that we actually pass the
single-space-string back to the realtime core, which is currently
failing because we are trimming the value before checking its
content. So instead we now special case the single-space-string case
so that empty values are returned properly.

ASTERISK-28719 #close
Reported by: EDV O-TON

Change-Id: I673ed8c31ad037aa224e80c78c7a1dc4e4a4e3de
2020-01-29 10:14:12 -05:00
Friendly Automation
95c0072a5b Merge "res_pjsip_messaging: Ensure MESSAGE_SEND_STATUS is set properly" into 13 2020-01-28 10:19:10 -06:00
Joshua C. Colp
e14fd3b22a 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
2020-01-28 09:24:24 -06:00
Sean Bright
dafdcc623c res_pjsip_messaging: Allow Content-Type to be overridden
ASTERISK-26082 #close
Reported by: Alex

Change-Id: I6549e90932016349bc72b0f053432dc25286f4fb
2020-01-28 09:16:17 -05:00
Friendly Automation
67ed0db0da Merge "chan_sip: Always process updated SDP on media source change" into 13 2020-01-27 18:21:41 -06:00
Kevin Harwell
78d9bc8ef6 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
2020-01-27 12:11:12 -06:00
Kevin Harwell
1051227dd9 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
2020-01-27 11:59:02 -06:00
Sean Bright
d99580ae69 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
2020-01-27 12:07:25 -05:00
Friendly Automation
017a33c649 Merge "chan_pjsip: Ignore RTP that we haven't negotiated" into 13 2020-01-24 10:02:23 -06:00
Asterisk Development Team
fe72f4e216 Update CHANGES and UPGRADE.txt for 13.31.0 2020-01-23 11:06:54 -05:00
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