Commit Graph

5269 Commits

Author SHA1 Message Date
Mike Bradeen e8f548c155 app_macro: Remove deprecated module.
For most modules that interacted with app_macro, this change is limited
to no longer looking for the current context from the macrocontext when
set.  Additionally, the following modules are impacted:

app_dial - no longer supports M^ connected/redirecting macro
app_minivm - samples written using macro will no longer work.
The sample needs a re-write

app_queue - can no longer a macro on the called party's channel.
Use gosub which is currently supported

ccss - no callback macro, gosub only

app_voicemail - no macro support

channel  - remove macrocontext and priority, no connected line or
redirection macro options
options - stdexten is deprecated to gosub as the default and only
pbx - removed macrolock
pbx_dundi - no longer look for macro

snmp - removed macro context, exten, and priority

ASTERISK-30304

Change-Id: I830daab293117179b8d61bd4df0d971a1b3d07f6
2023-01-10 14:07:44 -06:00
Naveen Albert f7726430b2 app_broadcast: Add Broadcast application
Adds a new application, Broadcast, which can be used for
one-to-many transmission and many-to-one reception of
channel audio in Asterisk. This is similar to ChanSpy,
except it is designed for multiple channel targets instead
of a single one. This can make certain kinds of audio
manipulation more efficient and streamlined. New kinds
of audio injection impossible with ChanSpy are also made
possible.

ASTERISK-30180 #close

Change-Id: I7ba72f765dbab9b58deeae028baca3f4f8377726
2023-01-05 06:12:05 -06:00
Naveen Albert a46d5f9b76 app_cdr: Remove deprecated application and option.
This removes the deprecated NoCDR application, which
was deprecated in Asterisk 12, having long been fully
superseded by the CDR_PROP function.

The deprecated e option to ResetCDR is also removed
for the same reason.

ASTERISK-30371 #close

Change-Id: Id9ed094d8e4baf98bcbc610035c2295bfafe9ec0
2023-01-04 10:00:05 -06:00
Mike Bradeen 4095a382da chan_sip: Remove deprecated module.
ASTERISK-30297

Change-Id: Ic700168c80b68879d9cee8bb07afe2712fb17996
2023-01-03 09:00:42 -06:00
Naveen Albert 4168fa3466 app_voicemail_odbc: Fix string overflow warning.
Fixes a negative offset warning by initializing
the buffer to empty.

Additionally, although it doesn't currently complain
about it, the size of a buffer is increased to
accomodate the maximum size contents it could have.

ASTERISK-30240 #close

Change-Id: I8eecedf14d3f2a75864797f802277cac89a32877
2022-12-20 08:53:59 -06:00
Naveen Albert d60bd09851 app_sendtext: Remove references to removed applications.
Removes see-also references to applications that don't
exist anymore (removed in Asterisk 19),
so these dead links don't show up on the wiki.

ASTERISK-30347 #close

Change-Id: I9539bc30f57cd65aa4e2d5ce8185eafa09567909
2022-12-20 08:14:44 -06:00
Naveen Albert a28421a676 app_if: Fix format truncation errors.
Fixes format truncation warnings in gcc 12.2.1.

ASTERISK-30349 #close

Change-Id: I42be4edf0284358b906e765d1966b6b9d66e1d3c
2022-12-13 13:04:53 +00:00
Naveen Albert e3ea1b88ff app_if: Adds conditional branch applications
Adds the If, ElseIf, Else, ExitIf, and EndIf
applications for conditional execution
of a block of dialplan, similar to the While,
EndWhile, and ExitWhile applications. The
appropriate branch is executed at most once
if available and may be broken out of while
inside.

ASTERISK-29497

Change-Id: I3aa3bd35a5add82465c6ee9bd86b64601f0e1f49
2022-12-08 13:57:33 -06:00
Naveen Albert 9e14523ca3 app_voicemail: Fix missing email in msg_create_from_file.
msg_create_from_file currently does not dispatch emails,
which means that applications using this function, such
as MixMonitor, will not trigger notifications to users
(only AMI events are sent our currently). This is inconsistent
with other ways users can receive voicemail.

This is fixed by adding an option that attempts to send
an email and falling back to just the notifications as
done now if that fails. The existing behavior remains
the default.

ASTERISK-30283 #close

Change-Id: I597cbb9cf971a18d8776172b26ab187dc096a5c7
2022-12-08 12:18:14 -06:00
Mike Bradeen d0140fc7fe app_osplookup: Remove deprecated module.
ASTERISK-30302

Change-Id: I2268189646fa0b587675d8619322818143172474
2022-12-08 08:11:30 -06:00
Naveen Albert 1c8acdb1c0 app_mixmonitor: Add option to use real Caller ID for voicemail.
MixMonitor currently uses the Connected Line as the Caller ID
for voicemails. This is due to the implementation being written
this way for use with Digium phones. However, in general this
is not correct for generic usage in the dialplan, and people
may need the real Caller ID instead. This adds an option to do that.

ASTERISK-30286 #close

Change-Id: I3d0ce76dfe75e2a614e0f709ab27acbd2478267c
2022-12-08 08:07:03 -06:00
Naveen Albert 79562cf1a5 sla: Prevent deadlock and crash due to autoservicing.
SLAStation currently autoservices the station channel before
creating a thread to actually dial the trunk. This leads
to duplicate servicing of the channel which causes assertions,
deadlocks, crashes, and moreover not the correct behavior.

Removing the autoservice prevents the crash, but if the station
hangs up before the trunk answers, the call hangs since the hangup
was never serviced on the channel.

This is fixed by not autoservicing the channel, but instead
servicing it in the thread dialing the trunk, since it is doing
so synchronously to begin with. Instead of sleeping for 100ms
in a loop, we simply use the channel for timing, and abort
if it disappears.

The same issue also occurs with SLATrunk when a call is answered,
because ast_answer invokes ast_waitfor_nandfds. Thus, we use
ast_raw_answer instead which does not cause any conflict and allows
the call to be answered normally without thread blocking issues.

ASTERISK-29998 #close

Change-Id: Icc237d50354b5910000d2305901e86d2c87bb9d8
2022-11-28 11:19:19 -06:00
Naveen Albert 7e1340eb77 app_mixmonitor: Add option to delete files on exit.
Adds an option that allows MixMonitor to delete
its copy of any recording files before exiting.

This can be handy in conjunction with options
like m, which copy the file elsewhere, and the
original files may no longer be needed.

ASTERISK-30284 #close

Change-Id: Ida093679c67e300efc154a97b6d8ec0f104e581e
2022-11-08 09:17:01 -06:00
Naveen Albert 12d18b0a40 app_stack: Print proper exit location for PBXless channels.
When gosub is executed on channels without a PBX, the context,
extension, and priority are initialized to the channel driver's
default location for that endpoint. As a result, the last Return
will restore this location and the Gosub logs will print out bogus
information about our exit point.

To fix this, on channels that don't have a PBX, the execution
location is left intact on the last return if there are no
further stack frames left. This allows the correct location
to be printed out to the user, rather than the bogus default
context.

ASTERISK-30076 #close

Change-Id: I1d42a99c9aa9e3708d32718863175158a894e414
2022-11-02 10:48:53 -05:00
Naveen Albert d411ad8f08 app_bridgewait: Add option to not answer channel.
Adds the n option to not answer the channel when calling
BridgeWait, so the application can be used without
forcing answer supervision.

ASTERISK-30216 #close

Change-Id: I6b85ef300b1f7b5170f8537e2b10889cc2e6605a
2022-09-26 10:41:54 -05:00
Naveen Albert 41ce3711da app_amd: Add option to play audio during AMD.
Adds an option that will play an audio file
to the party while AMD is running on the
channel, so the called party does not just
hear silence.

ASTERISK-30179 #close

Change-Id: I4af306274552b61b3d9f0883c33f698abd4699b6
2022-09-26 09:30:36 -05:00
Naveen Albert 4fbaf86a2b app_confbridge: Add end_marked_any option.
Adds the end_marked_any option, which can be used
to kick a user from a conference if any marked user
leaves.

ASTERISK-30211 #close

Change-Id: I9e8da7ccb892e522546c0f2b5476d172e022c2f5
2022-09-11 16:22:08 -05:00
Naveen Albert 85102e4e8f general: Very minor coding guideline fixes.
Fixes a few coding guideline violations:
* Use of C99 comments
* Opening brace on same line as function prototype

ASTERISK-30163 #close

Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
2022-08-17 11:11:32 -05:00
Naveen Albert 31887d636a app_confbridge: Fix memory leak on updated menu options.
If the CONFBRIDGE function is used to dynamically set
menu options, a memory leak occurs when a menu option
that has been set is overridden, since the menu entry
is not destroyed before being freed. This ensures that
it is.

Additionally, logic that duplicates the destroy function
is removed in lieu of the destroy function itself.

ASTERISK-28422 #close

Change-Id: I71cfb5c24e636984d41086d1333a416dc12ff995
2022-08-08 05:20:04 -05:00
Naveen Albert cf0f1829fb general: Remove obsolete SVN references.
There are a handful of files in the tree that
reference an SVN link for the coding guidelines.

This removes these because the links are dead
and the vast majority of source files do not
contain these links, so this is more consistent.

app_skel still maintains an (up to date) link
to the coding guidelines.

ASTERISK-30159 #close

Change-Id: I35bbb20f66982e98099cff3029ede20091ffdac7
2022-08-01 11:06:37 -05:00
Naveen Albert 5121648efe app_meetme: Add missing AMI documentation.
The MeetmeList and MeetmeListRooms AMI
responses are currently completely undocumented.
This adds documentation for these responses.

ASTERISK-30018 #close

Change-Id: Id93135b7edf01de6f8fba266e2122989dc8996b8
2022-08-01 11:05:20 -05:00
Naveen Albert f5378f63c4 general: Improve logging levels of some log messages.
Adjusts some logging levels to be more or less important,
that is more prominent when actual problems occur and less
prominent for less noteworthy things.

ASTERISK-30153 #close

Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
2022-08-01 11:03:43 -05:00
Naveen Albert 0699c275d8 app_confbridge: Add missing AMI documentation.
Documents the ConfbridgeListRooms AMI response,
which is currently not documented.

ASTERISK-30020 #close

Change-Id: Id6fff7a936244bae7b52686301eb740c1169cdea
2022-08-01 08:44:31 -05:00
Naveen Albert 2843e5678d app_confbridge: Always set minimum video update interval.
Currently, if multiple video-enabled ConfBridges are
conferenced together, we immediately get into a scenario
where an infinite sequence of video updates fills up
the taskprocessor queue and causes memory consumption
to climb unabated until Asterisk is killed. This is due
to the core bridging mechanism that provides video updates
(softmix_bridge_write_control in bridge_softmix.c)
continously updating all the channels in the bridge with
video updates.

The logic to do so in the core is that the video updates
should be provided if the video_update_discard property
for the bridge is 0, or if enough time has elapsed since
the last video update. Thus, we already have a safeguard
built in to ensure the scenario described above does not
happen. Currently, however, this safeguard is not being
adequately ensured.

In app_confbridge, the video_update_discard property
defaults to 2000, which is a healthy value that should
completely prevent this issue. However, this value is
only set onto the bridge in the SFU video mode. This
leaves video modes such as follow_talker completely
vulnerable, since video_update_discard will actually
be 0, since the default or set value was never applied.
As a result, the core bridging mechanism will always
try to provide video updates regardless of when the last
one was sent.

To prevent this issue from happening, we now always
set the video_update_discard property on the bridge
with the value from the bridge profile. The app_confbridge
defaults will thus ensure that infinite video updates
no longer happen in any video mode.

ASTERISK-29907 #close

Change-Id: I4accb2536ac62797950468e9930f12ef7dd486b2
2022-07-13 18:04:29 -05:00
Naveen Albert bcc18ca9f5 general: Fix various typos.
ASTERISK-30089 #close

Change-Id: I1f5db911fd05a3a211c522c13e990fa1d0e62275
2022-07-12 07:46:03 -05:00
Naveen Albert 626fefdf7d app_dial: Fix dial status regression.
ASTERISK_28638 caused a regression by incorrectly aborting
early and overwriting the status on certain calls.
This was exhibited by certain technologies such as DAHDI,
where DAHDI returns NULL for the request if a line is busy.
This caused the BUSY condition to be incorrectly treated
as CHANUNAVAIL because the DIALSTATUS was getting incorrectly
overwritten and call handling was aborted early.

This is fixed by instead checking if any valid peers have been
specified, as opposed to checking the list size of successful
requests. This is because the latter could be empty but this
does not indicate any kind of problem. This restores the
previous working behavior.

ASTERISK-29989 #close

Change-Id: I4d4b209b967816b1bc791534593ababa2b99bb88
2022-07-01 10:18:47 -05:00
Naveen Albert ae8a36a7d9 app_dial: Propagate outbound hook flashes.
The Dial application currently stops hook flashes
dead in their tracks from propagating through on
outbound calls. This fixes that so they can go
down the wire.

ASTERISK-30115 #close

Change-Id: Id4e78b29a049f35c5b1e7520eaa10d0eb5b7f97c
2022-07-01 10:14:17 -05:00
Naveen Albert 4a11ae7ecf pbx: Add helper function to execute applications.
Finding an application and executing it if found is
a common task throughout Asterisk. This adds a helper
function around pbx_exec to do this, to eliminate
redundant code and make it easier for modules to
substitute variables and execute applications by name.

ASTERISK-30061 #close

Change-Id: Ifee4d2825df7545fb515d763d393065675140c84
2022-06-30 15:19:56 -05:00
Naveen Albert cc8e098e1d app_voicemail: Add option to prevent message deletion.
Adds an option to VoiceMailMain that prevents the user
from deleting messages during that application invocation.
This can be useful for public or shared mailboxes, where
some users should be able to listen to messages but not
delete them.

ASTERISK-30063 #close

Change-Id: Icdfb8423ae8d1fce65a056b603eb84a672e80a26
2022-06-15 11:37:06 -05:00
Naveen Albert 51d262af12 xmldocs: Improve examples.
Use example tags instead of regular para tags
where possible.

ASTERISK-30090

Change-Id: Iada8bbfda08f30b118cedf2d040bbb21e4966ec5
2022-06-09 03:47:41 -05:00
Naveen Albert 432a1d2d7e app_confbridge: Add function to retrieve channels.
Adds the CONFBRIDGE_CHANNELS function which can be used
to retrieve a comma-separated list of channels, filtered
by a particular type of participant category. This output
can then be used with functions like UNSHIFT, SHIFT, POP,
etc.

ASTERISK-30036 #close

Change-Id: I1950aff932437476dc1abab6f47fb4ac90520b83
2022-05-13 08:07:48 -05:00
George Joseph 4aa541683b GCC12: Fixes for 16+
Most issues were in stringfields and had to do with comparing
a pointer to an constant/interned string with NULL.  Since the
string was a constant, a pointer to it could never be NULL so
the comparison was always "true".  gcc now complains about that.

There were also a few issues where determining if there was
enough space for a memcpy or s(n)printf which were fixed
by defining some of the involved variables as "volatile".

There were also a few other miscellaneous fixes.

ASTERISK-30044

Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
2022-05-09 08:21:45 -05:00
Naveen Albert 892c06564f chan_dahdi: Document dial resource options.
Documents the Dial syntax for DAHDI, namely the channel group,
distinctive ring, answer confirmation, and digital call options
that are specified in the resource itself.

ASTERISK-24827 #close

Change-Id: Ib95e78497fb00dc5cbfde1c93a69f034bfd08c30
2022-05-02 15:47:26 -05:00
Michael Cargile a2679b0ee2 apps/confbridge: Added hear_own_join_sound option to control who hears sound_join
Added the hear_own_join_sound option to the confbridge user profile to
control who hears the sound_join audio file. When set to 'yes' the user
entering the conference and the participants already in the conference
will hear the sound_join audio file. When set to 'no' the user entering
the conference will not hear the sound_join audio file, but the
participants already in the conference will hear the sound_join audio
file.

ASTERISK-29931
Added by Michael Cargile

Change-Id: I856bd66dc0dfa057323860a6418c1371d249abd2
2022-05-02 15:45:31 -05:00
Naveen Albert b90650d8f4 app_meetme: Don't erroneously set global variables.
The admin_exec function in app_meetme is used by the SLA
applications for internal bridging. However, in these cases,
chan is NULL. Currently, this function will set some status
variables that are intended for a channel, but since channel
is NULL, this is erroneously creating meaningless global
variables, which shouldn't be happening. This sets these
variables only if chan is not NULL.

ASTERISK-30002 #close

Change-Id: I817df6c26f5bda131678e56791b0b61ba64fc6f7
2022-04-27 18:39:26 -05:00
Naveen Albert 0c70d497bc documentation: Adds versioning information.
Adds version information for applications, functions,
and manager events/actions.

This is not completely exhaustive by any means but
covers most new things added that have release
versioning information in the issue tracker.

ASTERISK-29940 #close

Change-Id: I506401e93c799715dbbe97c0a8ba18af2bf5e131
2022-04-26 17:40:39 -05:00
Maximilian Fridrich 53a3af6321 app_dial: Flip stream direction of outgoing channel.
When executing dial, the topology of the incoming channel is cloned and
used for the outgoing channel. This creates issues when an incoming
stream is sendonly or recvonly as the stream state of the outgoing
channel will be the same as the stream state of the incoming channel.

Now the stream state is flipped for the outgoing stream in
dial_exec_full if the incoming stream topology is recvonly or sendonly.

ASTERISK-29655
Reported by: Michael Auracher

ASTERISK-29638
Reported by: Michael Auracher

Change-Id: I294dc834ac9a5f048b101b691669959e9df630e1
2022-04-26 12:22:46 -05:00
Naveen Albert b87c5f5124 app_mf, app_sf: Return -1 if channel hangs up.
The ReceiveMF and ReceiveSF applications currently always
return 0, even if a channel has hung up. The call will still
end but generally applications are expected to return -1 if
the channel has hung up.

We now return -1 if a hangup occured to bring this behavior
in line with this norm. This has no functional impact, but
merely increases conformity with how these modules interact
with the PBX core.

ASTERISK-29951 #close

Change-Id: I234d755050ab8ed58f197c6925b968ba26b14033
2022-04-08 16:36:22 -05:00
Naveen Albert ede4e2099f app_queue: Add music on hold option to Queue.
Adds the m option to the Queue application, which allows a
music on hold class to be specified at runtime which will
override the class configured in queues.conf.

This option functions like the m option to Dial.

ASTERISK-29876 #close

Change-Id: Ie25a48569cf8755c305c9438b1ed292c3adcf8d7
2022-04-08 16:33:48 -05:00
Naveen Albert da44b848f5 app_meetme: Emit warning if conference not found.
Currently, if a user tries to access a non-dynamic
MeetMe conference and the conference is not found,
the call simply silent hangs up. There is no indication
to the user that anything went wrong at all.

This changes the relevant debug message to a warning
so that the user is notified of this invalidity.

ASTERISK-29954 #close

Change-Id: Iebcfae3755d00f2150d676ee211c57bc59530048
2022-04-08 11:22:32 -05:00
Naveen Albert 1e87cadf8e app_dial: Document DIALSTATUS return values.
Adds documentation for all of the possible return values
for the DIALSTATUS variable in the Dial application.

ASTERISK-25716

Change-Id: Id22593f1f1f7ea86e5734cee49516ec50848e8c0
2022-03-23 18:09:58 -05:00
Kfir Itzhak 2be01ba40b app_queue: Add QueueWithdrawCaller AMI action
This adds a new AMI action called QueueWithdrawCaller.
This AMI action makes it possible to withdraw a caller from a queue,
in a safe and a generic manner.
This can be useful for retrieving a specific call and
dispatching it to a specific extension.
It works by signaling the caller to exit the queue application
whenever it can. Therefore, it is not guaranteed
that the call will leave the queue.

ASTERISK-29909 #close

Change-Id: Ic15aa238e23b2884abdcaadff2fda7679e29b7ec
2022-03-11 08:52:29 -06:00
Naveen Albert c35e205bef documentation: Add since tag to xmldocs DTD
Adds the since tag to the documentation DTD so
that individual applications, functions, etc.
can now specify when they were added to Asterisk.

This tag is added at the individual application,
function, etc. level as opposed to at the module
level because modules can expand over time as new
functionality is added, and granularity only
to the module level would generally not be useful.

This enables the ability to more easily determine
when new functionality was added to Asterisk, down
to minor version as opposed to just by major version.
This makes it easier for users to write more portable
dialplan if desired to not use functionality that may
not be widely available yet.

ASTERISK-29896 #close

Change-Id: Ibbb35c702d8038bdc3fd0a944fbfa69384cc15d5
2022-02-25 13:05:06 -06:00
Naveen Albert 39820e3561 app_voicemail: Emit warning if asking for nonexistent mailbox.
Currently, if VoiceMailMain is called with a mailbox, if that
mailbox doesn't exist, then the application silently falls back
to prompting the user for the mailbox, as if no arguments were
provided.

However, if a specific mailbox is requested and it doesn't exist,
then no warning at all is emitted.

This fixes this behavior to now warn if a specifically
requested mailbox could not be accessed, before falling back to
prompting the user for the correct mailbox.

ASTERISK-29920 #close

Change-Id: Ib4093b88cd661a2cabc5d685777d4e2f0ebd20a4
2022-02-23 16:28:41 -06:00
Naveen Albert c9ef2b3b86 app_mp3: Document and warn about HTTPS incompatibility.
mpg123 doesn't support HTTPS, but the MP3Player application
doesn't document this or warn the user about this. HTTPS
streams have become more common nowadays and users could
reasonably try to play them without being aware they should
use the HTTP stream instead.

This adds documentation to note this limitation. It also
throws a warning if users try to use the HTTPS stream to
tell them to use the HTTP stream instead.

ASTERISK-29900 #close

Change-Id: Ie3b029be5258c5a701f71ed3b1a7a80d1e03b827
2022-02-23 12:22:13 -06:00
Naveen Albert 0da713168d app_mf: Add max digits option to ReceiveMF.
Adds an option to the ReceiveMF application to allow specifying a
maximum number of digits.

Originally, this capability was not added to ReceiveMF as it was
with ReceiveSF because typically a ST digit is used to denote that
sending of digits is complete. However, there are certain signaling
protocols which simply transmit a digit (such as Expanded In-Band
Signaling) and for these, it's necessary to be able to read a
certain number of digits, as opposed to until receiving a ST digit.

This capability is added as an option, as opposed to as a parameter,
to remain compatible with existing usage (and not shift the
parameters).

ASTERISK-29877 #close

Change-Id: I4229167c9aa69b87402c3c2a9065bd8dfa973a0b
2022-02-23 12:18:17 -06:00
Alexei Gradinari b41440a179 app_queue: load queues and members from Realtime when needed
There are a lot of Queue AMI actions and Queue applications
which do not load queue and queue members from Realtime.

AMI actions
QueuePause - if queue not in memory - response "Interface not found".
QueueStatus/QueueSummary - if queue not in memory - empty response.

Applications:
PauseQueueMember - if queue not in memory
	Attempt to pause interface %s, not found
UnpauseQueueMember - if queue not in memory
	Attempt to unpause interface xxxxx, not found

This patch adds a new function load_realtime_queues
which loads queue and queue members for desired queue
or all queues and all members if param 'queuename' is NULL or empty.
Calls the function load_realtime_queues when needed.

Also this patch fixes leak of ast_config in function set_member_value.

Also this patch fixes incorrect LOG_WARNING when pausing/unpausing
already paused/unpaused member.
The function ast_update_realtime returns 0 when no record modified.
So 0 is not an error to warn about.

ASTERISK-29873 #close
ASTERISK-18416 #close
ASTERISK-27597 #close

Change-Id: I554ee0eebde93bd8f49df7f84b74acb21edcb99c
2022-02-11 12:43:16 -06:00
Mark Petersen 93d090147f app_queue.c: Queue don't play "thank-you" when here is no hold time announcements
if holdtime is (0 min, 0 sec) there is no hold time announcements
we should then also not playing queue-thankyou

ASTERISK-29831

Change-Id: Ic7e51dcde526b23f1cd8d24e1d1e2d81e10f9d2c
2022-01-20 11:49:46 -06:00
Sean Bright 0d62735f99 utils.c: Remove all usages of ast_gethostbyname()
gethostbyname() and gethostbyname_r() are deprecated in favor of
getaddrinfo() which we use in the ast_sockaddr family of functions.

ASTERISK-29819 #close

Change-Id: Ie277c0ef768d753b169c121ef570a71665692ab7
2022-01-06 09:45:56 -06:00
Mark Petersen dc7bcd68e4 app_queue.c: Support for Nordic syntax in announcements
adding support for playing the correct en/et for nordic languages
by adding 'n' for neuter gender in the relevant ast_say_number

ASTERISK-29827

Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1
2022-01-05 12:34:45 -06:00
Naveen Albert 80766059ef app_mp3: Throw warning on nonexistent stream
Currently, the MP3Player application doesn't
emit a warning if attempting to play a stream
which no longer exists. This can be a common
scenario as many mp3 streams are valid at some
point but can disappear at any time.

Now a warning is thrown if attempting to play
a nonexistent MP3 stream, instead of silently
exiting.

ASTERISK-29829 #close

Change-Id: I53a0bf1ed1740166655eb66fe7675f6f808bf535
2022-01-05 10:56:01 -06:00
Naveen Albert 70bc0ff9d0 documentation: Add missing AMI documentation
Adds missing documentation for some channel,
bridge, and queue events.

ASTERISK-24427
ASTERISK-29515

Change-Id: I92b06b88c8cadc0155f95ebe3e870b3e795a8c64
2022-01-05 10:32:46 -06:00
Naveen Albert f7c4a3800c app_sf: Add full tech-agnostic SF support
Adds tech-agnostic support for SF signaling
by adding SF sender and receiver applications
as well as Dial integration.

ASTERISK-29802 #close

Change-Id: I7ec50752e9a661af639425e5d1e339f17411bcad
2022-01-05 09:34:18 -06:00
Steve Davies a2ea233a6d app_queue: Fix hint updates, allow dup. hints
A previous patch for ASTERISK_29578 caused a 'leak' of
extension state information across queues, causing the
state of the first member of unrelated queues to be
updated in addition to the correct member. Which queues
and members depended on the order of queues in the
iterator.

Additionally, it is possible to use the same 'hint:' on
multiple queue members, so the update cannot break out
of the update loop early when a match is found.

ASTERISK-29806 #close

Change-Id: If2c1d1cc2a752afd9286d79710fc818596e7a7ad
2022-01-05 08:42:54 -06:00
Mark Petersen 92cb1c0a59 app_queue.c: added DIALEDPEERNUMBER on outgoing channel
added that we set DIALEDPEERNUMBER on the outgoing channels
so it is avalible in b(content^extension^line)
this add the same behaviour as Dial

ASTERISK-29795

Change-Id: Icbc589ea2066f0c401a892bf478f6b2fd44e62f6
2021-12-15 10:16:56 -06:00
Mark Petersen 4f06de7cf8 app_voicemail.c: Support for Danish syntax in VM
added support for playing the correct plural sound file
dependen on where you have 1 or multipe messages
based on the existing SE/NO code

ASTERISK-29797

Change-Id: I88aa814d02f3772bb80b474204b1ffb26fe438c2
2021-12-14 05:36:39 -05:00
Naveen Albert 54761a41cd app_sendtext: Add ReceiveText application
Adds a ReceiveText application that can be used in
conjunction with SendText. Currently, there is no
way in Asterisk to receive text in the dialplan
(or anywhere else, really). This allows for Asterisk
to be the recipient of text instead of just the sender.

ASTERISK-29759 #close

Change-Id: Ica2c354a42bff69f323a0493d3a7cd0fb129d52d
2021-12-14 04:18:47 -06:00
Naveen Albert ee9eef492c app_mf: Add full tech-agnostic MF support
Adds tech-agnostic support for MF signaling by adding
MF sender and receiver applications as well as Dial
integration.

ASTERISK-29496-mf #do-not-close

Change-Id: I61962b359b8ec4cfd05df877ddf9f5b8f71927a4
2021-12-13 09:42:46 -06:00
Alexander Traud 826233b550 progdocs: Fix Doxygen left-overs.
Change-Id: I5b5cf9c9cbbe00ba8b379a8d162ac67445d39016
2021-12-13 08:57:26 -06:00
Mark Petersen a8b2692836 apps/app_dial.c: HANGUPCAUSE reason code for CANCEL is set to AST_CAUSE_NORMAL_CLEARING
changed that when we recive a CANCEL that we set HANGUPCAUSE to AST_CAUSE_NORMAL_CLEARING

ASTERISK-28053
Reported by: roadkill

Change-Id: Ib653aec2282f55b59d87484391cc07c8e6612b89
2021-12-06 09:17:14 -06:00
Alexander Traud cc025026b7 progdocs: Fix for Doxygen, the hidden parts.
ASTERISK-29779

Change-Id: If338163488498f65fa7248b60e80299c0a928e4b
2021-12-02 10:37:38 -06:00
Naveen Albert 24a04054ad documentation: Standardize examples
Most examples in the XML documentation use the
example tag to demonstrate examples, which gets
parsed specially in the Wiki to make it easier
to follow for users.

This fixes a few modules to use the example
tag instead of vanilla para tags to bring them
in line with the standard syntax.

ASTERISK-29777 #close

Change-Id: I9acb6cc5faf1d220e73c6dd28592371d768d279b
2021-12-01 12:27:30 -06:00
Naveen Albert d374d63ef8 app_voicemail: Refactor email generation functions
Refactors generic functions used for email generation
into utils.c so that they can be used by multiple
modules, including app_voicemail and app_minivm,
to avoid code duplication.

ASTERISK-29715 #close

Change-Id: I1de0ed3483623e9599711129edc817c45ad237ee
2021-11-30 09:28:46 -06:00
Alexander Traud 196c24df22 apps: Fix for Doxygen.
ASTERISK-29740

Change-Id: Icb6fbcfea0a5f1c82caa5001902b6a786adbf307
2021-11-18 10:37:56 -06:00
Naveen Albert ad67f6966e app_morsecode: Fix deadlock
Fixes a deadlock in app_morsecode caused by locking
the channel twice when reading variables from the
channel. The duplicate lock is simply removed.

ASTERISK-29744 #close

Change-Id: I204000701f123361d7f85e0498fedc90243c75e4
2021-11-16 16:49:13 -06:00
Naveen Albert 2320a96349 app_read: Fix custom terminator functionality regression
Currently, when the t option is specified with no arguments,
the # character is still treated as a terminator, even though
no character should be treated as a terminator.

This is because a previous regression fix was modified to
remove the use of NULL as a default altogether. However,
NULL and an empty string actually refer to different
arrangements and should be treated differently. NULL is the
default terminator (#), while an empty string removes the
terminator altogether. This is the behavior being used by
the rest of the core.

Additionally, since S_OR catches empty strings as well as
NULL (not intended), this is changed to a ternary operator
instead, which fixes the behavior.

ASTERISK-29705 #close

Change-Id: I9b6b72196dd04f5b1e0ab5aa1b0adf627725e086
2021-11-16 15:44:46 -06:00
Josh Soref eb03b18ff9 apps: Spelling fixes
Correct typos of the following word families:

simultaneously
administrator
directforward
attachfmt
dailplan
automatically
applicable
nouns
explicit
outside
sponsored
attachment
audio
spied
doesn't
counting
encoded
implements
recursively
emailaddress
arguments
queuerules
members
priority
output
advanced
silencethreshold
brazilian
debugging
argument
meadmin
formatting
integrated
sneakiness

ASTERISK-29714

Change-Id: Ie5ecaec91c00b26309da4e51cfc0991a5bb7d092
2021-11-16 05:38:29 -06:00
Naveen Albert 4e514419d9 app_voicemail: Fix phantom voicemail bug on rerecord
If users are able to press # for options while leaving
a message and then press 3 to rerecord the message, if
the caller hangs up during the rerecord prompt but before
Asterisk starts recording a message, then an "empty"
voicemail gets processed whereby an email gets sent out
notifying the user of a 0:00 duration message. The file
doesn't actually exist, so playback will fail since there
was no message to begin with.

This adds a check after the streaming of the rerecord
announcement to see if the caller has hung up. If so,
we bail out early so that we can clean up properly.

ASTERISK-29391 #close

Change-Id: Id965d72759a2fd3b39afb76fec08aaebebe75c31
2021-11-08 11:28:56 -06:00
Rodrigo Ramírez Norambuena 56ecf7005b app_queue: Add LoginTime field for member in a queue.
Add a time_t logintime to storage a time when a member is added into a
queue.

Also, includes show this time (in seconds) using a 'queue show' command
and the field LoginTime for response for AMI events.

ASTERISK-18069 #close

Change-Id: Ied6c3a300f78d78eebedeb3e16a1520fc3fff190
2021-10-25 10:31:20 -05:00
Shloime Rosenblum cfae5224e3 apps/app_playback.c: Add 'mix' option to app_playback
I am adding a mix option that will play by filename and say.conf unlike
say option that will only play with say.conf. It
will look on the format of the name, if it is like say it play with
say.conf if not it will play the file name.

ASTERISK-29662

Change-Id: I815816916a308f0fa8f165140dc15772dcbd547a
2021-10-21 10:47:02 -05:00
Naveen Albert b40ca38c56 app_read: Fix null pointer crash
If the terminator character is not explicitly specified
and an indications tone is used for reading a digit,
there is no null pointer check so Asterisk crashes.
This prevents null usage from occuring.

ASTERISK-29673 #close

Change-Id: Ie941833e123c3dbfb88371b5de5edbbe065514ac
2021-09-30 11:47:32 -05:00
Naveen Albert 5abf499d23 app_queue: Fix hint updates for included contexts
Previously, if custom hints were used with the hint:
format in app_queue, when device state changes occured,
app_queue would only do a literal string comparison of
the context used for the hint in app_queue and the context
of the hint which just changed state. This caused hints
to not update and become stale if the context associated
with the agent included the context which actually changes
state, essentially completely breaking device state for
any such agents defined in this manner.

This fix adds an additional check to ensure that included
contexts are also compared against the context which changed
state, so that the behavior is correct no matter whether the
context is specified to app_queue directly or indirectly.

ASTERISK-29578 #close

Change-Id: I8caf2f8da8157ef3d9ea71a8568c1eec95592b78
2021-09-21 17:22:38 -05:00
Naveen Albert 148f8355a0 logger: Add custom logging capabilities
Adds the ability for users to log to custom log levels
by providing custom log level names in logger.conf. Also
adds a logger show levels CLI command.

ASTERISK-29529

Change-Id: If082703cf81a436ae5a565c75225fa8c0554b702
2021-09-21 12:10:21 -05:00
Sean Bright 6698753b24 app_externalivr.c: Fix mixed leading whitespace in source code.
No functional changes.

Change-Id: I46514152c0af67f395526374aaa847ccd6a85378
2021-09-21 11:48:49 -05:00
Carlos Oliva 07c297d058 app_mp3: Force output to 16 bits in mpg123
In new mpg123 versions (since 1.26) the default output is 32 bits
Asterisk expects the output in 16 bits, so we force the output to be on 16 bits.
It will work wit new and old versions of mpg123.
Thanks Thomas Orgis <thomas-forum@orgis.org> for giving the key!

ASTERISK-29635 #close

Change-Id: I88c7740118b5af4e895bd8b765b68ed5c11fc816
2021-09-15 12:13:48 -05:00
Naveen Albert b760bad2b9 app_mf: Add channel agnostic MF sender
Adds a SendMF application and PlayMF manager
event to send arbitrary R1 MF tones on the
current or specified channel.

ASTERISK-29496

Change-Id: I5d89afdbccee3f86cc702ed96d882f3d351327a4
2021-09-15 10:07:04 -05:00
Naveen Albert 18c92353f8 app_stack: Include current location if branch fails
Previously, the error emitted when app_stack tries
to branch to a dialplan location that doesn't exist
has included only the information about the attempted
branch in the error log. This adds the current location
as well so users can see where the branch failed in
the logs.

ASTERISK-29626

Change-Id: Ia23502ab2ad21485a1ac74295063a8f25a6df5ce
2021-09-13 07:56:15 -05:00
Sean Bright 26fc5f3c72 app_voicemail.c: Ability to silence instructions if greeting is present.
There is an option to silence voicemail instructions but it does not
take into consideration if a recorded greeting exists or not. Add a
new 'S' option that does that.

ASTERISK-29632 #close

Change-Id: I03f2f043a9beb9d99deab302247e2a8686066fb4
2021-09-08 19:18:11 -05:00
Sean Bright 5029e78f39 config_options: Handle ACO arrays correctly in generated XML docs.
There are 3 separate changes here but they are all closely related:

* Only try to set matchfield attributes on 'field' nodes

* We need to adjust how we treat the category pointer based on the
  value of the category_match, to avoid memory corruption. We now
  generate a regex-like string when match types other than
  ACO_WHITELIST and ACO_BLACKLIST are used.

* Switch app_agent_pool from ACO_BLACKLIST_ARRAY to
  ACO_BLACKLIST_EXACT since we only have one category we need to
  ignore, not two.

ASTERISK-29614 #close

Change-Id: I7be7bdb1bb9814f942bc6bb4fdd0a55a7b7efe1e
2021-09-02 15:17:31 -05:00
Naveen Albert 6cc004dc5a app_read: Allow reading # as a digit
Allows for the digit # to be read as a digit,
just like any other DTMF digit, as opposed to
forcing it to be used as an end of input
indicator. The default behavior remains
unchanged.

ASTERISK-18454 #close

Change-Id: I3033432adb9d296ad227e76b540b8b4a2417665b
2021-09-01 10:31:17 -05:00
Naveen Albert 92f9ae32a8 app_queue: Don't reset queue stats on reload
Prevents reloads of app_queue from also resetting
queue statistics.

Also preserves individual queue agent statistics
if we're just reloading members.

ASTERISK-28701

Change-Id: Ib5d4cdec175e44de38ef0f6ede4a7701751766f1
2021-08-25 18:34:29 -05:00
Naveen Albert 314d8776dc app_milliwatt: Timing fix
The Milliwatt application uses incorrect tone timings
that cause it to play the 1004 Hz tone constantly.

This adds an option to enable the correct timing
behavior, so that the Milliwatt application can
be used for milliwatt test lines. The default behavior
remains unchanged for compatability reasons, even
though it is incorrect.

ASTERISK-29575 #close

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

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

ASTERISK-29541

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

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

ASTERISK-29543

Change-Id: I96a1aeb83d54b635b7a51e1b4680f03791622883
2021-08-19 09:08:58 -05:00
Joshua C. Colp 9e5269c7ae app_dahdiras: Remove deprecated module.
ASTERISK-29591

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

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

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

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

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

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

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

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

ASTERISK-29528

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

ASTERISK-29477

Change-Id: I51aa93fc9507f7636ac44806c4420ce690423e6f
2021-08-02 14:28:52 -05:00
Joshua C. Colp d0f189a5c9 docs: Remove embedded macro in WaitForCond XML documentation.
Change-Id: I40c6514e1843e320f3cbe0b2c70d4a98c0e35b9c
2021-08-02 12:31:11 -05:00
Naveen Albert 244491f9b2 app_reload: New Reload application
Adds an application to reload modules
from within the dialplan.

ASTERISK-29454

Change-Id: Ic8ab025d8b38dd525b872b41c465c999c5810774
2021-07-15 10:01:55 -05:00
Naveen Albert c01b4e0d4b app_waitforcond: New application
While several applications exist to wait for
a certain event to occur, none allow waiting
for any generic expression to become true.
This application allows for waiting for a condition
to become true, with configurable timeout and
checking interval.

ASTERISK-29444

Change-Id: I08adf2824b8bc63405778cf355963b5005612f41
2021-07-08 09:50:42 -05:00
Naveen Albert 1e5a2cfe30 app_dial: Expanded A option to add caller announcement
Hitherto, the A option has made it possible to play
audio upon answer to the called party only. This option
is expanded to allow for playback of an audio file to
the caller instead of or in addition to the audio
played to the answerer.

ASTERISK-29442

Change-Id: If6eed3ff5c341dc8c588c8210987f2571e891e5e
2021-06-23 13:28:32 -05:00
Naveen Albert b742514553 app_originate: Allow setting Caller ID and variables
Caller ID can now be set on the called channel and
Variables can now be set on the destination
using the Originate application, just as
they can be currently using call files
or the Manager Action.

ASTERISK-29450

Change-Id: Ia64cfe97d2792bcbf4775b3126cad662922a8b66
2021-06-11 11:30:13 -05:00
Naveen Albert 35437879e5 app_confbridge: New ConfKick() application
Adds a new ConfKick() application, which may
be used to kick a specific channel, all channels,
or all non-admin channels from a specified
conference bridge, similar to existing CLI and
AMI commands.

ASTERISK-29446

Change-Id: I5d96b683880bfdd27b2ab1c3f2e897c5046ded9b
2021-06-08 18:16:18 -05:00
Naveen Albert 5f8cabc232 app_confbridge: New option to prevent answer supervision
A new user option, answer_channel, adds the capability to
prevent answering the channel if it hasn't already been
answered yet.

ASTERISK-29440

Change-Id: I26642729d0345f178c7b8045506605c8402de54b
2021-06-08 15:42:54 -05:00