]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
23 months agoapp_queue: Add support for applying caller priority change immediately.
Joshua C. Colp [Fri, 7 Jul 2023 14:29:07 +0000 (11:29 -0300)] 
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 71558e23d0cbf89ffc865335990ce8f121b39f9a)

23 months ago.github: Fix cherry-pick reminder issues
George Joseph [Mon, 17 Jul 2023 15:23:08 +0000 (09:23 -0600)] 
.github: Fix cherry-pick reminder issues

(cherry picked from commit aa038605043f7ddc22574980622ebb21c0adabb5)

23 months agochan_iax2.c: Avoid crash with IAX2 switch support.
Sean Bright [Fri, 7 Jul 2023 19:57:39 +0000 (15:57 -0400)] 
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 39912b91384b4a6a4b4b34cdd338970c184fb096)

23 months agores_geolocation: Ensure required 'location_info' is present.
Sean Bright [Fri, 7 Jul 2023 14:11:44 +0000 (10:11 -0400)] 
res_geolocation: Ensure required 'location_info' is present.

Fixes #189

(cherry picked from commit 4881ec18d05f9d0c74fb6f6d7f0f860b936678c3)

23 months agoAdds manager actions to allow move/remove/forward individual messages
Mike Bradeen [Thu, 29 Jun 2023 18:20:53 +0000 (12:20 -0600)] 
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 74f62dbfe9e16395676f8bdc25f315dc7799eed8)

23 months agoapp_voicemail: add CLI commands for message manipulation
Mike Bradeen [Tue, 20 Jun 2023 16:32:14 +0000 (10:32 -0600)] 
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 6aff1c106564a2653cdfd4e669fe1f7cedf85a76)

23 months agores_rtp_asterisk: Move ast_rtp_rtcp_report_alloc using `rtp->themssrc_valid` into...
zhengsh [Fri, 30 Jun 2023 10:39:20 +0000 (18:39 +0800)] 
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 fe478ddc1455df8b5534186e544aed48127624c6)

23 months ago.github: Minor tweak to Asterisk Releaser
George Joseph [Wed, 12 Jul 2023 12:34:57 +0000 (06:34 -0600)] 
.github: Minor tweak to Asterisk Releaser

(cherry picked from commit f5cb01afaf57913764aa894c30076138d494cdd9)

23 months ago.github: Suppress cherry-pick reminder for some situations
George Joseph [Tue, 11 Jul 2023 12:31:04 +0000 (06:31 -0600)] 
.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 53eb5ceae97cf0e31e5df43eee29b784395f3947)

23 months agosig_analog: Allow immediate fake ring to be suppressed.
Naveen Albert [Thu, 8 Jun 2023 22:04:31 +0000 (22:04 +0000)] 
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 0d1ddb15db490721d66a2b71373e533d43b4c2d3)

2 years agoUpdate for 18.19.0 18.19.0
Asterisk Development Team [Thu, 20 Jul 2023 13:04:41 +0000 (13:04 +0000)] 
Update for 18.19.0

2 years agoUpdate for 18.19.0-rc2 18.19.0-rc2
Asterisk Development Team [Thu, 13 Jul 2023 13:57:56 +0000 (13:57 +0000)] 
Update for 18.19.0-rc2

2 years agoapp.h: Move declaration of ast_getdata_result before its first use
George Joseph [Mon, 10 Jul 2023 13:52:32 +0000 (07:52 -0600)] 
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

2 years agodoc: Remove obsolete CHANGES-staging and UPGRADE-staging
George Joseph [Mon, 10 Jul 2023 13:21:06 +0000 (07:21 -0600)] 
doc: Remove obsolete CHANGES-staging and UPGRADE-staging

2 years agoUpdate for 18.19.0-rc1 18.19.0-rc1
Asterisk Development Team [Mon, 10 Jul 2023 11:49:36 +0000 (11:49 +0000)] 
Update for 18.19.0-rc1

2 years ago.github: Updates for AsteriskReleaser
George Joseph [Fri, 30 Jun 2023 13:01:36 +0000 (07:01 -0600)] 
.github: Updates for AsteriskReleaser

(cherry picked from commit 378166230a548770c4e6d506283bef9531d899d0)

2 years agoapp_voicemail: fix imap compilation errors
Mike Bradeen [Mon, 26 Jun 2023 15:40:03 +0000 (09:40 -0600)] 
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 5f01983abda18d85d660d0c8028de1c282860c1e)

2 years agores_musiconhold: avoid moh state access on unlocked chan
Mike Bradeen [Wed, 31 May 2023 16:37:53 +0000 (10:37 -0600)] 
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 98d8e9b943fddbc59a8b36d9d42bc6e89d8fd505)

2 years agoutils: add lock timestamps for DEBUG_THREADS
Mike Bradeen [Tue, 23 May 2023 18:33:55 +0000 (12:33 -0600)] 
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 a0ce65e9993c7d93ea64bf227a3d64e42c892ab3)

2 years ago.github: Back out triggering PROpenedOrUpdated by label
George Joseph [Thu, 29 Jun 2023 15:06:41 +0000 (09:06 -0600)] 
.github: Back out triggering PROpenedOrUpdated by label

(cherry picked from commit 398a77894cd74c965ce02813e2f9d9e024365c8c)

2 years ago.github: Move publish docs to new file CreateDocs.yml
George Joseph [Tue, 27 Jun 2023 14:07:53 +0000 (08:07 -0600)] 
.github: Move publish docs to new file CreateDocs.yml

(cherry picked from commit 58098d248b83681bc7eb2080468ac696c1685e0e)

2 years agorest-api: Updates for new documentation site
George Joseph [Mon, 26 Jun 2023 12:55:49 +0000 (06:55 -0600)] 
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 812156edfd140c092b45cbe124f8e5c7af7c289c)

2 years ago.github: Remove result check from PROpenUpdateGateTests
George Joseph [Tue, 27 Jun 2023 11:17:45 +0000 (05:17 -0600)] 
.github: Remove result check from PROpenUpdateGateTests

(cherry picked from commit 248b0637ffcb4b36dca4cec2296a6cef43ee313a)

2 years ago.github: Fix use of 'contains'
George Joseph [Mon, 26 Jun 2023 14:45:16 +0000 (08:45 -0600)] 
.github: Fix use of 'contains'

(cherry picked from commit 3c0dd827d14c2fa664fd02916ad1f66024f07970)

2 years ago.github: Add recheck label test to additional jobs
George Joseph [Mon, 26 Jun 2023 13:46:03 +0000 (07:46 -0600)] 
.github: Add recheck label test to additional jobs

(cherry picked from commit 458312a24f69f45a0599ccaa18346c2d10341381)

2 years ago.github: Fix recheck label typos
George Joseph [Mon, 26 Jun 2023 13:21:53 +0000 (07:21 -0600)] 
.github: Fix recheck label typos

(cherry picked from commit 5866e096549a0e9c9d3cb5e2c953ff22fb418719)

2 years ago.github: Fix recheck label manipulation
George Joseph [Mon, 26 Jun 2023 13:11:20 +0000 (07:11 -0600)] 
.github: Fix recheck label manipulation

(cherry picked from commit 58eeb907dd8b838d27360e88a45706852c42f55e)

2 years ago.github: Allow PR submit checks to be re-run by label
George Joseph [Mon, 26 Jun 2023 13:06:37 +0000 (07:06 -0600)] 
.github: Allow PR submit checks to be re-run by label

(cherry picked from commit f747de39f4eca810a177dcef7044caf30ba11e59)

2 years agoapp_voicemail_imap: Fix message count when IMAP server is unavailable
Olaf Titz [Thu, 15 Jun 2023 15:36:26 +0000 (17:36 +0200)] 
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 3b23ee42033842bfb991ee66cfe2e9a450e5ca55)

2 years agores_pjsip_rfc3326: Prefer Q.850 cause code over SIP.
Sean Bright [Mon, 12 Jun 2023 15:31:33 +0000 (11:31 -0400)] 
res_pjsip_rfc3326: Prefer Q.850 cause code over SIP.

Resolves: #116
(cherry picked from commit 897bb03de272eae91fa49d6a424cd4fdc07ac5a2)

2 years agores_pjsip_session: Added new function calls to avoid ABI issues.
Ben Ford [Mon, 5 Jun 2023 19:13:16 +0000 (14:13 -0500)] 
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 23c4d21d1b1f3a71e00b027ad2dd9e1337d52e1d)

2 years agoapp_queue: Add force_longest_waiting_caller option.
Nathan Bruning [Tue, 24 Jan 2023 13:50:39 +0000 (14:50 +0100)] 
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 c88a8aa8b010344bcfd61b1278c9884b2b0e9712)

2 years agopjsip_transport_events.c: Use %zu printf specifier for size_t.
Sean Bright [Mon, 5 Jun 2023 14:50:13 +0000 (10:50 -0400)] 
pjsip_transport_events.c: Use %zu printf specifier for size_t.

Partially resolves #143.

(cherry picked from commit c3abc4d53634cfbf1b39f2c600730026ebdbed8e)

2 years agores_crypto.c: Gracefully handle potential key filename truncation.
Sean Bright [Mon, 5 Jun 2023 14:49:11 +0000 (10:49 -0400)] 
res_crypto.c: Gracefully handle potential key filename truncation.

Partially resolves #143.

(cherry picked from commit e06bb85ad3f8683aa7d83f477167e2f33a85cbfa)

2 years agoconfigure: Remove obsolete and deprecated constructs.
Sean Bright [Thu, 1 Jun 2023 18:53:43 +0000 (18:53 +0000)] 
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 a36af23f205b882c56326a801ccc8e54a92c3258)

2 years agores_fax_spandsp.c: Clean up a spaces/tabs issue
zhou_jiajian [Fri, 26 May 2023 01:53:19 +0000 (09:53 +0800)] 
res_fax_spandsp.c: Clean up a spaces/tabs issue

(cherry picked from commit e1f8dac6be1e8f528f2c7f277f05bba6a6721fd5)

2 years agoast-db-manage: Synchronize revisions between comments and code.
Sean Bright [Tue, 6 Jun 2023 13:42:58 +0000 (09:42 -0400)] 
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 03ba015f2eeba44a43a46e4ab6ff7e8fbe5b4bf7)

2 years agotest_statis_endpoints: Fix channel_messages test again
George Joseph [Mon, 12 Jun 2023 14:34:16 +0000 (08:34 -0600)] 
test_statis_endpoints:  Fix channel_messages test again

(cherry picked from commit b096474f00b236ba4dce3935a051a2453be91f10)

2 years agores_crypto.c: Avoid using the non-portable ALLPERMS macro.
Sean Bright [Mon, 5 Jun 2023 22:17:47 +0000 (18:17 -0400)] 
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 0642f4cb1df529497664ff064a38bd2dbceebbb0)

2 years agotcptls: when disabling a server port, we should set the accept_fd to -1.
Jaco Kroon [Fri, 2 Jun 2023 07:11:22 +0000 (09:11 +0200)] 
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 4e657b6181fb419d957f68698e057b2ca3b80254)

2 years agoAMI: Add parking position parameter to Park action
Jiajian Zhou [Fri, 19 May 2023 02:48:11 +0000 (10:48 +0800)] 
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 84b48b6af18d595a1d5da9df95b00e5e91b5975c)

2 years agotest_stasis_endpoints.c: Make channel_messages more stable
George Joseph [Fri, 9 Jun 2023 16:41:13 +0000 (10:41 -0600)] 
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 833543df0d23b2621174d08228db30eb9b41e279)

2 years agobuild: Fix a few gcc 13 issues
George Joseph [Fri, 9 Jun 2023 14:41:32 +0000 (08:41 -0600)] 
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 acb18c1fc49c35a7bbe61d89ff75f26fdf8e4b56)

2 years ago.github: Rework for merge approval
George Joseph [Tue, 6 Jun 2023 12:08:34 +0000 (06:08 -0600)] 
.github: Rework for merge approval

(cherry picked from commit b3ded75e174adfb6d3cddba34a08ed5c130df5f4)

2 years agoast-db-manage: Fix alembic branching error caused by #122.
Sean Bright [Mon, 5 Jun 2023 20:13:55 +0000 (16:13 -0400)] 
ast-db-manage: Fix alembic branching error caused by #122.

Fixes #147.

(cherry picked from commit 84d266d4f4abba82fb3a5cb3f5367c936d248a64)

2 years agoapp_followme: fix issue with enable_callee_prompt=no (#88)
alex2grad [Mon, 5 Jun 2023 18:23:03 +0000 (14:23 -0400)] 
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 591351d4ad24c6a778eb7279e5adf89716b76d6b)

2 years agosounds: Update download URL to use HTTPS.
Sean Bright [Thu, 1 Jun 2023 15:18:36 +0000 (11:18 -0400)] 
sounds: Update download URL to use HTTPS.

Related to #136

(cherry picked from commit ade23d24a0e6e06c57f8dd9dd4212c40b094c707)

2 years agoconfigure: Makefile downloader enable follow redirects.
Miguel Angel Nubla [Thu, 1 Jun 2023 00:09:39 +0000 (02:09 +0200)] 
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 4c2f035a353da43e06d4c7b3637b18b9835ab10e)

2 years agores_musiconhold: Add option to loop last file.
Naveen Albert [Thu, 25 May 2023 23:58:41 +0000 (23:58 +0000)] 
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 2b302e30e4ddc1230d3b76654833f236bac87896)

2 years agochan_dahdi: Fix Caller ID presentation for FXO ports.
Naveen Albert [Thu, 25 May 2023 23:49:35 +0000 (23:49 +0000)] 
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 3260434b962c5f4745a777266e9537f16ed438f5)

2 years agoAMI: Add CoreShowChannelMap action.
Ben Ford [Thu, 18 May 2023 21:00:16 +0000 (16:00 -0500)] 
AMI: Add CoreShowChannelMap action.

Adds a new AMI action (CoreShowChannelMap) that takes in a channel name
and provides a list of all channels that are connected to that channel,
following local channel connections as well.

Resolves: #104

UserNote: New AMI action CoreShowChannelMap has been added.
(cherry picked from commit d6d77dc1fb2d3ae5125756d1488d083f5d1bcd9e)

2 years agosig_analog: Add fuller Caller ID support.
Naveen Albert [Thu, 18 May 2023 16:29:35 +0000 (16:29 +0000)] 
sig_analog: Add fuller Caller ID support.

A previous change, ASTERISK_29991, made it possible
to send additional Caller ID parameters that were
not previously supported.

This change adds support for analog DAHDI channels
to now be able to receive these parameters for
on-hook Caller ID, in order to enhance the usability
of CPE that support these parameters.

Resolves: #94
ASTERISK-30331

UserNote: Additional Caller ID properties are now supported on
incoming calls to FXS stations, namely the
redirecting reason and call qualifier.

(cherry picked from commit f56477a604086ec9cb0966aba3cecf26aa0eb694)

2 years agores_stasis.c: Add new type 'sdp_label' for bridge creation.
Joe Searle [Thu, 25 May 2023 09:58:45 +0000 (10:58 +0100)] 
res_stasis.c: Add new type 'sdp_label' for bridge creation.

Add new type 'sdp_label' when creating a bridge using the ARI. This will
add labels to the SDP for each stream, the label is set to the
corresponding channel id.

Resolves: #91

UserNote: When creating a bridge using the ARI the 'type' argument now
accepts a new value 'sdp_label' which will configure the bridge to add
labels for each stream in the SDP with the corresponding channel id.

(cherry picked from commit d417ab86e1edb7a97f7bcf19644038f57f87e275)

2 years agoapp_queue: Preserve reason for realtime queues
Niklas Larsson [Fri, 5 May 2023 13:30:13 +0000 (15:30 +0200)] 
app_queue: Preserve reason for realtime queues

When Asterisk is restarted it does not preserve paused reason for
members of realtime queues. This was fixed for non-realtime queues in
ASTERISK_25732

Resolves: #66

UpgradeNote: Add a new column to the queue_member table:
reason_paused VARCHAR(80) so the reason can be preserved.

UserNote: Make paused reason in realtime queues persist an
Asterisk restart. This was fixed for non-realtime
queues in ASTERISK_25732.

(cherry picked from commit 12fb5d8589ded5ed8e5827288b8b2fb84d22abdc)

2 years ago.github: Fix issues with cherry-pick-reminder
George Joseph [Mon, 5 Jun 2023 16:37:41 +0000 (10:37 -0600)] 
.github: Fix issues with cherry-pick-reminder

(cherry picked from commit 4128a922e0b8c8ca5eb9787e6b4d7b47e451718a)

2 years agoindications: logging changes
Mike Bradeen [Tue, 16 May 2023 18:43:37 +0000 (12:43 -0600)] 
indications: logging changes

Increase verbosity to indicate failure due to missing country
and to specify default on CLI dump

Resolves: #89
(cherry picked from commit 4aa213d40841307e28af0e11cd3c791c2e3851f2)

2 years ago.github Ignore error when adding reviewrs to PR
George Joseph [Mon, 5 Jun 2023 13:16:17 +0000 (07:16 -0600)] 
.github Ignore error when adding reviewrs to PR

(cherry picked from commit 1ba39efc9eeb006908b386ddb0aff11966df6bb6)

2 years ago.github: Update field descriptions for AsteriskReleaser
George Joseph [Fri, 26 May 2023 14:51:41 +0000 (08:51 -0600)] 
.github: Update field descriptions for AsteriskReleaser

(cherry picked from commit a2280e1767530f2f7deb50f3f29133775ebcd44c)

2 years agocallerid: Allow specifying timezone for date/time.
Naveen Albert [Thu, 18 May 2023 17:31:14 +0000 (17:31 +0000)] 
callerid: Allow specifying timezone for date/time.

The Caller ID generation routine currently is hardcoded
to always use the system time zone. This makes it possible
to optionally specify any TZ-format time zone.

Resolves: #98
ASTERISK-30330

(cherry picked from commit 8a03ed68773e2b637fd7ff8dd410379cbbfe17b0)

2 years agochan_pjsip: Allow topology/session refreshes in early media state
Maximilian Fridrich [Wed, 10 May 2023 14:38:04 +0000 (16:38 +0200)] 
chan_pjsip: Allow topology/session refreshes in early media state

With this change, session modifications in the early media state are
possible if the SDP was sent reliably and confirmed by a PRACK. For
details, see RFC 6337, escpecially section 3.2.

Resolves: #73
(cherry picked from commit a4cd45224628fe36218aec18e6274ea2d4583f7b)

2 years agochan_dahdi: Fix broken hidecallerid setting.
Naveen Albert [Thu, 18 May 2023 17:37:19 +0000 (17:37 +0000)] 
chan_dahdi: Fix broken hidecallerid setting.

The hidecallerid setting in chan_dahdi.conf currently
is broken for a couple reasons.

First, the actual code in sig_analog to "allow" or "block"
Caller ID depending on this setting improperly used
ast_set_callerid instead of updating the presentation.
This issue was mostly fixed in ASTERISK_29991, and that
fix is carried forward to this code as well.

Secondly, the hidecallerid setting is set on the DAHDI
pvt but not carried forward to the analog pvt properly.
This is because the chan_dahdi config loading code improperly
set permhidecallerid to permhidecallerid from the config file,
even though hidecallerid is what is actually set from the config
file. (This is done correctly for call waiting, a few lines above.)
This is fixed to read the proper value.

Thirdly, in sig_analog, hidecallerid is set to permhidecallerid
only on hangup. This can lead to potential security vulnerabilities
as an allowed Caller ID from an initial call can "leak" into subsequent
calls if no hangup occurs between them. This is fixed by setting
hidecallerid to permcallerid when calls begin, rather than when they end.
This also means we don't need to also set hidecallerid in chan_dahdi.c
when copying from the config, as we would have to otherwise.

Fourthly, sig_analog currently only allows dialing *67 or *82 if
that would actually toggle the presentation. A comment is added
clarifying that this behavior is okay.

Finally, a couple log messages are updated to be more accurate.

Resolves: #100
ASTERISK-30349 #close

(cherry picked from commit d496544d7bb0d1b839ae581d9ef2b46cbf1bf9cd)

2 years ago.github: Change title of AsteriskReleaser job
George Joseph [Tue, 23 May 2023 14:04:42 +0000 (08:04 -0600)] 
.github: Change title of AsteriskReleaser job

(cherry picked from commit 714cb0050436bf506db0ddbd9454a82044e61b62)

2 years agoasterisk.c: Fix option warning for remote console.
Naveen Albert [Thu, 18 May 2023 18:57:34 +0000 (18:57 +0000)] 
asterisk.c: Fix option warning for remote console.

Commit 09e989f972e2583df4e9bf585c246c37322d8d2f
categorized the T option as not being compatible
with remote consoles, but they do affect verbose
messages with remote console. This fixes this.

Resolves: #102
(cherry picked from commit 67d20b8fd8774efa86b0271270b0b1785614a592)

2 years ago.github: Don't add cherry-pick reminder if it's already present
George Joseph [Mon, 22 May 2023 18:54:42 +0000 (12:54 -0600)] 
.github: Don't add cherry-pick reminder if it's already present

(cherry picked from commit fd98c6cd10009acc5f37374f522d91f7e775e495)

2 years ago.github: Fix quoting in PROpenedOrUpdated
George Joseph [Tue, 16 May 2023 22:11:08 +0000 (16:11 -0600)] 
.github: Fix quoting in PROpenedOrUpdated

(cherry picked from commit 2c7304e4161c624c3c932c9540313814e38d0e34)

2 years ago.github: Add cherry-pick reminder to new PRs
George Joseph [Mon, 15 May 2023 15:32:15 +0000 (09:32 -0600)] 
.github: Add cherry-pick reminder to new PRs

(cherry picked from commit 1115b327f98e4c7ff7fec65a0b8e4c3015e36d7a)

2 years agoconfigure: fix test code to match gethostbyname_r prototype.
Jaco Kroon [Wed, 10 May 2023 21:13:17 +0000 (23:13 +0200)] 
configure: fix test code to match gethostbyname_r prototype.

This enables the test to work with CC=clang.

Without this the test for 6 args would fail with:

utils.c:99:12: error: static declaration of 'gethostbyname_r' follows non-static declaration
static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
           ^
/usr/include/netdb.h:177:12: note: previous declaration is here
extern int gethostbyname_r (const char *__restrict __name,
           ^

Fixing the expected return type to int sorts this out.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
(cherry picked from commit 3067977eac4c9ae7b403ca9f98add23e11adad47)

2 years agores_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#76)
Sean Bright [Thu, 11 May 2023 20:24:30 +0000 (16:24 -0400)] 
res_pjsip_pubsub.c: Use pjsip version for pending NOTIFY check. (#76)

The functionality we are interested in is present only in pjsip 2.13
and newer.

Resolves: #45
(cherry picked from commit 3e2a28fc3d17f2e9c275108753feaa823115d9df)

2 years agores_sorcery_memory_cache.c: Fix memory leak
zhengsh [Tue, 2 May 2023 19:12:38 +0000 (03:12 +0800)] 
res_sorcery_memory_cache.c: Fix memory leak

Replace the original call to ast_strdup with a call to ast_strdupa to fix the leak issue.

Resolves: #55
ASTERISK-30429

(cherry picked from commit 5e16557127fb5e60a6d6b43357afcf663d1751d6)

2 years agoxml.c: Process XML Inclusions recursively.
Sean Bright [Tue, 9 May 2023 13:27:33 +0000 (09:27 -0400)] 
xml.c: Process XML Inclusions recursively.

If processing an XInclude results in new <xi:include> elements, we
need to run XInclude processing again. This continues until no
replacement occurs or an error is encountered.

There is a separate issue with dynamic strings (ast_str) that will be
addressed separately.

Resolves: #65
(cherry picked from commit 573bdbe92416d2055e526f520bb9647c7b4f3925)

2 years ago.github: Tweak improvement issue type language.
Joshua C. Colp [Tue, 9 May 2023 13:47:05 +0000 (10:47 -0300)] 
.github: Tweak improvement issue type language.

(cherry picked from commit 8e562cea88987d29327816be3b18637e28c4ce8a)

2 years ago.github: Tweak new feature language, and move feature requests elsewhere.
Gitea [Tue, 9 May 2023 13:42:45 +0000 (10:42 -0300)] 
.github: Tweak new feature language, and move feature requests elsewhere.

(cherry picked from commit e1b29b636c1b26e809b40d37728891f0b68498fc)

2 years ago.github: Fix staleness check to only run on certain labels.
Joshua C. Colp [Tue, 9 May 2023 09:17:17 +0000 (06:17 -0300)] 
.github: Fix staleness check to only run on certain labels.

(cherry picked from commit d7b647e97f425ef242970ec0247b5ccdd63db61c)

2 years agoUpdate for 18.18.1 18.18.1
Asterisk Development Team [Fri, 7 Jul 2023 19:07:03 +0000 (19:07 +0000)] 
Update for 18.18.1

2 years agoapply_patches: Use globbing instead of file/sort.
Sean Bright [Thu, 6 Jul 2023 17:51:32 +0000 (13:51 -0400)] 
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.

2 years agoapply_patches: Sort patch list before applying
George Joseph [Thu, 6 Jul 2023 12:37:50 +0000 (06:37 -0600)] 
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

2 years agopjsip: Upgrade bundled version to pjproject 2.13.1
Stanislav Abramenkov [Wed, 5 Jul 2023 08:08:35 +0000 (11:08 +0300)] 
pjsip: Upgrade bundled version to pjproject 2.13.1

2 years agoUpdate for 18.18.0 18.18.0
Asterisk Development Team [Tue, 23 May 2023 14:10:22 +0000 (14:10 +0000)] 
Update for 18.18.0

2 years agoSet up new ChangeLogs directory
George Joseph [Tue, 9 May 2023 14:27:59 +0000 (08:27 -0600)] 
Set up new ChangeLogs directory

2 years agoUpdate for 18.18.0-rc1 18.18.0-rc1
Asterisk Development Team [Mon, 8 May 2023 17:55:23 +0000 (17:55 +0000)] 
Update for 18.18.0-rc1

2 years ago.github: Add AsteriskReleaser
George Joseph [Fri, 5 May 2023 18:30:08 +0000 (12:30 -0600)] 
.github: Add AsteriskReleaser

(cherry picked from commit 2392a5bb741c44354445db0dcff0d0a9fe1925ee)

2 years agochan_pjsip: also return all codecs on empty re-INVITE for late offers
Henning Westerholt [Wed, 3 May 2023 09:19:35 +0000 (09:19 +0000)] 
chan_pjsip: also return all codecs on empty re-INVITE for late offers

We should also return all codecs on an re-INVITE without SDP for a
call that used late offer (e.g. no SDP in the initial INVITE, SDP
in the ACK). Bugfix for feature introduced in ASTERISK-30193
(https://issues.asterisk.org/jira/browse/ASTERISK-30193)

Migration from previous gerrit change that was not merged.

(cherry picked from commit 8711c84e3c92ac10a62fc412733419bc2ba82400)

2 years agocel: add local optimization begin event
Mike Bradeen [Tue, 2 May 2023 15:20:22 +0000 (09:20 -0600)] 
cel: add local optimization begin event

The current AST_CEL_LOCAL_OPTIMIZE event is and has been
triggered on a local optimization end to serve as a flag
indicating the event occurred.  This change adds a second
AST_CEL_LOCAL_OPTIMIZE_BEGIN event for further detail.

Resolves: #52

UpgradeNote: The existing AST_CEL_LOCAL_OPTIMIZE can continue
to be used as-is and the AST_CEL_LOCAL_OPTIMIZE_BEGIN event
can be ignored if desired.

UserNote: The new AST_CEL_LOCAL_OPTIMIZE_BEGIN can be used
by itself or in conert with the existing
AST_CEL_LOCAL_OPTIMIZE to book-end local channel optimizaion.

(cherry picked from commit fa18f2d71e431a428b4cc3a412fb14184780a2f9)

2 years agocore: Cleanup gerrit and JIRA references. (#40)
Sean Bright [Wed, 3 May 2023 15:39:14 +0000 (11:39 -0400)] 
core: Cleanup gerrit and JIRA references. (#40)

* Remove .gitreview and switch to pulling the main asterisk branch
  version from configure.ac instead.

* Replace references to JIRA with GitHub.

* Other minor cleanup found along the way.

Resolves: #39
(cherry picked from commit 6f218514fb17e468c46dfa955e9659856efeb402)

2 years ago.github: Fix CherryPickTest to only run when it should
George Joseph [Wed, 3 May 2023 15:27:57 +0000 (09:27 -0600)] 
.github: Fix CherryPickTest to only run when it should

Fixed CherryPickTest so it triggers only on the
"cherry-pick-test" label instead of all labels.

(cherry picked from commit 49abb48678bdaf5c753e4bf84690cc76b2a1dc94)

2 years ago.github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS
George Joseph [Tue, 2 May 2023 20:09:47 +0000 (14:09 -0600)] 
.github: Fix reference to CHERRY_PICK_TESTING_IN_PROGRESS

(cherry picked from commit f508ae9c636968588818cc371fdd36927b35d7b3)

2 years ago.github: Remove separate set labels step from new PR
George Joseph [Tue, 2 May 2023 18:11:24 +0000 (12:11 -0600)] 
.github: Remove separate set labels step from new PR

(cherry picked from commit 135764959e05939bf7a9932102925d9d2d989bea)

2 years ago.github: Refactor CP progress and add new PR test progress
George Joseph [Tue, 2 May 2023 18:04:22 +0000 (12:04 -0600)] 
.github: Refactor CP progress and add new PR test progress

(cherry picked from commit 0395ee476056c24d1fd7d1b70ec9c3c3e5365c25)

2 years agores_pjsip: mediasec: Add Security-Client headers after 401
Maximilian Fridrich [Tue, 2 May 2023 08:55:39 +0000 (10:55 +0200)] 
res_pjsip: mediasec: Add Security-Client headers after 401

When using mediasec, requests sent after a 401 must still contain the
Security-Client header according to
draft-dawes-sipcore-mediasec-parameter.

Resolves: #48
(cherry picked from commit ecd5f911252e3c86bede4440f9c34392eb703793)

2 years ago.github: Add cherry-pick test progress labels
George Joseph [Tue, 2 May 2023 14:56:37 +0000 (08:56 -0600)] 
.github: Add cherry-pick test progress labels

(cherry picked from commit eece5824aae43fd4d45f501fb88e424640a3c07e)

2 years agoLICENSE: Update link to trademark policy.
Joshua C. Colp [Mon, 1 May 2023 15:37:45 +0000 (12:37 -0300)] 
LICENSE: Update link to trademark policy.

Resolves: #43
(cherry picked from commit f85587815fe189b576fc770fb9d5e43c326d7187)

2 years agochan_dahdi: Add dialmode option for FXS lines. (#36)
InterLinked1 [Tue, 2 May 2023 14:05:12 +0000 (09:05 -0500)] 
chan_dahdi: Add dialmode option for FXS lines. (#36)

Currently, both pulse and tone dialing are always enabled
on all FXS lines, with no way of disabling one or the other.

In some circumstances, it is desirable or necessary to
disable one of these, and this behavior can be problematic.

A new "dialmode" option is added which allows setting the
methods to support on a per channel basis for FXS (FXO
signalled lines). The four options are "both", "pulse",
"dtmf"/"tone", and "none".

Additionally, integration with the CHANNEL function is
added so that this setting can be updated for a channel
during a call.

Resolves: #35
ASTERISK-29992

UserNote: A "dialmode" option has been added which allows
specifying, on a per-channel basis, what methods of
subscriber dialing (pulse and/or tone) are permitted.

Additionally, this can be changed on a channel
at any point during a call using the CHANNEL
function.

(cherry picked from commit 5d1dd11143cf9fc899881476a1898aecf42e95ae)

2 years ago.github: Update issue templates
George Joseph [Mon, 1 May 2023 15:37:29 +0000 (09:37 -0600)] 
.github: Update issue templates

(cherry picked from commit a8a0adcdda5bd0335dfb25f9a45f52977e48674b)

2 years ago.github: Remove unnecessary parameter in CherryPickTest
George Joseph [Mon, 1 May 2023 12:48:32 +0000 (06:48 -0600)] 
.github: Remove unnecessary parameter in CherryPickTest

(cherry picked from commit f4a3012619c48fc0b0d26793eddd413512c422ac)

2 years agoInitial GitHub PRs
George Joseph [Fri, 28 Apr 2023 18:31:03 +0000 (12:31 -0600)] 
Initial GitHub PRs

(cherry picked from commit ac403ec484df307fe31c364be08b3bfbf0e49827)

2 years agoInitial GitHub Issue Templates
George Joseph [Fri, 28 Apr 2023 17:17:21 +0000 (11:17 -0600)] 
Initial GitHub Issue Templates

(cherry picked from commit 790f208c6e8218b2dfac9f04e2f9665f694c77e7)

2 years agopbx_dundi: Fix PJSIP endpoint configuration check.
Joshua C. Colp [Thu, 13 Apr 2023 09:35:17 +0000 (06:35 -0300)] 
pbx_dundi: Fix PJSIP endpoint configuration check.

ASTERISK-28233

Change-Id: I0f11c096b307a6178e22ca49d9c756343f0e1fdc
(cherry picked from commit f5c9f7d3c802a0f504d099274eaad7893ee7bb48)

2 years agoRevert "app_queue: periodic announcement configurable start time."
Joshua Colp [Tue, 11 Apr 2023 23:37:20 +0000 (18:37 -0500)] 
Revert "app_queue: periodic announcement configurable start time."

This reverts commit c405630810bd92ac27d7618d3470dbac11aecced.

Reason for revert: Causes segmentation fault.

Change-Id: Ib0c8c592f8d4f0a5e3889aeadfe8bdcde800ba42
(cherry picked from commit a8ce41b7f7a8e257c8516c0751fc1a2d894bf102)

2 years agopbx_dundi: Add PJSIP support.
Naveen Albert [Fri, 9 Dec 2022 14:18:26 +0000 (14:18 +0000)] 
pbx_dundi: Add PJSIP support.

Adds PJSIP as a supported technology to DUNDi.

To facilitate this, we now allow an endpoint to be specified
for outgoing PJSIP calls. We also allow users to force a specific
channel technology for outgoing SIP-protocol calls.

ASTERISK-28109 #close
ASTERISK-28233 #close

Change-Id: I2e28e5a5d007bd49e3df113ad567b011103899bf
(cherry picked from commit 4e602a1afe511fdcefe01e72f6f0b28059745327)

2 years agores_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.
Naveen Albert [Fri, 17 Feb 2023 13:45:16 +0000 (13:45 +0000)] 
res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters.

The current STIR/SHAKEN signing process is inconsistent with the
RFCs in a couple ways that can cause interoperability issues.

RFC8225 specifies that the keys must be ordered lexicographically, but
currently the fields are simply ordered according to the order
in which they were added to the JSON object, which is not
compliant with the RFC and can cause issues with some carriers.

To fix this, we now leverage libjansson's ability to dump a JSON
object sorted by key value, yielding the correct field ordering.

Additionally, telephone numbers must have any leading + prefix removed
and must not contain characters outside of 0-9, *, and # in order
to comply with the RFCs. Numbers are now properly formatted as such.

ASTERISK-30407 #close

Change-Id: Iab76d39447c4b8cf133de85657dba02fda07f9a2
(cherry picked from commit 1bbcb98558be145c431f3f07cf7d2b9b00ac78b6)