Commit Graph

33710 Commits

Author SHA1 Message Date
Joshua C. Colp ef7a9e91fe 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.

(cherry picked from commit 879d4ff56a)
2023-09-06 16:55:59 +00:00
George Joseph c0898cb265 .github: Fix cherry-pick reminder issues
(cherry picked from commit 12f231c717)
2023-09-06 16:55:59 +00:00
Sean Bright 22f31ecedd 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

(cherry picked from commit d26a00ef34)
2023-09-06 16:55:59 +00:00
Sean Bright db8601dd77 res_geolocation: Ensure required 'location_info' is present.
Fixes #189

(cherry picked from commit e120694711)
2023-09-06 16:55:59 +00:00
Mike Bradeen dd76dfdd57 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.

(cherry picked from commit b8db3dda7e)
2023-09-06 16:55:59 +00:00
Mike Bradeen d9c4a37aaa 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>

(cherry picked from commit 9b5c29d943)
2023-09-06 16:55:59 +00:00
zhengsh 37b1ceab2b 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
(cherry picked from commit 25a766f49d)
2023-09-06 16:55:59 +00:00
George Joseph 5cf2c9f0e4 .github: Minor tweak to Asterisk Releaser
(cherry picked from commit 0f9de8a3f0)
2023-09-06 16:55:59 +00:00
George Joseph e33e6c6429 .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.

(cherry picked from commit cd7e513087)
2023-09-06 16:55:59 +00:00
Naveen Albert 967e8f6beb 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.

(cherry picked from commit d87abb2ec9)
2023-09-06 16:55:59 +00:00
Asterisk Development Team 9e2b9424f5 Update for 20.4.0 2023-07-20 13:04:41 +00:00
Asterisk Development Team 3a0d24d969 Update for 20.4.0-rc2 2023-07-13 13:58:58 +00:00
George Joseph 6cfafdeb37 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-13 05:45:06 -06:00
George Joseph 9b3abda528 doc: Remove obsolete CHANGES-staging and UPGRADE-staging 2023-07-13 05:44:51 -06:00
Asterisk Development Team c35471ad10 Update for 20.4.0-rc1 2023-07-10 11:49:53 +00:00
George Joseph 1491da61eb .github: Updates for AsteriskReleaser
(cherry picked from commit 31663fed53)
2023-07-10 11:49:48 +00:00
Mike Bradeen d180c58c36 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
(cherry picked from commit 2711fba4b9)
2023-07-10 11:49:48 +00:00
Mike Bradeen 9dbd80ab73 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
(cherry picked from commit 9c889911ad)
2023-07-10 11:49:48 +00:00
Mike Bradeen 714950bd7c 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
(cherry picked from commit 3acdffc17e)
2023-07-10 11:49:48 +00:00
George Joseph 244e0b69ea .github: Back out triggering PROpenedOrUpdated by label
(cherry picked from commit 4ff17f44a4)
2023-07-10 11:49:48 +00:00
George Joseph 37d2378073 .github: Move publish docs to new file CreateDocs.yml
(cherry picked from commit caf0fd357c)
2023-07-10 11:49:48 +00:00
George Joseph 46bb9e8fde 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.

(cherry picked from commit 80d042cb01)
2023-07-10 11:49:48 +00:00
George Joseph 64ecad8309 .github: Remove result check from PROpenUpdateGateTests
(cherry picked from commit b008fd5919)
2023-07-10 11:49:48 +00:00
George Joseph f6630916f4 .github: Fix use of 'contains'
(cherry picked from commit 44c0e1b756)
2023-07-10 11:49:48 +00:00
George Joseph 157d478b27 .github: Add recheck label test to additional jobs
(cherry picked from commit 91503078ff)
2023-07-10 11:49:48 +00:00
George Joseph 8a152fb4aa .github: Fix recheck label typos
(cherry picked from commit de40ea0f79)
2023-07-10 11:49:48 +00:00
George Joseph 37dce12781 .github: Fix recheck label manipulation
(cherry picked from commit 07a3784745)
2023-07-10 11:49:48 +00:00
George Joseph fdfe61bf4d .github: Allow PR submit checks to be re-run by label
(cherry picked from commit 426b9c568c)
2023-07-10 11:49:48 +00:00
Olaf Titz f7f2872b3f 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
(cherry picked from commit af2ced484e)
2023-07-10 11:49:48 +00:00
Sean Bright 81b490ab0a res_pjsip_rfc3326: Prefer Q.850 cause code over SIP.
Resolves: #116
(cherry picked from commit 4a1edb9a8c)
2023-07-10 11:49:48 +00:00
Ben Ford ff4f3c1187 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
(cherry picked from commit ad120e5d0b)
2023-07-10 11:49:48 +00:00
Nathan Bruning f0df2eba9d 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
(cherry picked from commit 6084bbfe0e)
2023-07-10 11:49:48 +00:00
Sean Bright ff60aae1c8 pjsip_transport_events.c: Use %zu printf specifier for size_t.
Partially resolves #143.

(cherry picked from commit b7eae29fb9)
2023-07-10 11:49:48 +00:00
Sean Bright 99622c35e0 res_crypto.c: Gracefully handle potential key filename truncation.
Partially resolves #143.

(cherry picked from commit 97b901a29b)
2023-07-10 11:49:48 +00:00
Sean Bright 5497b1abe3 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

(cherry picked from commit 21d3c4ae58)
2023-07-10 11:49:48 +00:00
zhou_jiajian 3ad8ab6d52 res_fax_spandsp.c: Clean up a spaces/tabs issue
(cherry picked from commit f7e1f1fbbd)
2023-07-10 11:49:48 +00:00
Sean Bright f971db6685 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.

(cherry picked from commit ea63148b23)
2023-07-10 11:49:48 +00:00
George Joseph 8e6f15d185 test_statis_endpoints: Fix channel_messages test again
(cherry picked from commit 25bc5544d8)
2023-07-10 11:49:48 +00:00
Sean Bright 0503e2b612 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.

(cherry picked from commit ebc007322b)
2023-07-10 11:49:48 +00:00
Jaco Kroon dafa9917ff 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>
(cherry picked from commit 4a637d6d11)
2023-07-10 11:49:48 +00:00
Jiajian Zhou a6a5498b0d 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.
(cherry picked from commit 8e3f9dcc7b)
2023-07-10 11:49:48 +00:00
George Joseph b7775ae4e1 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
(cherry picked from commit 83781c23b9)
2023-07-10 11:49:48 +00:00
George Joseph ee09bbbb5f 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
(cherry picked from commit 6c8b23a688)
2023-07-10 11:49:48 +00:00
George Joseph 40ff67d636 .github: Rework for merge approval
(cherry picked from commit b3c2a9cd44)
2023-07-10 11:49:48 +00:00
Sean Bright 79d271fa7f ast-db-manage: Fix alembic branching error caused by #122.
Fixes #147.

(cherry picked from commit fe15631d38)
2023-07-10 11:49:48 +00:00
alex2grad 319da11fae app_followme: fix issue with enable_callee_prompt=no (#88)
* app_followme: fix issue with enable_callee_prompt=no

If the FollowMe option 'enable_callee_prompt' is set to 'no' then Asterisk
incorrectly sets a winner channel to the channel from which any control frame was read.

This fix sets the winner channel only to the answered channel.

Resolves: #87

ASTERISK-30326

(cherry picked from commit a8ea16cdf8)
2023-07-10 11:49:48 +00:00
Sean Bright 228244a96e sounds: Update download URL to use HTTPS.
Related to #136

(cherry picked from commit ada3dc2adb)
2023-07-10 11:49:48 +00:00
Miguel Angel Nubla 25de041d5e configure: Makefile downloader enable follow redirects.
If curl is used for building, any download such as a sounds package
will fail to follow HTTP redirects and will download wrong data.

Resolves: #136
(cherry picked from commit 95d339ac7a)
2023-07-10 11:49:47 +00:00
Naveen Albert 8cdf711531 res_musiconhold: Add option to loop last file.
Adds the loop_last option to res_musiconhold,
which allows the last audio file in the directory
to be looped perpetually once reached, rather than
circling back to the beginning again.

Resolves: #122
ASTERISK-30462

UserNote: The loop_last option in musiconhold.conf now
allows the last file in the directory to be looped once reached.

(cherry picked from commit edf488c76e)
2023-07-10 11:49:47 +00:00
Naveen Albert 457a72304d chan_dahdi: Fix Caller ID presentation for FXO ports.
Currently, the presentation for incoming channels is
always available, because it is never actually set,
meaning the channel presentation can be nonsensical.
If the presentation from the incoming Caller ID spill
is private or unavailable, we now update the channel
presentation to reflect this.

Resolves: #120
ASTERISK-30333
ASTERISK-21741

(cherry picked from commit 86a11d5b19)
2023-07-10 11:49:47 +00:00