Commit Graph

31460 Commits

Author SHA1 Message Date
George Joseph
8943624bf7 Merge "enum.c: Add support for regular expression flag in NAPTR record" into 13 2020-03-09 10:02:06 -05:00
Joshua Colp
d6248d5f5c Merge "res_rtp_asterisk: Add 'rtp show settings' cli command" into 13 2020-03-09 08:56:57 -05:00
Paulo Vicentini
f0b6d24704 chan_pjsip: Check audio frame when remote SSRC changes.
If the SSRC of a received RTP packet differed from the previous SSRC
an SSRC change control frame would be queued ahead of the media
frame. In the case of audio this would result in the format of the
audio frame not being checked, and if it differed or was not allowed
then it could cause the call to drop due to failure to set up a
translation path.

The chan_pjsip module will now no longer assume the first frame
will be the audio frame and instead goes through the complete list
to find it.

ASTERISK-28759

Change-Id: I6d854cc523f343e299a615636fc65bdbd5f809ec
2020-03-09 04:09:30 -05:00
Sean Bright
58b8c24c40 enum.c: Add support for regular expression flag in NAPTR record
A regular expression in a NAPTR response record can have a trailing
'i' flag to indicate that the expression should be evaluated in a
case-insensitive way. We were not checking for that flag which caused
the record parsing to fail on otherwise valid input.

Although this change will initially go into Asterisk 13, 16, and 17,
it is my intention to replace the majority of this code in 16 and up -
including this fix - by changing enum.c to consume the new DNS API
which duplicates most of this logic already. Asterisk 13 doesn't have
the DNS API, so this fix will be as good as it gets.

ASTERISK-26711 #close
Reported by: Vitold

Change-Id: I33943a5b3e7539c6dca3a5079982ee15a08186f0
2020-03-06 15:59:37 -05:00
Jared Smith
74718010d0 indications.conf.sample: Add indication tones for Indonesia
These tones come from http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf

ASTERISK-23407

Change-Id: I48e2285f1e5bb29b3335f762006f66c423d0fcb8
2020-03-06 08:41:29 -06:00
Rodrigo Ramírez Norambuena
b999447494 res_rtp_asterisk: Add 'rtp show settings' cli command
This change introduce a CLI command for the RTP to display the general
configuration.

In the first step add the follow fields of the configurations:
  - rtpstart
  - rtpend
  - dtmftimeout
  - rtpchecksum
  - strictrtp
  - learning_min_sequential
  - icesupport

Change-Id: Ibe5450898e2c3e1ed68c10993aa1ac6bf09b821f
2020-03-05 14:16:38 -06:00
Asterisk Development Team
077cc24d66 Update CHANGES and UPGRADE.txt for 13.32.0 2020-03-05 12:20:48 -05:00
Torrey Searle
04f2fad021 res_pjsip_sdp_rtp: Don't wait for ICE if not negotiated
If ICE support is enabled but not negotiated, the rtp->ice structure is
not being destroyed. This leads to Asterisk waiting for ICE to complete
instead of immediately starting the DTLS handshake, resulting in the
call leg having no RTP.

ASTERISK-28769 #close

Change-Id: I17c137546dc9ecfb9583c24dcf4c2ced8bbd7a27
2020-03-05 10:27:23 -06:00
Sean Bright
0ee0134cc9 enum.c: Make ast_get_txt() actually do something.
The ast_get_txt() API function (and by extension, the TXTCIDNAME
dialplan function) were broken in
65b8381550 such that we would never
actually make a DNS TXT query as described.

This patch restores the documented behavior.

ASTERISK-19460 #close
Reported by: George Joseph

Change-Id: I1b19aea711488cb1ecd63843cddce05010e39376
2020-03-04 18:00:34 -05:00
lvl
4b242d4280 res_pjsip_refer: ensure refer progress is still sent after Proceeding()
ASTERISK-28766 #close

Change-Id: I5ce2210062f9325db762edbf6e46075079bb2cd1
2020-03-04 13:04:02 -06:00
Joshua Colp
30f718a598 Merge "check_expr2: fix cross-compile/hardening issues" into 13 2020-03-04 06:27:20 -06:00
Joshua Colp
994853658b Merge "message & stasis/messaging: make text message variables work in ARI" into 13 2020-03-04 06:09:41 -06:00
Sebastian Kemper
d6b5a18111 check_expr2: fix cross-compile/hardening issues
When building check_expr2 with ASLR PIE hardening enabled the linker
fails. This is resolved by adding the regular compiler flags when
building the object files from ast_expr2f.c and ast_expr2.c.

Note: The STANDALONE define is removed because it is already defined in
_ASTCFLAGS. YY_NO_INPUT is defined so that the compile survives
'--enable-dev-mode'.

Also, a Makefile variable "CROSS_COMPILING" is added so that the
build system doesn't try to run check_expr2 when cross-compiling,
because that will fail the build as will.

ASTERISK-28685 #close

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Change-Id: If435b7db9f9ad8266245bda51c81c220f9658915
2020-03-03 08:17:41 -06:00
Kevin Harwell
c5ababbd2b Merge "res/res_pjsip_sdp_rtp: Fix MOH transitions" into 13 2020-03-02 14:16:52 -06:00
Kevin Harwell
0fb06121cb message & stasis/messaging: make text message variables work in ARI
When a text message was received any associated variable was not written to
the ARI TextMessageReceived event. This occurred because Asterisk only wrote
out "send" variables. However, even those "send" variables would fail ARI
validation due to a TextMessageVariable formatting bug.

Since it seems the TextMessageReceived event has never been able to include
actual variables it was decided to remove the TextMessageVariable object type
from ARI, and simply return a JSON object of key/value pairs for variables.
This aligns more with how the ARI sendMessage handles variables, and other
places in ARI.

That being the case, and since this is technically an API breaking change (no
one should really be affected since things never really worked) the ARI version
was updated to reflect that.

ASTERISK-28755 #close

Change-Id: Ia6051c01a53b30cf7edef84c27df4ed4479b8b6f
2020-03-02 12:11:59 -06:00
Kevin Harwell
5685254418 Merge "addons/res_config_mysql: silense warnings about printf format errors." into 13 2020-02-27 14:44:14 -06:00
Kevin Harwell
d49adf8033 Merge "app_queue: Refactor odd placement of if's around say_position" into 13 2020-02-27 14:41:54 -06:00
Torrey Searle
ed670ca0c6 res/res_pjsip_sdp_rtp: Fix MOH transitions
Update the state of remote_hold immediately on receipt of remote
SDP so that the information is available when building the SDP
answer

ASTERISK-28754 #close

Change-Id: I7026032a807e9c95081cb8f060400b05deb4836f
2020-02-27 14:20:37 -06:00
Kevin Harwell
6af57d5750 Merge "say: Remove unused "plural" option from main/say" into 13 2020-02-27 13:42:39 -06:00
Kevin Harwell
2241f828ca Merge "format_cap: make function parameters 'const'" into 13 2020-02-27 13:15:51 -06:00
Kevin Harwell
ff87627140 Merge "pjsip: Update ACLs on named ACL changes." into 13 2020-02-27 12:52:45 -06:00
Walter Doekes
c3e9d37ce7 say: Remove unused "plural" option from main/say
There are exceptions for plural objects, but they are detected using the
supplied NUMBER, not using an extra option.

Change-Id: I95d1d1b2796b1aba92048a2dbae8a3856ed8a113
2020-02-25 17:09:55 +01:00
Walter Doekes
6995b0a8fa app_queue: Refactor odd placement of if's around say_position
Change-Id: Icba97905e331812f129e5966e91a59b104c7a748
2020-02-25 17:05:28 +01:00
Kevin Harwell
d13cd25d4c format_cap: make function parameters 'const'
There were a couple places where the format cap function parameter was not
'const' when it should have been. This patch makes them 'const'.

Change-Id: Ife753fb16a962d842a6b44f45363a61a66bfdb2e
2020-02-24 13:37:21 -06:00
Jaco Kroon
2ff7057287 addons/res_config_mysql: silense warnings about printf format errors.
Warnings without this:

res_config_mysql.c: In function 'update2_mysql':
res_config_mysql.c:741:15: warning: format '%llu' expects argument of type
    'long long unsigned int', but argument 6 has type 'my_ulonglong'
    {aka 'long unsigned int'} [-Wformat=]
ast_debug(1, "MySQL RealTime: Updated %llu rows on table: %s\n",
    numrows, tablename);

(reformatted for readability within line-wrap)

Change-Id: I2af4d419a37c1a7eeee750cf9ae4a9a2b3a37fd3
2020-02-24 08:21:30 -06:00
George Joseph
f2fa99f124 Merge "tcptls.c: Log more informative OpenSSL errors" into 13 2020-02-21 09:01:00 -06:00
George Joseph
8fb06b30b2 Merge "ast_tls_cert: Allow private key size to be set on command line" into 13 2020-02-20 10:51:29 -06:00
George Joseph
2df95ab6d6 Merge "app_mixmonitor: Set MIXMONITOR_FILENAME to correct value when wav49 is used" into 13 2020-02-20 09:24:53 -06:00
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