5344 Commits

Author SHA1 Message Date
Daniel Donoghue
4413a02d0c stasis_broadcast: Add optional ARI broadcast with first-claim-wins
Adds two optional modules:
res_stasis_broadcast.so: Infrastructure for broadcasting a single incoming
channel to multiple ARI applications with atomic first-claim-wins semantics.

app_stasis_broadcast.so: Provides the StasisBroadcast() dialplan application
which invokes the broadcast infrastructure.

Both modules are self-contained; if neither is loaded there is zero runtime
impact. Loading them does not alter existing Stasis or ARI behavior unless
explicitly used.

Key Features (only active when modules are loaded):
Fisher-Yates shuffled broadcast dispatch for fair claim races
Atomic claim operations using mutex + condition variable signaling
Configurable broadcast timeouts
Safe regex application filtering with validation to mitigate ReDoS risk
Thread-safe channel variable snapshotting (channel locked during reads)
Late-claim safety: broadcast context kept alive until after the Stasis
session ends so concurrent claimants always receive 409 Conflict rather
than 404 Not Found
Memory safety via RAII_VAR, ast_json_ref/unref, and ao2 reference counting

Components Added:
res/res_stasis_broadcast.c: Core broadcast + claim logic
apps/app_stasis_broadcast.c: StasisBroadcast() dialplan application
include/asterisk/stasis_app_broadcast.h: Public API header
res/ari/resource_events.c: Integrates POST /ari/events/claim endpoint
rest-api/api-docs/events.json: New CallBroadcast and CallClaimed events

Implementation Notes:
Broadcast contexts reside in an ao2 hash container keyed by channel id. Each
context holds atomic claim state, winner application name, timeout metadata,
and a condition variable for waiters. Broadcast contexts are kept alive until
after stasis_app_exec() returns so that concurrent claimants racing against
the timeout always receive 409 Conflict. Broadcast dispatch calls
stasis_app_send() directly for each matching application in shuffled order.
Regex filters are validated with bounded length, group depth, quantified
group count, and alternation limits to reduce pathological backtracking.
Timeout calculation uses timespec arithmetic with overflow-safe millisecond
remainder handling. Event JSON follows existing Stasis/ARI conventions;
references are managed correctly to avoid leaks or double frees.

Optional Nature / Impact:
No changes to existing APIs, events, or applications when absent.
Clean fallback: systems ignoring the modules behave identically to prior
versions.

Development was assisted by Claude (Anthropic). All generated code has been
reviewed, tested, and is understood by the author.

UserNote: New optional modules res_stasis_broadcast.so and
app_stasis_broadcast.so enable broadcasting an incoming channel to multiple
ARI applications. The first application to successfully claim (via
POST /ari/events/claim) wins channel control. StasisBroadcast() dialplan
application initiates broadcasts. CallBroadcast and CallClaimed events notify
applications. When modules are not loaded, behavior is unchanged.

DeveloperNote: New public APIs in stasis_app_broadcast.h:
stasis_app_broadcast_channel(), stasis_app_claim_channel(),
stasis_app_broadcast_winner(), and stasis_app_broadcast_wait(). New ARI event
types (CallBroadcast, CallClaimed) added to events.json. All code is isolated;
no existing ABI modified.
2026-04-22 18:05:08 +00:00
Naveen Albert
83a215ccee app_dial: Include channel name in warnings during wait_for_answer.
Include the channel name in warnings during wait_for_answer to make
them more useful and allow problematic channels to be easily identified.

Resolves: #1802
2026-03-03 22:07:06 +00:00
Naveen Albert
b533d7f035 build: Fix unused-but-set-variable warnings with gcc 16.
Fix or remove a few variables that were being set but not actually
used anywhere, causing warnings with gcc 16.

Resolves: #1783
2026-02-25 13:25:21 +00:00
Joshua C. Colp
1decab6def build: Fix GCC discarded-qualifiers const errors.
GCC 15.2.1 pays attention to the discarding of the const
qualifier when strchr, strrchr, memchr, or memrchr are now
used. This change fixes numerous errors with this throughout
the tree. The fixes can be broken down into the following:

1. The return value should be considered const.
2. The value passed to strchr or strrchr can be cast as it is
   expected and allowed to be modified.
3. The pointer passed to strchr or strrchr is not meant to be
   modified and so the contents must be duplicated.
4. It was declared const and never should have been.
2026-02-18 13:43:42 +00:00
Naveen Albert
46a8521b00 app_dial, utils.h: Avoid old style declaration and discarded qualifier.
* app_dial: Use const char* for fixed strings.
* utils.h: inline should come before return type.

Resolves: #1755
2026-02-11 13:34:34 +00:00
serfreeman1337
d6edc71a69 app_queue: Add 'prio' setting to the 'force_longest_waiting_caller' option
This adds a 'prio' setting to ensure that call priority is respected across multiple queues.
Using 'yes' could cause high-priority callers to be skipped if a caller
in another queue had a longer wait time, regardless of priority.

Resolves: #1637

UserNote: The 'force_longest_waiting_caller' option now supports a 'prio' setting.
When set to 'prio', calls are offered by priority first, then by wait time.
2026-02-04 13:09:49 +00:00
phoneben
43b69949ec app_queue: Queue Timing Parity with Dial() and Accurate Wait Metrics
app_queue: Set Dial-compatible timing variables

Extends Queue() to set Dial-compatible timing variables (ANSWEREDTIME, DIALEDTIME) and introduces a precise QUEUEWAIT metric calculated at agent connect time, with proper initialization to prevent stale or misleading values.
2026-01-26 21:24:21 +00:00
phoneben
80d7446cbd app_queue: Fix rN raise_penalty ignoring min_penalty in calc_metric
QUEUE_RAISE_PENALTY=rN was not respected during member selection. calc_metric() raised penalties below QUEUE_MIN_PENALTY, allowing excluded members to be selected.

This change makes calc_metric() honor raise_respect_min, keeping behavior consistent with queue empty checks and expected rN semantics

UserNote: Fixes an issue where QUEUE_RAISE_PENALTY=rN could raise a member’s penalty below QUEUE_MIN_PENALTY during member selection. This could allow members intended to be excluded to be selected. The queue now consistently respects the minimum penalty when raising penalties, aligning member selection behavior with queue empty checks and documented rN semantics.
2026-01-26 20:31:05 +00:00
serfreeman1337
a741676a9d app_queue: Only compare calls at 1st position across queues when forcing longest waiting caller.
This prevents a situation where a call joining at 1st position to a queue with calls
leads to a state where no callers are considered the longest waiting,
causing queues to stop offering calls.

Resolves: #1691
2026-01-26 19:43:34 +00:00
George Joseph
881a399139 app_amd: Remove errant space in documentation for totalAnalysisTime. 2026-01-22 21:00:39 +00:00
Tinet-mucw
f91f7d580d app_mixmonitor.c: Fix crash in mixmonitor_ds_remove_and_free when datastore is NULL
The datastore may be NULL, so a null pointer check needs to be added.

Resolves: #1673
2025-12-30 15:09:00 +00:00
Sean Bright
3ce5308ac9 app_queue.c: Update docs to correct QueueMemberPause event name. 2025-12-05 16:33:55 +00:00
Sean Bright
9647a4f022 app_stream_echo.c: Check that stream is non-NULL before dereferencing.
Also re-order and rename the arguments of `stream_echo_write_error` to
match those of `ast_write_stream` for consistency.

Resolves: #1427
2025-12-03 13:58:50 +00:00
George Joseph
ed8d5c6430 ccss: Add option to ccss.conf to globally disable it.
The Call Completion Supplementary Service feature is rarely used but many of
it's functions are called by app_dial and channel.c "just in case".  These
functions lock and unlock the channel just to see if CCSS is enabled on it,
which it isn't 99.99% of the time.

UserNote: A new "enabled" parameter has been added to ccss.conf.  It defaults
to "yes" to preserve backwards compatibility but CCSS is rarely used so
setting "enabled = no" in the "general" section can save some unneeded channel
locking operations and log message spam.  Disabling ccss will also prevent
the func_callcompletion and chan_dahdi modules from loading.

DeveloperNote: A new API ast_is_cc_enabled() has been added.  It should be
used to ensure that CCSS is enabled before making any other ast_cc_* calls.
2025-12-01 14:06:00 +00:00
George Joseph
23b5de4923 app_directed_pickup.c: Change some log messages from NOTICE to VERBOSE.
UpgradeNote: In an effort to reduce log spam, two normal progress
"pickup attempted" log messages from app_directed_pickup have been changed
from NOTICE to VERBOSE(3).  This puts them on par with other normal
dialplan progress messages.
2025-12-01 14:01:03 +00:00
Naveen Albert
e38a5b7c87 app_reload: Fix Reload() without arguments.
Calling Reload() without any arguments is supposed to reload
everything (equivalent to a 'core reload'), but actually does
nothing. This is because it was calling ast_module_reload with
an empty string, and the argument needs to explicitly be NULL.

Resolves: #1597
2025-11-19 17:19:56 +00:00
Naveen Albert
ba9d9ec64a app_disa: Avoid use of removed ResetCDR() option.
Commit a46d5f9b76 removed the deprecated
'e' option to ResetCDR; this now causes DISA() to emit a warning
if attempting to call ResetCDR() with the deprecated option (in
all cases except when the no answer option is provided). Rewrite
the code to do this the current way.

Resolves: #1592
2025-11-17 18:35:56 +00:00
Daouda Taha
7d104d69a9 app_mixmonitor: Add 's' (skip) option to delay recording.
The 's' (skip) option delays MixMonitor recording until the specified number of seconds
(can be fractional) have elapsed since MixMonitor was invoked.

No audio is written to the recording file during this time. If the call ends before this
period, no audio will be saved. This is useful for avoiding early audio such as
announcements, ringback tones, or other non-essential sounds.

UserNote: This change introduces a new 's(<seconds>)' (skip) option to the MixMonitor
application. Example:
  MixMonitor(${UNIQUEID}.wav,s(3))

This skips recording for the first 3 seconds before writing audio to the file.
Existing MixMonitor behavior remains unchanged when the 's' option is not used.
2025-11-13 19:24:37 +00:00
Sean Bright
61b2538e9b app_dtmfstore: Avoid a potential buffer overflow.
Prefer snprintf() so we can readily detect if our output was
truncated.

Resolves: #1421
2025-11-12 22:20:45 +00:00
Kristian F. Høgh
1a594fcb21 app_queue.c: Only announce to head caller if announce_to_first_user
Only make announcements to head caller if announce_to_first_user is true

Fixes: #1568

UserNote: When announce_to_first_user is false, no announcements are played to the head caller
2025-11-12 21:58:04 +00:00
Ben Ford
a1eb178410 app_queue.c: Fix error in Queue parameter documentation.
When macro was removed in Asterisk 21, the parameter documentation in
code was not updated to reflect the correct numerization for gosub. It
still stated that it was the seventh parameter, but got shifted to the
sixth due to the removal of macro. This has been updated to correctly
reflect the parameter order, and a note has been added to the XML that
states this was done after the initial commit.

Fixes: #1534

UpgradeNote: As part of Asterisk 21, macros were removed from Asterisk.
This resulted in argument order changing for the Queue dialplan
application since the macro argument was removed. Upgrade notice was
missed when this was done, so this upgrade note has been added to
provide a record of such and a notice to users who may have not upgraded
yet.
2025-10-22 16:26:51 +00:00
Joshua C. Colp
19b0636d3e app_queue: Allow stasis message filtering to work.
The app_queue module subscribes on a per-dialed agent basis to both
the bridge all and channel all topics to keep apprised of things going
on involving them. This subscription has associated state that must
be cleaned up when the subscription ends. This was done by setting
a default router callback that only had logic to handle the case
where the subscription ends. By using the default router callback
all filtering for the subscription was disabled, causing unrelated
messages to get published and handled by it.

This change makes it so that an explicit route is added for the
message type used for the message indicating the subscription has
ended and removes the default router callback. This allows message
filtering to occur on publishing reducing the messages to app_queue
to only those it is interested in.
2025-10-14 19:55:46 +00:00
Naveen Albert
341cb16378 app_sf: Add post-digit timer option to ReceiveSF.
Add a sorely needed option to set a timeout between digits, rather than
for receiving the entire number. This is needed if the number of digits
being sent is unknown by the receiver in advance. Previously, we had
to wait for the entire timer to expire.

Resolves: #1493

UserNote: The 't' option for ReceiveSF now allows for a timer since
the last digit received, in addition to the number-wide timeout.
2025-10-06 19:24:57 +00:00
Naveen Albert
a6b15bfb68 app_dial: Allow fractional seconds for dial timeouts.
Even though Dial() internally uses milliseconds for its dial timeouts,
this capability has been mostly obscured from users as the argument is
only parsed as an integer, thus forcing the use of whole seconds for
timeouts.

Parse it as a decimal instead so that timeouts can now truly have
millisecond precision.

Resolves: #1487

UserNote: The answer and progress dial timeouts now have millisecond
precision, instead of having to be whole numbers.
2025-10-02 16:02:48 +00:00
Bastian Triller
a0f1e460fe Fix some doxygen, typos and whitespace 2025-09-22 17:39:24 +00:00
phoneben
af67321134 app_queue: Add NULL pointer checks in app_queue
Add NULL check for word_list before calling word_in_list()
Add NULL checks for channel snapshots from ast_multi_channel_blob_get_channel()

Resolves: #1425
2025-09-22 17:19:22 +00:00
Sean Bright
7b96fff129 app_externalivr: Prevent out-of-bounds read during argument processing.
Resolves: #1422
2025-09-22 16:55:52 +00:00
Naveen Albert
4aad564b93 app_adsiprog: Fix possible NULL dereference.
get_token can return NULL, but process_token uses this result without
checking for NULL; as elsewhere, check for a NULL result to avoid
possible NULL dereference.

Resolves: #1419
2025-09-11 15:25:41 +00:00
Igor Goncharovsky
f77e76bab1 app_queue.c: Add new global 'log_unpause_on_reason_change'
In many asterisk-based systems, the pause reason is used to separate
pauses by type,and logically, changing the reason defines two intervals
that should be accounted for separately. The introduction of a new
option allows me to separate the intervals of operator inactivity in
the log by the event of unpausing.

UserNote: Add new global option 'log_unpause_on_reason_change' that
is default disabled. When enabled cause addition of UNPAUSE event on
every re-PAUSE with reason changed.
2025-09-08 14:28:52 +00:00
Igor Goncharovsky
39c677e0df app_waitforsilence.c: Use milliseconds to calculate timeout time
The functions WaitForNoise() and WaitForSilence() use the time()
functions to calculate elapsed time, which causes the timer to fire on
a whole second boundary, and the actual function execution time to fire
the timer may be 1 second less than expected. This fix replaces time()
with ast_tvnow().

Fixes: #1401
2025-09-08 14:27:32 +00:00
Stuart Henderson
11e3567200 app_queue: fix comparison for announce-position-only-up
Numerically comparing that the current queue position is less than
last_pos_said can only be done after at least one announcement has been
made, otherwise last_pos_said is at the default (0).

Fixes: #1386
2025-09-03 13:15:55 +00:00
Naveen Albert
bdf2e2f84a app_chanspy: Add option to not automatically answer channel.
Add an option for ChanSpy and ExtenSpy to not answer the channel
automatically. Most applications that auto-answer by default
already have an option to disable this behavior if unwanted.

Resolves: #1358

UserNote: ChanSpy and ExtenSpy can now be configured to not
automatically answer the channel by using the 'N' option.
2025-08-18 14:19:22 +00:00
Alexey Khabulyak
b0421fc87c app_dial.c: Moved channel lock to prevent deadlock
It's reproducible with pbx_lua, not regular dialplan.

deadlock description:
1. asterisk locks a channel
2. calls function onedigit_goto
3. calls ast_goto_if_exists funciton
4. checks ast_exists_extension -> pbx_extension_helper
5. pbx_extension_helper calls pbx_find_extension
6. Then asterisk starts autoservice in a new thread
7. autoservice run tries to lock the channel again

Because our channel is locked already, autoservice can't lock.
Autoservice can't lock -> autoservice stop is waiting forever.
onedigit_goto waits for autoservice stop.

Resolves: https://github.com/asterisk/asterisk/issues/1335
2025-08-11 14:37:22 +00:00
Naveen Albert
aca74d100c app_queue: Remove redundant/deprecated function.
QUEUE_MEMBER_COUNT has been deprecated since at least 1.6,
for fully duplicating functionality available in the
QUEUE_MEMBER function; remove it now.

Resolves: #1341

UpgradeNote: The deprecated QUEUE_MEMBER_COUNT function
has been removed; use QUEUE_MEMBER(<queue>,logged) instead.
2025-08-11 12:22:28 +00:00
Naveen Albert
4a3c9ea574 app_agent_pool: Remove documentation for removed option.
The already-deprecated "password" option for the AGENT function was
removed in commit d43b17a872 for
Asterisk 12, but the documentation for it wasn't removed then.

Resolves: #1321
2025-07-30 14:21:45 +00:00
Naveen Albert
741ad37086 app_voicemail: Remove deprecated options.
Remove the deprecated maxmessage and minmessage options,
which have been superseded by maxsecs and minsecs since 1.6.
Also remove the deprecated 'cz' language option (deprecated
since 1.8.)

Resolves: #1298

UpgradeNote: The deprecated maxmessage and minmessage options
have been removed; use maxsecs and minsecs instead.
The deprecated 'cz' language has also been removed; use 'cs' instead.
2025-07-22 17:33:27 +00:00
George Joseph
1f52ae3582 app_mixmonitor: Update the documentation concerning the "D" option.
When using the "D" option to output interleaved audio, the file extension
must be ".raw".  That info wasn't being properly rendered in the markdown
and HTML on the documentation site.  The XML was updated to move the
note in the option section to a warning in the description.

Resolves: #1269
2025-07-17 15:07:44 +00:00
Naveen Albert
415daae95f users.conf: Remove deprecated users.conf integration.
users.conf was deprecated in Asterisk 21 and is now being removed
for Asterisk 23, in accordance with the Asterisk deprecation policy.

This consists of:
* Removing integration with app_directory, app_voicemail, chan_dahdi,
  chan_iax2, and AMI.
* users.conf was also partially used for res_phoneprov, and this remaining
  functionality is consolidated to a separate phoneprov_users.conf,
  used only by res_phoneprov.

Resolves: #1292

UpgradeNote: users.conf has been removed and all channel drivers must
be configured using their specific configuration files. The functionality
previously in users.conf for res_phoneprov is now in phoneprov_users.conf.
2025-07-10 14:47:38 +00:00
Naveen Albert
2198126231 app_record: Add RECORDING_INFO function.
Add a function that can be used to retrieve info
about a previous recording, such as its duration.

This is being added as a function to avoid possibly
trampling on dialplan variables, and could be extended
to provide other information in the future.

Resolves: #548

UserNote: The RECORDING_INFO function can now be used
to retrieve the duration of a recording.
2025-06-17 14:23:23 +00:00
Itzanh
dbe7c0c5b3 app_sms.c: Fix sending and receiving SMS messages in protocol 2
This fixes bugs in SMS messaging to SMS-capable analog phones that prevented app_sms.c from talking to phones using SMS protocol 2.

- Fix MORX message reception (from phone to Asterisk) in SMS protocol 2
- Fix MTTX message transmission (from Asterisk to phone) in SMS protocol 2

One of the bugs caused messages to have random characters and junk appended at the end up to the character limit. Another bug prevented Asterisk from sending messages from Asterisk to the phone at all. A final bug caused the transmission from Asterisk to the phone to take a long time because app_sms.c did not hang up after correctly sending the message, causing the phone to have to time out and hang up in order to complete the message transmission.

This was tested with a Linksys PAP2T and with a GrandStream HT814, sending and receiving messages with Telefónica DOMO Mensajes phones from Telefónica Spain. I had to play with both the network jitter buffer and the dB gain to get it to work. One of my phones required the gain to be set to +3dB for it to work, while another required it to be set to +6dB.

Only MORX and MTTX were tested, I did not test sending and receiving messages to a TelCo SMSC.
2025-06-12 12:18:56 +00:00
phoneben
c753fe44d1 app_queue: queue rules – Add support for QUEUE_RAISE_PENALTY=rN to raise penalties only for members within min/max range
This update adds support for a new QUEUE_RAISE_PENALTY format: rN

When QUEUE_RAISE_PENALTY is set to rN (e.g., r4), only members whose current penalty
is greater than or equal to the defined min_penalty and less than or equal to max_penalty
will have their penalty raised to N.

Members with penalties outside the min/max range remain unchanged.

Example behaviors:

QUEUE_RAISE_PENALTY=4     → Raise all members with penalty < 4 (existing behavior)
QUEUE_RAISE_PENALTY=r4    → Raise only members with penalty in [min_penalty, max_penalty] to 4

Implementation details:

Adds parsing logic to detect the r prefix and sets the raise_respect_min flag

Modifies the raise logic to skip members outside the defined penalty range when the flag is active

UserNote: This change introduces QUEUE_RAISE_PENALTY=rN, allowing selective penalty raises
only for members whose current penalty is within the [min_penalty, max_penalty] range.
Members with lower or higher penalties are unaffected.
This behavior is backward-compatible with existing queue rule configurations.
2025-06-11 16:23:51 +00:00
George Joseph
c873f2ae7e ARI Outbound Websockets
Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws

Code change summary:
* Added an ast_vector_string_join() function,
* Added ApplicationRegistered and ApplicationUnregistered ARI events.
* Converted res/ari/config.c to use sorcery to process ari.conf.
* Added the "outbound-websocket" ARI config object.
* Refactored res/ari/ari_websockets.c to handle outbound websockets.
* Refactored res/ari/cli.c for the sorcery changeover.
* Updated res/res_stasis.c for the sorcery changeover.
* Updated apps/app_stasis.c to allow initiating per-call outbound websockets.
* Added CLI commands to manage ARI websockets.
* Added the new "outbound-websocket" object to ari.conf.sample.
* Moved the ARI XML documentation out of res_ari.c into res/ari/ari_doc.xml

UserNote: Asterisk can now establish websocket sessions _to_ your ARI applications
as well as accepting websocket sessions _from_ them.
Full details: http://s.asterisk.net/ari-outbound-ws
2025-06-02 16:35:34 +00:00
Naveen Albert
2ced79259a sig_analog: Add Call Waiting Deluxe support.
Adds support for Call Waiting Deluxe options to enhance
the current call waiting feature.

As part of this change, a mechanism is also added that
allows a channel driver to queue an audio file for Dial()
to play, which is necessary for the announcement function.

ASTERISK-30373 #close

Resolves: #271

UserNote: Call Waiting Deluxe can now be enabled for FXS channels
by enabling its corresponding option.
2025-05-05 14:10:17 +00:00
Naveen Albert
89f7d5a471 app_sms: Ignore false positive vectorization warning.
Ignore gcc warning about writing 32 bytes into a region of size 6,
since we check that we don't go out of bounds for each byte.
This is due to a vectorization bug in gcc 15, stemming from
gcc commit 68326d5d1a593dc0bf098c03aac25916168bc5a9.

Resolves: #1088
2025-05-05 13:44:22 +00:00
Naveen Albert
f6ceeff523 app_meetme: Remove inaccurate removal version from xmldocs.
app_meetme is deprecated but wasn't removed as planned in 21,
so remove the inaccurate removal version.

Resolves: #1224
2025-04-28 19:13:58 +00:00
Luz Paz
9ca3233aea docs: Fix typos in apps/
Found via codespell
2025-04-28 16:30:09 +00:00
phoneben
ac07cbe2c3 Add log-caller-id-name option to log Caller ID Name in queue log
Add log-caller-id-name option to log Caller ID Name in queue log

This patch introduces a new global configuration option, log-caller-id-name,
to queues.conf to control whether the Caller ID name is logged when a call enters a queue.

When log-caller-id-name=yes, the Caller ID name is logged
as parameter 4 in the queue log, provided it’s allowed by the
existing log_restricted_caller_id rules. If log-caller-id-name=no (the default),
the Caller ID name is omitted from the logs.

Fixes: #1091

UserNote: This patch adds a global configuration option, log-caller-id-name, to queues.conf
to control whether the Caller ID name is logged as parameter 4 when a call enters a queue.
When log-caller-id-name=yes, the Caller ID name is included in the queue log,
Any '|' characters in the caller ID name will be replaced with '_'.
(provided it’s allowed by the existing log_restricted_caller_id rules).
When log-caller-id-name=no (the default), the Caller ID name is omitted.
2025-04-16 14:29:01 +00:00
Sean Bright
085fd922fc app_confbridge: Prevent crash when publishing channel-less event.
Resolves: #1190
2025-04-10 14:39:48 +00:00
Florent CHAUVEAU
a5bc39fa32 audiosocket: added support for DTMF frames
Updated the AudioSocket protocol to allow sending DTMF frames.
AST_FRAME_DTMF frames are now forwarded to the server, in addition to
AST_FRAME_AUDIO frames. A new payload type AST_AUDIOSOCKET_KIND_DTMF
with value 0x03 was added to the protocol. The payload is a 1-byte
ascii representing the DTMF digit (0-9,*,#...).

UserNote: The AudioSocket protocol now forwards DTMF frames with
payload type 0x03. The payload is a 1-byte ascii representing the DTMF
digit (0-9,*,#...).
2025-03-28 19:18:15 +00:00
Norm Harrison
4e546c35c7 audiosocket: fix timeout, fix dialplan app exit, server address in logs
- Correct wait timeout logic in the dialplan application.
- Include server address in log messages for better traceability.
- Allow dialplan app to exit gracefully on hangup messages and socket closure.
- Optimize I/O by reducing redundant read()/write() operations.

Co-authored-by: Florent CHAUVEAU <florentch@pm.me>
2025-03-28 19:18:15 +00:00