Commit Graph

33655 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther a10de8bc72 res_prometheus: Do not generate broken metrics
In 8d6fdf9c3a invisible bridges were
skipped but that lead to producing metrics with no name and no help.

Keep track of the number of metrics configured and then only emit these.
Add a basic testcase that verifies that there is no '(NULL)' in the
output.

ASTERISK-30474
2023-08-04 14:21:18 +00:00
Sean Bright b5762cd54e res_pjsip: Enable TLS v1.3 if present.
Fixes #221

UserNote: res_pjsip now allows TLS v1.3 to be enabled if supported by
the underlying PJSIP library. The bundled version of PJSIP supports
TLS v1.3.
2023-08-04 14:20:53 +00:00
phoneben c0b8adfe4d func_cut: Add example to documentation.
This adds an example to the XML documentation clarifying usage
of the CUT function to address a common misusage.
2023-08-04 10:57:06 +00:00
Sean Bright df87ada8ac extensions.conf.sample: Remove reference to missing context.
c3ff4648 removed the [iaxtel700] context but neglected to remove
references to it.

This commit addresses that and also removes iaxtel and freeworlddialup
references from other config files.
2023-07-21 17:50:56 +00:00
Sean Bright b8aee4a2c6 func_export: Use correct function argument as variable name.
Fixes #208
2023-07-18 14:55:31 +00:00
Joshua C. Colp 879d4ff56a app_queue: Add support for applying caller priority change immediately.
The app_queue module provides both an AMI action and a CLI command
to change the priority of a caller in a queue. Up to now this change
of priority has only been reflected to new callers into the queue.

This change adds an "immediate" option to both the AMI action and
CLI command which immediately applies the priority change respective
to the other callers already in the queue. This can allow, for example,
a caller to be placed at the head of the queue immediately if their
priority is sufficient.

Resolves: #202

UserNote: The 'queue priority caller' CLI command and
'QueueChangePriorityCaller' AMI action now have an 'immediate'
argument which allows the caller priority change to be reflected
immediately, causing the position of a caller to move within the
queue depending on the priorities of the other callers.
2023-07-18 13:02:51 +00:00
George Joseph 12f231c717 .github: Fix cherry-pick reminder issues 2023-07-17 09:26:53 -06:00
George Joseph 74c809d71f app.h: Move declaration of ast_getdata_result before its first use
The ast_app_getdata() and ast_app_getdata_terminator() declarations
in app.h were changed recently to return enum ast_getdata_result
(which is how they were defined in app.c).  The existing
declaration of ast_getdata_result in app.h was about 1000 lines
after those functions however so under certain circumstances,
a "use before declaration" error was thrown by the compiler.
The declaration of the enum was therefore moved to before those
functions.

Resolves: #200
2023-07-12 17:44:41 +00:00
George Joseph 10b3c2dc45 doc: Remove obsolete CHANGES-staging and UPGRADE-staging 2023-07-12 17:41:40 +00:00
Sean Bright d26a00ef34 chan_iax2.c: Avoid crash with IAX2 switch support.
A change made in 82cebaa0 did not properly handle the case when a
channel was not provided, triggering a crash. ast_check_hangup(...)
does not protect against NULL pointers.

Fixes #180
2023-07-12 17:39:59 +00:00
Sean Bright e120694711 res_geolocation: Ensure required 'location_info' is present.
Fixes #189
2023-07-12 17:38:58 +00:00
Mike Bradeen b8db3dda7e Adds manager actions to allow move/remove/forward individual messages
in a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a VoicemailBoxSummarry, required to retrieve message ID's.

Resolves: #181

UserNote: The following manager actions have been added

VoicemailBoxSummary - Generate message list for a given mailbox

VoicemailRemove - Remove a message from a mailbox folder

VoicemailMove - Move a message from one folder to another within a mailbox

VoicemailForward - Copy a message from one folder in one mailbox
to another folder in another or the same mailbox.
2023-07-12 17:37:26 +00:00
Mike Bradeen 9b5c29d943 app_voicemail: add CLI commands for message manipulation
Adds CLI commands to allow move/remove/forward individual messages
from a particular mailbox folder. The forward command can be used
to copy a message within a mailbox or to another mailbox. Also adds
a show mailbox, required to retrieve message ID's.

Resolves: #170

UserNote: The following CLI commands have been added to app_voicemail

voicemail show mailbox <mailbox> <context>
Show contents of mailbox <mailbox>@<context>

voicemail remove <mailbox> <context> <from_folder> <messageid>
Remove message <messageid> from <from_folder> in mailbox <mailbox>@<context>

voicemail move <mailbox> <context> <from_folder> <messageid> <to_folder>
Move message <messageid> in mailbox <mailbox>&<context> from <from_folder> to <to_folder>

voicemail forward <from_mailbox> <from_context> <from_folder> <messageid> <to_mailbox> <to_context> <to_folder>
Forward message <messageid> in mailbox <mailbox>@<context> <from_folder> to
mailbox <mailbox>@<context> <to_folder>
2023-07-12 17:36:47 +00:00
zhengsh 25a766f49d res_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into the scope of the rtp_instance lock.
From the gdb information, it was found that when calling __ast_free, the size of the
allocated space pointed to by the pointer matches the size created when rtp->themssrc_valid
is equal to 0. However, in reality, when reading the value of rtp->themssrc_valid in gdb,
it is found to be 1.

Within ast_rtcp_write(), the call to ast_rtp_rtcp_report_alloc() uses rtp->themssrc_valid,
which is outside the protection of the rtp_instance lock. However,
ast_rtcp_generate_report(), which is called by ast_rtcp_generate_compound_prefix(), uses
rtp->themssrc_valid within the protection of the rtp_instance lock.

This can lead to the possibility that the value of rtp->themssrc_valid used in the call to
ast_rtp_rtcp_report_alloc() may be different from the value of rtp->themssrc_valid used
within ast_rtcp_generate_report().

Resolves: asterisk#63
2023-07-12 15:56:17 +00:00
George Joseph 0f9de8a3f0 .github: Minor tweak to Asterisk Releaser 2023-07-12 06:48:42 -06:00
George Joseph cd7e513087 .github: Suppress cherry-pick reminder for some situations
In PROpenedOrUpdated, the cherry-pick reminder will now be
suppressed if there are already valid 'cherry-pick-to' comments
in the PR or the PR contained a 'cherry-pick-to: none' comment.
2023-07-11 06:35:37 -06:00
Naveen Albert d87abb2ec9 sig_analog: Allow immediate fake ring to be suppressed.
When immediate=yes on an FXS channel, sig_analog will
start fake audible ringback that continues until the
channel is answered. Even if it answers immediately,
the ringback is still audible for a brief moment.
This can be disruptive and unwanted behavior.

This adds an option to disable this behavior, though
the default behavior remains unchanged.

ASTERISK-30003 #close
Resolves: #118

UserNote: The immediatering option can now be set to no to suppress
the fake audible ringback provided when immediate=yes on FXS channels.
2023-07-10 14:16:20 +00:00
Sean Bright d902e8e817 apply_patches: Use globbing instead of file/sort.
This accomplishes the same thing as a `find ... | sort` but with the
added benefit of clarity and avoiding a call to a subshell.

Additionally drop the -s option from call to patch as it is not POSIX.
2023-07-07 15:11:48 +00:00
George Joseph 640ead0071 apply_patches: Sort patch list before applying
The apply_patches script wasn't sorting the list of patches in
the "patches" directory before applying them. This left the list
in an indeterminate order. In most cases, the list is actually
sorted but rarely, they can be out of order and cause dependent
patches to fail to apply.

We now sort the list but the "sort" program wasn't in the
configure scripts so we needed to add that and regenerate
the scripts as well.

Resolves: #193
2023-07-06 14:04:09 +00:00
Stanislav Abramenkov d596c0248a pjsip: Upgrade bundled version to pjproject 2.13.1 2023-07-05 15:41:11 +00:00
George Joseph 31663fed53 .github: Updates for AsteriskReleaser 2023-06-30 07:02:20 -06:00
Mike Bradeen 2711fba4b9 app_voicemail: fix imap compilation errors
Fixes two compilation errors in app_voicemail_imap, one due to an unsed
variable and one due to a new variable added in the incorrect location
in _163.

Resolves: #174
2023-06-29 16:08:08 +00:00
Mike Bradeen 9c889911ad res_musiconhold: avoid moh state access on unlocked chan
Move channel unlock to after moh state access to avoid
potential unlocked access to state.

Resolves: #133
2023-06-29 15:15:03 +00:00
Mike Bradeen 3acdffc17e utils: add lock timestamps for DEBUG_THREADS
Adds last locked and unlocked timestamps as well as a
counter for the number of times the lock has been
attempted (vs locked/unlocked) to debug output printed
using the DEBUG_THREADS option.

Resolves: #110
2023-06-29 15:13:45 +00:00
George Joseph 4ff17f44a4 .github: Back out triggering PROpenedOrUpdated by label 2023-06-29 09:07:03 -06:00
George Joseph caf0fd357c .github: Move publish docs to new file CreateDocs.yml 2023-06-27 12:18:48 -06:00
George Joseph 80d042cb01 rest-api: Updates for new documentation site
The new documentation site uses traditional markdown instead
of the Confluence flavored version.  This required changes in
the mustache templates and the python that generates the files.
2023-06-27 08:37:16 -06:00
George Joseph b008fd5919 .github: Remove result check from PROpenUpdateGateTests 2023-06-27 05:18:11 -06:00
George Joseph 44c0e1b756 .github: Fix use of 'contains' 2023-06-26 08:45:39 -06:00
George Joseph 91503078ff .github: Add recheck label test to additional jobs 2023-06-26 07:46:20 -06:00
George Joseph de40ea0f79 .github: Fix recheck label typos 2023-06-26 07:22:06 -06:00
George Joseph 07a3784745 .github: Fix recheck label manipulation 2023-06-26 07:11:55 -06:00
George Joseph 426b9c568c .github: Allow PR submit checks to be re-run by label 2023-06-26 07:08:04 -06:00
Olaf Titz af2ced484e app_voicemail_imap: Fix message count when IMAP server is unavailable
Some callers of __messagecount did not correctly handle error return,
instead returning a -1 message count.
This caused a notification with "Messages-Waiting: yes" and
"Voice-Message: -1/0 (0/0)" if the IMAP server was unavailable.

Fixes: #64
2023-06-26 13:03:16 +00:00
Sean Bright 4a1edb9a8c res_pjsip_rfc3326: Prefer Q.850 cause code over SIP.
Resolves: #116
2023-06-21 13:24:54 +00:00
Ben Ford ad120e5d0b res_pjsip_session: Added new function calls to avoid ABI issues.
Added two new functions (ast_sip_session_get_dialog and
ast_sip_session_get_pjsip_inv_state) that retrieve the dialog and the
pjsip_inv_state respectively from the pjsip_inv_session on the
ast_sip_session struct. This is due to pjproject adding a new field to
the pjsip_inv_session struct that caused crashes when trying to access
fields that were no longer where they were expected to be if a module
was compiled against a different version of pjproject.

Resolves: #145
2023-06-13 17:59:00 +00:00
Nathan Bruning 6084bbfe0e app_queue: Add force_longest_waiting_caller option.
This adds an option 'force_longest_waiting_caller' which changes the
global behavior of the queue engine to prevent queue callers from
'jumping ahead' when an agent is in multiple queues.

Resolves: #108

Also closes old asterisk issues:
- ASTERISK-17732
- ASTERISK-17570

Change-Id: I0f84e27903fefbe2018d0afa2d67b23aa0b321ce
2023-06-12 18:20:26 +00:00
Sean Bright b7eae29fb9 pjsip_transport_events.c: Use %zu printf specifier for size_t.
Partially resolves #143.
2023-06-12 17:20:24 +00:00
Sean Bright 97b901a29b res_crypto.c: Gracefully handle potential key filename truncation.
Partially resolves #143.
2023-06-12 17:20:24 +00:00
Sean Bright 21d3c4ae58 configure: Remove obsolete and deprecated constructs.
These were uncovered when trying to run `bootstrap.sh` with Autoconf
2.71:

* AC_CONFIG_HEADER() is deprecated in favor of AC_CONFIG_HEADERS().
* AC_HEADER_TIME is obsolete.
* $as_echo is deprecated in favor of AS_ECHO() which requires an update
  to ax_pthread.m4.

Note that the generated artifacts in this commit are from Autoconf 2.69.

Resolves #139
2023-06-12 17:19:52 +00:00
zhou_jiajian f7e1f1fbbd res_fax_spandsp.c: Clean up a spaces/tabs issue 2023-06-12 17:19:22 +00:00
Sean Bright ea63148b23 ast-db-manage: Synchronize revisions between comments and code.
In a handful of migrations, the comment header that indicates the
current and previous revisions has drifted from the identifiers
revision and down_revision variables. This updates the comment headers
to match the code.
2023-06-12 14:40:09 +00:00
George Joseph 25bc5544d8 test_statis_endpoints: Fix channel_messages test again 2023-06-12 08:37:53 -06:00
Sean Bright ebc007322b res_crypto.c: Avoid using the non-portable ALLPERMS macro.
ALLPERMS is not POSIX and it's trivial enough to not jump through
autoconf hoops to check for it.

Fixes #149.
2023-06-12 14:22:45 +00:00
Jaco Kroon 4a637d6d11 tcptls: when disabling a server port, we should set the accept_fd to -1.
If we don't set this to -1 if the structure can be potentially re-used
later then it's possible that we'll issue a close() on an unrelated file
descriptor, breaking asterisk in other interesting ways.

I believe this to be an unlikely scenario, but it costs nothing to be
safe.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
2023-06-12 14:07:25 +00:00
Jiajian Zhou 8e3f9dcc7b AMI: Add parking position parameter to Park action
Add a parking space extension parameter (ParkingSpace) to the Park action.
Park action will attempt to park the call to that extension.
If the extension is already in use, then execution will continue at the next priority.

UserNote: New ParkingSpace parameter has been added to AMI action Park.
2023-06-12 13:56:29 +00:00
George Joseph 83781c23b9 test_stasis_endpoints.c: Make channel_messages more stable
The channel_messages test was assuming that stasis would return
messages in a specific order.  This is an incorrect assumption as
message ordering was never guaranteed.  This was causing the test
to fail occasionally.  We now test all the messages for the
required message types instead of testing one by one.

Resolves: #158
2023-06-09 23:28:07 +00:00
George Joseph 6c8b23a688 build: Fix a few gcc 13 issues
* gcc 13 is now catching when a function is declared as returning
  an enum but defined as returning an int or vice versa.  Fixed
  a few in app.h, loader.c, stasis_message.c.

* gcc 13 is also now (incorrectly) complaining of dangling pointers
  when assigning a pointer to a local char array to a char *. Had
  to change that to an ast_alloca.

Resolves: #155
2023-06-09 18:19:49 +00:00
George Joseph b3c2a9cd44 .github: Rework for merge approval 2023-06-08 13:34:47 -06:00
Sean Bright fe15631d38 ast-db-manage: Fix alembic branching error caused by #122.
Fixes #147.
2023-06-06 10:14:08 +00:00