Repository navigation
Fix tests that fail against current Asterisk master - #162
Conversation
The automon feature went away with app_monitor. Asterisk now rejects
the featuremap section of these features.conf files ("Could not find
option suitable for category 'featuremap' named 'automon'") and falls
back to the default feature codes, so the bridge tests that use them
fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test retrieved the parked call by originating PJSIP/ast1/701, the chan_sip form. PJSIP takes what follows the endpoint as a SIP URI and rejects "701", so the parked call was never retrieved and the test always failed. Use PJSIP/701@ast1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These tests have SIPp play RTP from pcap files (play_pcap_audio), which needs a raw socket. Run as a normal user, SIPp fails with "Can't create raw IPv4 socket (need to run as root?)" and the tests fail. Other tests that play pcap audio declare the rawsocket custom dependency, so they are skipped instead. Declare it in these four as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since "codec_builtin: Use multiples of 20 for maximum_ms" (2023) the maximum packetization time of ulaw and alaw is 140 ms, not 150, so Asterisk offers a=maxptime:140 and the HEP tests failed to match the 200 OK they capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test expects the simple_bridge technology, which it got because the w and W Dial options gave both channels the automon DTMF feature, and native RTP bridging is not used for channels with DTMF hooks. automon went away with app_monitor, so w and W no longer add a hook, the call is natively bridged, and the test failed. Use x and X (automixmon), which the bridge features.conf still maps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NoCDR() was removed in 2022 in favor of Set(CDR_PROP(disable)=1), which sets the same flag. Since then: * cdr/cdr_manipulation/nocdr failed: the channel hung up at the missing application without disabling its CDR, so an extra CDR was written. * The five dial_parallel tests that run NoCDR() in their echo extension passed for the wrong reason. The echo channel hung up immediately instead of running Echo(), and the CDR it left behind was added to their expectations in 2024 as a third CDR. With its CDR disabled again, as the dialplan intends, the tests expect the two CDRs of the Dial() to bob and charlie. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Transfer(3) redirected to extension 3 under chan_sip. chan_pjsip takes the destination as an endpoint name or a SIP URI, so it failed with "Failed to parse destination URI '3'", the call was never redirected, and the CDRs for extension 3 were missing. Redirect to sip:3@127.0.0.1, which the dialing side follows to Local/3@default as the test expects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chain of 200 Local channels needs more than the common default soft limit of 1024 open files. When Asterisk runs out, alert pipes fail with "Too many open files", channels in the chain hang up early, and the test fails. Raise the soft limit, which the Asterisk instances inherit, to 8192 or the hard limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
multiple-commits: standalone |
|
cherry-pick-to: 22 |
|
Workflow Check completed successfully |
|
The "#56" in the description referred to an asterisk/asterisk PR (the 2023 res_sorcery_memory_cache memory leak fix), not to an issue in this repository. I've reworded the description to cite that commit (c8ce2c705) instead. This PR doesn't resolve any issue. |
|
pr-checklist-exception: commit-msg |
Pull Request Checklist Complete
|
@WyoMurf FYI... 20 is still an active branch and the commits seem to apply without issue so I've added it to the cherry-picks. |
|
@gtjoseph Thanks. One caution for 20: the first commit ("bridge: Drop the automon feature from test configurations") removes |
|
Ah, yeah that'd be a problem. I'll remove 20. Actually, it goes "security-fix-only" this month anyway. |
|
Workflow CPCheck completed successfully |
|
Successfully merged to branch master and cherry-picked to ["22","23","24"] |
These tests fail on an unmodified build of current Asterisk master (and,
for most, 22 and 23) because the tests have fallen behind changes in
Asterisk, not because of bugs in Asterisk. Each commit stands on its own
and fixes one cause:
went away with app_monitor. Asterisk rejects the featuremap section of
these features.conf files and falls back to the default feature codes,
so the bridge tests using them fail.
PJSIP/ast1/701(chan_sip form) is rejected as an invalid URI, so theparked call was never retrieved and the test always failed.
audio. Four tests use
play_pcap_audiowithout therawsocketdependency that the other such tests declare, so they fail instead of
being skipped when not run as root.
alaw have a 140 ms maximum since "codec_builtin: Use multiples of 20 for
maximum_ms" (2023).
RTP. The
w/WDial options no longer add a DTMF hook now thatautomon is gone, so the call was natively bridged instead of using
simple_bridge.
was removed in 2022.
cdr/cdr_manipulation/nocdrfailed. The fivedial_paralleltests that use it passed only because their echochannel hung up at the missing application; the CDR it left behind was
added to their expectations in 2024. With
Set(CDR_PROP(disable)=1)(the same flag NoCDR set) the dialplan works as intended and the tests
expect the two CDRs of the Dial() again.
can't redirect to a bare extension (
Transfer(3)), so the call wasnever redirected.
The chain of 200 Local channels needs more than the common default soft
limit of 1024 open files.
Testing
Each changed test, plus all of
tests/bridgeandtests/apps/dial/dial_parallel,was run before and after the change against unmodified Asterisk master
(57e2743cc5) on AlmaLinux 10, with the default soft open-file limit of
1024, as a normal user. Before: the tests named above fail. After: they
pass, except that the four raw socket tests are skipped. Run as root,
those four pass, except
t38_enabled_two_reinvite_on_a_leg, which stillfails as it did before this change.
Other failures found, not fixed here
These also fail on unmodified master, but the tests are right:
sorcery/memory_cache_expireandmemory_cache_expire_object: Asteriskcrashes at startup when a sorcery memory cache has no options
(
endpoint/cache=memory_cache).sorcery_memory_cache_open()callsast_strdupa()on a NULLdatasince Asterisk commit c8ce2c705, a 2023memory leak fix.
manager/config/*(4 tests): the AMI config file restrictions comparethe
realpath()of the file with the unresolvedastetcdir. Under thetestsuite the config directory is reached through the
/tmp/ast_test_*symlink, so every file looks restricted ("File requires escalated
privileges"). Anyone whose config directory path includes a symlink
would see the same.
Environment-only failures, for reference: the IAX2
encrypted-calls/rsatests fail where the system crypto policy forbids SHA-1 signatures (the
RHEL/AlmaLinux 9+ default), and the raw socket tests fail when not run as
root.
AI use
This change was prepared with an AI coding assistant (Claude Code),
working in my environment at my direction. It ran and compared the tests,
traced each failure to its cause in the Asterisk history, and wrote the
edits and commit messages. I reviewed each change and the test results.
🤖 Generated with Claude Code