Commit Graph

33014 Commits

Author SHA1 Message Date
Naveen Albert 85ef06d300 func_math: Return integer instead of float if possible
The MIN, MAX, and ABS functions all support float
arguments, but currently return floats even if the
arguments are all integers and the response is
a whole number, in which case the user is likely
expecting an integer. This casts the float to an integer
before printing into the response buffer if possible.

ASTERISK-29495

Change-Id: I902d29eacf3ecd0f8a6a5e433c97f0421d205488
2021-08-19 11:13:39 -05:00
Naveen Albert 5c9d7a0373 app_morsecode: Add American Morse code
Previously, the Morsecode application only supported international
Morse code. This adds support for American Morse code and adds an
option to configure the frequency used in off intervals.

Additionally, the application checks for hangup between tones
to prevent application execution from continuing after hangup.

ASTERISK-29541

Change-Id: I172431a2e18e6527d577e74adfb05b154cba7bd4
2021-08-19 10:31:04 -05:00
Naveen Albert 498db70884 func_scramble: Audio scrambler function
Adds a function to scramble audio on a channel using
whole spectrum frequency inversion. This can be used
as a privacy enhancement with applications like
ChanSpy or other potentially sensitive audio.

ASTERISK-29542

Change-Id: I01020769d91060a1f56a708eb405f87648d1a67e
2021-08-19 09:48:41 -05:00
Naveen Albert a099f13a20 app_originate: Add ability to set codecs
A list of codecs to use for dialplan-originated calls can
now be specified in Originate, similar to the ability
in call files and the manager action.

Additionally, we now default to just using the slin codec
for originated calls, rather than all the slin* codecs up
through slin192, which has been known to cause issues
and inconsistencies from AMI and call file behavior.

ASTERISK-29543

Change-Id: I96a1aeb83d54b635b7a51e1b4680f03791622883
2021-08-19 09:08:58 -05:00
Alexander Traud 137bd7fe65 BuildSystem: Remove two dead exceptions for compiler Clang.
Commit 305ce3d added -Wno-parentheses-equality to Makefile.rules,
turning the previous two warning suppressions from commit e9520db
redundant. Let us remove the latter.

Change-Id: I0b471254b31e6e05902062761dded4b3e626c7ac
2021-08-19 09:02:41 -05:00
Naveen Albert 0ca3ebe7cd chan_alsa, chan_sip: Add replacement to moduleinfo
Adds replacement modules to the moduleinfo for
chan_alsa and chan_sip.

ASTERISK-29601 #close

Change-Id: I7a4877b0d5c0c17e088e8fa8ebbfa9a195223cbc
2021-08-19 07:58:39 -05:00
Joshua C. Colp 0ddeac0e36 res_monitor: Disable building by default.
ASTERISK-29602

Change-Id: I6f0af0a959409cdbc6b185b1604301bafc872a5a
2021-08-18 11:15:11 -05:00
Joshua C. Colp fcbf0a6699 muted: Remove deprecated application.
ASTERISK-29600

Change-Id: I0ae1c6a2996da43217126f094de90761314dcf82
2021-08-17 10:39:08 -03:00
Joshua C. Colp 6d5b66f5f3 conf2ael: Remove deprecated application.
ASTERISK-29599

Change-Id: I75dc77162926fb17e7c6caf8f04e3aabd792fb0c
2021-08-17 10:38:46 -03:00
Joshua C. Colp 800fd84af6 res_config_sqlite: Remove deprecated module.
ASTERISK-29598

Change-Id: I8ef17023f55bf01f2e309b06f4778a8ca7252c91
2021-08-17 10:38:34 -03:00
Joshua C. Colp 20b2741232 chan_vpb: Remove deprecated module.
ASTERISK-29597

Change-Id: I19bb39eed0257ddfef453eb2df5646d073d50fe1
2021-08-17 10:38:05 -03:00
Joshua C. Colp 1eb2d85c99 chan_misdn: Remove deprecated module.
ASTERISK-29596

Change-Id: Ibae9490c1b35cadbf7028d24610f745277c8535e
2021-08-17 10:37:40 -03:00
Joshua C. Colp 6ecc48086c chan_nbs: Remove deprecated module.
ASTERISK-29595

Change-Id: Ib5c7d43a780f2fb94cee90738e4c1af211ae4a33
2021-08-17 10:36:19 -03:00
Joshua C. Colp 6cc948f94e chan_phone: Remove deprecated module.
ASTERISK-29594

Change-Id: I79a9961cb5062fadbccb0ea93f087bdd32685316
2021-08-17 10:36:11 -03:00
Joshua C. Colp 95f3a4a9ad chan_oss: Remove deprecated module.
ASTERISK-29593

Change-Id: Ib53a42ad974c63871344b95078c61c188e43da99
2021-08-17 10:35:43 -03:00
Joshua C. Colp 30d5264409 cdr_syslog: Remove deprecated module.
ASTERISK-29592

Change-Id: Ic8eb6a2100ad5bc3b48338a6d0a6cfa70ecbc50f
2021-08-17 10:35:41 -03:00
Joshua C. Colp 9e5269c7ae app_dahdiras: Remove deprecated module.
ASTERISK-29591

Change-Id: I021d37b729631d40f84e35bb21e2893777be1858
2021-08-17 10:35:38 -03:00
Joshua C. Colp 98e0745a14 app_nbscat: Remove deprecated module.
ASTERISK-29590

Change-Id: I87cf0f536b77d222c8eda003376ac47fae86ed43
2021-08-17 10:35:36 -03:00
Joshua C. Colp 13963e643b app_image: Remove deprecated module.
ASTERISK-29589

Change-Id: I8057eb2ca1ca4c3b27ed2fe04bea10e9cb551cdd
2021-08-17 10:35:32 -03:00
Joshua C. Colp 7c642c55b8 app_url: Remove deprecated module.
ASTERISK-29588

Change-Id: If846d40b37c5b646bcd7326111db280529a5971b
2021-08-17 10:35:30 -03:00
Joshua C. Colp 24e21e59af app_fax: Remove deprecated module.
ASTERISK-29587

Change-Id: I038237bbb56b1161d7d5e20cda11ed32e13d3ca2
2021-08-17 10:35:28 -03:00
Joshua C. Colp 1f1a87a97b app_ices: Remove deprecated module.
ASTERISK-29586

Change-Id: I1e0a4535135b00938b609fe0ccba9bbddbac93ad
2021-08-17 10:35:23 -03:00
Joshua C. Colp 2f510d7a88 app_mysql: Remove deprecated module.
ASTERISK-29585

Change-Id: I262930d0387d043f2a3345e8a977b314528059bf
2021-08-17 10:35:14 -03:00
Joshua C. Colp 2a0e383e4f cdr_mysql: Remove deprecated module.
ASTERISK-29584

Change-Id: I4bd3695d089121f810d692a82361d39d2f97ae39
2021-08-17 10:34:34 -03:00
Sean Bright 743e057bb4 mgcp: Remove dead debug code
ASTERISK-20339 #close

Change-Id: I36f364aaa1971241d8f3ea1a5909b463d185a2d5
2021-08-16 12:33:09 -05:00
Joshua C. Colp 93870e7bb4 policy: Deprecate modules and add versions to others.
app_meetme is deprecated in 19, to be removed in 21.
app_osplookup is deprecated in 19, to be removed in 21.
chan_alsa is deprecated in 19, to be removed in 21.
chan_mgcp is deprecated in 19, to be removed in 21.
chan_skinny is deprecated in 19, to be removed in 21.
res_pktccops is deprecated in 19, to be removed in 21.
app_macro was deprecated in 16, to be removed in 21.
chan_sip was deprecated in 17, to be removed in 21.
res_monitor was deprecated in 16, to be removed in 21.

ASTERISK-29548
ASTERISK-29549
ASTERISK-29550
ASTERISK-29551
ASTERISK-29552
ASTERISK-29553
ASTERISK-29558
ASTERISK-29567
ASTERISK-29572

Change-Id: Ic3bee31a10d42c4b3bbc913d893f7b2a28a27131
2021-08-11 08:14:51 -05:00
Naveen Albert 6a89266b5b func_frame_drop: New function
Adds function to selectively drop specified frames
in the TX or RX direction on a channel, including
control frames.

ASTERISK-29478

Change-Id: I8147c9d55d74e2e48861edba6b22f930920541ec
2021-08-09 07:59:09 -05:00
Alexander Traud 8a6c9c3a76 aelparse: Accept an included context with timings.
With Asterisk 1.6.0, in the main parser for the configuration file
extensions.conf, the separator was changed from vertical bar to comma.
However, the first separator was not changed in aelparse; it still had
to be a vertical bar, and no comma was allowed.

Additionally, this change allows the vertical bar for the first and
last parameter again, even in the main parser, because the vertical bar
was still accepted for the other parameters.

ASTERISK-29540

Change-Id: I882e17c73adf4bf2f20f9046390860d04a9f8d81
2021-08-06 09:04:28 -05:00
Kevin Harwell 049c7c1361 format_ogg_speex: Implement a "not supported" write handler
This format did not specify a "write" handler, so when attempting to write
to it (ast_writestream) a crash would occur.

This patch adds a default handler that simply issues a "not supported"
warning, thus no longer crashing.

ASTERISK-29539

Change-Id: I8f6ddc7cc3b15da30803be3b1cf68e2ba0fbce91
2021-08-06 07:52:02 -05:00
Naveen Albert b5709e610e cdr_adaptive_odbc: Prevent filter warnings
Previously, if CDR filters were used so that
not all CDR records used all sections defined
in cdr_adaptive_odbc.conf, then warnings will
always be emitted (if each CDR record is unique
to a particular section, n-1 warnings to be
specific).

This turns the offending warning log into
a verbose message like the other one, since
this behavior is intentional and not
indicative of anything wrong.

ASTERISK-29494

Change-Id: Ifd314fa9298722bc99494d5ca2658a5caa94a5f8
2021-08-04 09:26:23 -05:00
Naveen Albert 0e023e6cf1 app_queue: Allow streaming multiple announcement files
Allows multiple files comprising an agent announcement
to be played by separating on the ampersand, similar
to the multi-file support in other Asterisk applications.

ASTERISK-29528

Change-Id: Iec600d8cd5ba14aa1e4e37f906accb356cd7891a
2021-08-03 14:19:58 -05:00
Igor Goncharovsky 4f437ea1f4 res_pjsip_header_funcs: Add PJSIP_HEADERS() ability to read header by pattern
PJSIP currently does not provide a function to replace SIP_HEADERS() function to get a list of headers from INVITE request.
It may be used to get all X- headers in case the actual set and names of headers unknown.

ASTERISK-29389

Change-Id: Ic09d395de71a0021e0d6c5c29e1e19d689079f8b
2021-08-03 08:47:53 -05:00
Rijnhard Hessel 728a52fb61 res_statsd: handle non-standard meter type safely
Meter types are not well supported,
lacking support in telegraf, datadog and the official statsd servers.
We deprecate meters and provide a compliant fallback for any existing usages.

A flag has been introduced to allow meters to fallback to counters.


ASTERISK-29513

Change-Id: I5fcb385983a1b88f03696ff30a26b55c546a1dd7
2021-08-03 08:12:33 -05:00
Naveen Albert fa7d147e1b app_dtmfstore: New application to store digits
Adds application to asynchronously collect digits
dialed on a channel in the TX or RX direction
using a framehook and stores them in a specified
variable, up to a configurable number of digits.

ASTERISK-29477

Change-Id: I51aa93fc9507f7636ac44806c4420ce690423e6f
2021-08-02 14:28:52 -05:00
under de3f5350de codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother
If Asterisk gets G.729 6-byte VAD frames inbound, then at outbound Asterisk sends this G.729 stream with non-continuous timestamps.
This makes the audio stream not-playable at the receiver side.
Linphone isn't able to play such an audio - lots of disruptions are heard.
Also I had complains of bad audio from users which use other types of phones.

After debugging, I found this is a regression connected with RTP Smoother (main/smoother.c).

Smoother has a special code to handle G.729 VAD frames (search for AST_SMOOTHER_FLAG_G729 in smoother.c).

However, this flag is never set in Asterisk-12 and newer.
Previously it has been set (see Asterisk-11).

ASTERISK-29526 #close

Change-Id: I6f51ecb1a3ecd9c6d59ec5a6811a27446e17065d
2021-08-02 14:16:25 -05:00
Sean Bright 6428124b06 res_http_media_cache: Cleanup audio format lookup in HTTP requests
Asterisk first looks at the end of the URL to determine the file
extension of the returned audio, which in many cases will not work
because the URL may end with a query string or a URL fragment. If that
fails, Asterisk then looks at the Content-Type header and then finally
parses the URL to get the extension.

The order has been changed such that we look at the Content-Type
header first, followed by looking for the extension of the parsed
URL. We no longer look at the end of the URL, which was error prone.

ASTERISK-29527 #close

Change-Id: I1e3f83b339ef2b80661704717c23568536511032
2021-08-02 13:21:13 -05:00
Joshua C. Colp d0f189a5c9 docs: Remove embedded macro in WaitForCond XML documentation.
Change-Id: I40c6514e1843e320f3cbe0b2c70d4a98c0e35b9c
2021-08-02 12:31:11 -05:00
Ben Ford db7b025532 Update AMI and ARI versions for Asterisk 20.
Bumped AMI and ARI versions for the next major Asterisk version (20).

Change-Id: I2e65794f206d443178ab6895767fb53f04cc3e6a
2021-08-02 10:58:44 -05:00
Kevin Harwell e8cda4b32c AST-2021-009 - pjproject-bundled: Avoid crash during handshake for TLS
If an SSL socket parent/listener was destroyed during the handshake,
depending on timing, it was possible for the handling callback to
attempt access of it after the fact thus causing a crash.

ASTERISK-29415 #close

Change-Id: I105dacdcd130ea7fdd4cf2010ccf35b5eaf1432d
2021-07-22 16:19:54 -05:00
Kevin Harwell 1b62831f2c AST-2021-008 - chan_iax2: remote crash on unsupported media format
If chan_iax2 received a packet with an unsupported media format, for
example vp9, then it would set the frame's format to NULL. This could
then result in a crash later when an attempt was made to access the
format.

This patch makes it so chan_iax2 now ignores/drops frames received
with unsupported media format types.

ASTERISK-29392 #close

Change-Id: Ifa869a90dafe33eed8fd9463574fe6f1c0ad3eb1
2021-07-22 16:17:05 -05:00
Joshua C. Colp ec16d2ecbd AST-2021-007 - res_pjsip_session: Don't offer if no channel exists.
If a re-INVITE is received after we have sent a BYE request then it
is possible for no channel to be present on the session. If this
occurs we allow PJSIP to produce the offer instead. Since the call
is being hung up if it produces an incorrect offer it doesn't
actually matter. This also ensures that code which produces SDP
does not need to handle if a channel is not present.

ASTERISK-29381

Change-Id: I673cb88c432f38f69b2e0851d55cc57a62236042
2021-07-22 13:26:01 -05:00
Asterisk Development Team e6ddbe0922 Update CHANGES and UPGRADE.txt for 19.0.0 2021-07-21 09:59:30 -05:00
Andre Barbosa f4d3f021f9 res_stasis_playback: Check for chan hangup on play_on_channels
Verify `ast_check_hangup` before looping to the next sound file.
If the call is already hangup we just break the cycle.
It also ensures that the PlaybackFinished event is sent if the call was hangup.

This is also use-full when we are playing a big list of file for a channel that is hangup.
Before this patch Asterisk will give a warning for every sound not played and fire a PlaybackStart for every sound file on the list tried to be played.

With the patch we just break the playback cycle when the chan is hangup.

ASTERISK-29501 #close

Change-Id: Ic4e1c01b974c9a1f2d9678c9d6b380bcfc69feb8
2021-07-20 13:18:40 -05:00
Sean Bright d5bb27a06f res_http_media_cache.c: Fix merge errors from 18 -> master
ASTERISK-27871 #close

Change-Id: I6624f2d3a57f76a89bb372ef54a124929a0338d7
2021-07-19 12:38:25 -05:00
Sean Bright 237285a9a8 res_pjsip_stir_shaken: RFC 8225 compliance and error message cleanup.
From RFC 8225 Section 5.2.1:

    The "dest" claim is a JSON object with the claim name of "dest"
    and MUST have at least one identity claim object.  The "dest"
    claim value is an array containing one or more identity claim JSON
    objects representing the destination identities of any type
    (currently "tn" or "uri").  If the "dest" claim value array
    contains both "tn" and "uri" claim names, the JSON object should
    list the "tn" array first and the "uri" array second.  Within the
    "tn" and "uri" arrays, the identity strings should be put in
    lexicographical order, including the scheme-specific portion of
    the URI characters.

Additionally, make it clear that there was a failure to sign the JWT
payload and not necessarily a memory allocation failure.

Change-Id: Ia8733b861aef6edfaa9c2136e97b447a01578dc9
2021-07-19 10:48:06 -05:00
Sean Bright d568326807 res_http_media_cache.c: Parse media URLs to find extensions.
Use cURL's URL parsing API, falling back to the urlparser library, to
parse playback URLs in order to find their file extensions.

For backwards compatibility, we first look at the full URL, then at
any Content-Type header, and finally at just the path portion of the
URL.

ASTERISK-27871 #close

Change-Id: I16d0682f6d794be96539261b3e48f237909139cb
2021-07-19 06:53:50 -05:00
Sean Bright 785e4afc20 main/cdr.c: Correct Party A selection.
This appears to just have been a copy/paste error from 6258bbe7. Fix
suggested by Ross Beer in ASTERISK~29166.

Change-Id: I51e0de92042e53f37597c6f83a75621ef0d1ae37
2021-07-16 10:26:52 -05:00
Sebastien Duthil 8a21d466ea stun: Emit warning message when STUN request times out
Without this message, it is not obvious that the reason is STUN timeout.

ASTERISK-29507 #close

Change-Id: I26e4853c23a1aed324552e1b9683ea3c05cb1f74
2021-07-16 09:53:32 -05:00
Naveen Albert 244491f9b2 app_reload: New Reload application
Adds an application to reload modules
from within the dialplan.

ASTERISK-29454

Change-Id: Ic8ab025d8b38dd525b872b41c465c999c5810774
2021-07-15 10:01:55 -05:00
Igor Goncharovsky 99d44f0c5a res_ari: Fix audiosocket segfault
Add check that data parameter specified when audiosocket used for externalMedia.

ASTERISK-29514 #close

Change-Id: Ie562f03c5d6c3835a3631f376b3d43e75b8f9617
2021-07-08 18:31:15 -05:00