Commit Graph

33842 Commits

Author SHA1 Message Date
George Joseph f7fd2c8e20 ari-stubs: Fix more local anchor references
Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit a64718c32c)
2023-09-06 16:56:00 +00:00
George Joseph 1d9ea90058 ari-stubs: Fix more local anchor references
Also allow CreateDocs job to be run manually with default branches.

(cherry picked from commit b7dae87d1d)
2023-09-06 16:56:00 +00:00
George Joseph e5a653622a ari-stubs: Fix broken documentation anchors
All of the links that reference page anchors with capital letters in
the ids (#Something) have been changed to lower case to match the
anchors that are generated by mkdocs.

(cherry picked from commit c06f938851)
2023-09-06 16:56:00 +00:00
Bastian Triller 9d41064bc0 res_pjsip_session: Send Session Interval too small response
Handle session interval lower than endpoint's configured minimum timer
when sending first answer. Timer setting is checked during this step and
needs to handled appropriately.
Before this change, no response was sent at all. After this change a
response with 422 Session Interval too small is sent to UAC.

(cherry picked from commit 0c0b99c5a1)
2023-09-06 16:56:00 +00:00
George Joseph abc84c6618 .github: Update workflow-application-token-action to v2
(cherry picked from commit ddbc56505e)
2023-09-06 16:56:00 +00:00
Naveen Albert 7959c64792 app_dial: Fix infinite loop when sending digits.
If the called party hangs up while digits are being
sent, -1 is returned to indicate so, but app_dial
was not checking the return value, resulting in
the hangup being lost and looping forever until
the caller manually hangs up the channel. We now
abort if digit sending fails.

ASTERISK-29428 #close

Resolves: #281
(cherry picked from commit 4542ffe5d5)
2023-09-06 16:56:00 +00:00
Mike Bradeen 7353462be3 app_voicemail: Fix for loop declarations
Resolve for loop initial declarations added in cli changes.

Resolves: #275
(cherry picked from commit 36b749ddf8)
2023-09-06 16:56:00 +00:00
George Joseph 4dcf73b6df alembic: Fix quoting of the 100rel column
Add quoting around the ps_endpoints 100rel column in the ALTER
statements.  Although alembic doesn't complain when generating
sql statements, postgresql does (rightly so).

Resolves: #274
(cherry picked from commit cb9223cdb9)
2023-09-06 16:56:00 +00:00
Naveen Albert 2d1e4aed4f pbx.c: Fix gcc 12 compiler warning.
Resolves: #277
(cherry picked from commit 5077301de6)
2023-09-06 16:56:00 +00:00
zhengsh 6ef2389e9b app_audiosocket: Fixed timeout with -1 to avoid busy loop.
Resolves: asterisk#234
(cherry picked from commit afe461419e)
2023-09-06 16:56:00 +00:00
George Joseph c3f4b56886 download_externals: Fix a few version related issues
* Fixed issue with the script not parsing the new tag format for
  certified releases.  The format changed from certified/18.9-cert5
  to certified-18.9-cert5.

* Fixed issue where the asterisk version wasn't being considered
  when looking for cached versions.

Resolves: #263
(cherry picked from commit 715594767d)
2023-09-06 16:56:00 +00:00
Maximilian Fridrich b2cd0583c9 main/refer.c: Fix double free in refer_data_destructor + potential leak
Resolves: #267
(cherry picked from commit fcdffe0074)
2023-09-06 16:56:00 +00:00
Naveen Albert 534269e3e6 sig_analog: Add Called Subscriber Held capability.
This adds support for Called Subscriber Held for FXS
lines, which allows users to go on hook when receiving
a call and resume the call later from another phone on
the same line, without disconnecting the call. This is
a convenience mechanism that most real PSTN telephone
switches support.

ASTERISK-30372 #close

Resolves: #240

UserNote: Called Subscriber Held is now supported for analog
FXS channels, using the calledsubscriberheld option. This allows
a station  user to go on hook when receiving an incoming call
and resume from another phone on the same line by going on hook,
without disconnecting the call.

(cherry picked from commit 52283301e8)
2023-09-06 16:56:00 +00:00
Matthew Fredrickson 8bf9b1d966 app_macro: Fix locking around datastore access
app_macro sometimes would crash due to datastore list corruption on the
channel because of lack of locking around find and create process for
the macro datastore. This patch locks the channel lock prior to protect
against this problem.

Resolves: #265
(cherry picked from commit 9a28531362)
2023-09-06 16:56:00 +00:00
Matthew Fredrickson 65082ae112 Revert "app_stack: Print proper exit location for PBXless channels."
This reverts commit 617dad4cba.

apps/app_stack.c: Revert buggy gosub patch

This seems to break the case when a predial macro calls a gosub.
When the gosub calls return, the Return function outputs:

app_stack.c:423 return_exec: Return without Gosub: stack is empty

This returns -1 to the calling macro, which returns to app_dial
and causes the call to hangup instead of proceeding with the macro
that invoked the gosub.

Resolves: #253
(cherry picked from commit c8f2698ec6)
2023-09-06 16:56:00 +00:00
George Joseph b145430957 .github: Use generic releaser
(cherry picked from commit d9494ca392)
2023-09-06 16:56:00 +00:00
Jason D. McCormick f86f5fd809 install_prereq: Fix dependency install on aarch64.
Fixes dependency solutions in install_prereq for Debian aarch64
platforms. install_prereq was attempting to forcibly install 32-bit
armhf packages due to the aptitude search for dependencies.

Resolves: #37
(cherry picked from commit fc57dca50d)
2023-09-06 16:56:00 +00:00
MikeNaso 714b9e8b21 res_pjsip.c: Set contact_user on incoming call local Contact header
If the contact_user is configured on the endpoint it will now be set on the local Contact header URI for incoming calls. The contact_user has already been set on the local Contact header URI for outgoing calls.

Resolves: #226
(cherry picked from commit b286d1cca2)
2023-09-06 16:56:00 +00:00
Sean Bright cce02a9d60 extconfig: Allow explicit DB result set ordering to be disabled.
Added a new boolean configuration flag -
`order_multi_row_results_by_initial_column` - to both res_pgsql.conf
and res_config_odbc.conf that allows the administrator to disable the
explicit `ORDER BY` that was previously being added to all generated
SQL statements that returned multiple rows.

Fixes: #179
(cherry picked from commit 29eb4fe620)
2023-09-06 16:55:59 +00:00
George Joseph 44d7349958 rest-api: Run make ari-stubs
An earlier cherry-pick that involved rest-api somehow didn't include
a comment change in res/ari/resource_endpoints.h.  This commit
corrects that.  No changes other than the comment.

(cherry picked from commit 64b29be702)
2023-09-06 16:55:59 +00:00
Naveen Albert 9367926380 res_pjsip_header_funcs: Make prefix argument optional.
The documentation for PJSIP_HEADERS claims that
prefix is optional, but in the code it is actually not.
However, there is no inherent reason for this, as users
may want to retrieve all header names, not just those
beginning with a certain prefix.

This makes the prefix optional for this function,
simply fetching all header names if not specified.
As a result, the documentation is now correct.

Resolves: #230

UserNote: The prefix argument to PJSIP_HEADERS is now
optional. If not specified, all header names will be
returned.

(cherry picked from commit 8be503b663)
2023-09-06 16:55:59 +00:00
George Joseph 5e3652e738 pjproject_bundled: Increase PJSIP_MAX_MODULE to 38
The default is 32 with 8 being used by pjproject itself.  Recent
commits have put us over the limit resulting in assertions in
pjproject.  Since this value is used in invites, dialogs,
transports and subscriptions as well as the global pjproject
endpoint, we don't want to increase it too much.

Resolves: #255
(cherry picked from commit caf51592e7)
2023-09-06 16:55:59 +00:00
Joshua C. Colp 592c85b8de manager: Tolerate stasis messages with no channel snapshot.
In some cases I have yet to determine some stasis messages may
be created without a channel snapshot. This change adds some
tolerance to this scenario, preventing a crash from occurring.

(cherry picked from commit 07d798875d)
2023-09-06 16:55:59 +00:00
Maximilian Fridrich 68fc422247 core/ari/pjsip: Add refer mechanism
This change adds support for refers that are not session based. It
includes a refer implementation for the PJSIP technology which results
in out-of-dialog REFERs being sent to a PJSIP endpoint. These can be
triggered using the new ARI endpoint `/endpoints/refer`.

Resolves: #71

UserNote: There is a new ARI endpoint `/endpoints/refer` for referring
an endpoint to some URI or endpoint.

(cherry picked from commit 8824b845c4)
2023-09-06 16:55:59 +00:00
Naveen Albert 65a2bca074 chan_dahdi: Allow autoreoriginating after hangup.
Currently, if an FXS channel is still off hook when
all calls on the line have hung up, the user is provided
reorder tone until going back on hook again.

In addition to not reflecting what most commercial switches
actually do, it's very common for switches to automatically
reoriginate for the user so that dial tone is provided without
the user having to depress and release the hookswitch manually.
This can increase convenience for users.

This behavior is now supported for kewlstart FXS channels.
It's supported only for kewlstart (FXOKS) mainly because the
behavior doesn't make any sense for ground start channels,
and loop start signalling doesn't provide the necessary DAHDI
event that makes this easy to implement. Likely almost everyone
is using FXOKS over FXOLS anyways since FXOLS is pretty useless
these days.

ASTERISK-30357 #close

Resolves: #224

UserNote: The autoreoriginate setting now allows for kewlstart FXS
channels to automatically reoriginate and provide dial tone to the
user again after all calls on the line have cleared. This saves users
from having to manually hang up and pick up the receiver again before
making another call.

(cherry picked from commit c16cc93a4b)
2023-09-06 16:55:59 +00:00
Joshua C. Colp fcf7187cd6 audiohook: Unlock channel in mute if no audiohooks present.
In the case where mute was called on a channel that had no
audiohooks the code was not unlocking the channel, resulting
in a deadlock.

Resolves: #233
(cherry picked from commit 5ebe1b61bd)
2023-09-06 16:55:59 +00:00
Naveen Albert 18aa912f46 sig_analog: Allow three-way flash to time out to silence.
sig_analog allows users to flash and use the three-way dial
tone as a primitive hold function, simply by never timing
it out.

Some systems allow this dial tone to time out to silence,
so the user is not annoyed by a persistent dial tone.
This option allows the dial tone to time out normally to
silence.

ASTERISK-30004 #close
Resolves: #205

UserNote: The threewaysilenthold option now allows the three-way
dial tone to time out to silence, rather than continuing forever.

(cherry picked from commit 5516763e57)
2023-09-06 16:55:59 +00:00
Holger Hans Peter Freyther 986c71953c 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

(cherry picked from commit a10de8bc72)
2023-09-06 16:55:59 +00:00
Sean Bright e05f51a8ae 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.

(cherry picked from commit b5762cd54e)
2023-09-06 16:55:59 +00:00
phoneben cbcde0624b 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.

(cherry picked from commit c0b8adfe4d)
2023-09-06 16:55:59 +00:00
Sean Bright 4ed17ced6c 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.

(cherry picked from commit df87ada8ac)
2023-09-06 16:55:59 +00:00
Sean Bright 29fbf1b2c8 func_export: Use correct function argument as variable name.
Fixes #208

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