Commit 88c0574
committed
fix(cdr,asterisk): resume MixMonitor after failed attended transfer
Two regressions made the call recording stop at the moment of an
attended-transfer attempt and never resume, even when the original
A↔B bridge survives — losing ~50% of the conversation audio.
Lua dialplan: skip_special_exten() guard was added around
transfer_dial_hangup in ec17302 ("fix(upload,cdr,security): chunk
size, CEL guard, rate limit whitelist"). That guard short-circuits
EXTEN='h', which is exactly the path Asterisk uses for the hangup
handler — so event_transfer_dial_hangup() never fired, and the AMI
UserEvent never reached WorkerCallEvents. Removed the guard
(hangup_chan and hangup_chan_meetme already correctly run guard-free).
PHP recovery action: ActionTransferDialHangup::fillNotAnsweredCdr was
silently broken in c0a5527 ("Translate comments into English rewrite
phpdoc blocks #522") — that commit replaced OR with AND in the CDR
filter and substituted agi_channel for the empty dst_chan, so the
transfer-attempt row was never closed; it also added an int-vs-string
comparison count() !== '1' that always returned early. Filter now
matches on transfer="1" AND src_chan=TRANSFERERNAME, and the count
check is count() !== 1. The success path (fillLocalChannelCdr) is
untouched.
CheckSSHConfig: /etc/shadow integrity check now skips when
SSHDisablePasswordLogins=true. PAM bookkeeping (lastchg, passwd -l,
etc.) mutates shadow even when password-based SSH login is disabled,
producing spurious "SSH password changed externally" alerts.
tests/Calls infrastructure also gets several fixes used to surface
and reproduce the bug:
* start.sh::cleanup() no longer runs 'monit stop all' (that locks
out the host via dropbear). It stops only asterisk + php-fpm,
waits for DB handles to release, removes stale -wal/-shm before
restoring the production DB, then brings services back. Without
the -wal/-shm cleanup the cp leaves the DB in "malformed" state.
* TestCallsBase::getOffPeers() excludes peers with forwarding
configured (test 09 was getting ANSWERED CDR via mobile redirect
instead of the expected NO_ANSWER) and sorts results for
determinism.
* Test 09 sample CDR updated for Asterisk 22 behaviour: 2 CDR rows
(not 4), and the transfer-attempt duration is ~6s (PJSIP retry
window on an unreachable endpoint), not 1s.
* db/updateDb.php seed step clears forwarding for extension 504 so
the test DB stays valid after regenerations; binary db/mikopbx.db
already reflects this state.1 parent 6897fff commit 88c0574
8 files changed
Lines changed: 100 additions & 10 deletions
File tree
- src/Core
- Asterisk/Configs/lua
- Workers/Libs
- WorkerCallEvents
- WorkerPrepareAdvice
- tests/Calls
- Scripts
- 09-call-A-to-B-attended-B-to-offNum
- db
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
1950 | | - | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
1951 | 1957 | | |
1952 | 1958 | | |
1953 | 1959 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
134 | | - | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
96 | 109 | | |
97 | 110 | | |
98 | | - | |
99 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
100 | 116 | | |
| 117 | + | |
101 | 118 | | |
| 119 | + | |
102 | 120 | | |
103 | 121 | | |
104 | 122 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
41 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
42 | 71 | | |
| 72 | + | |
43 | 73 | | |
44 | 74 | | |
45 | 75 | | |
46 | 76 | | |
47 | 77 | | |
48 | 78 | | |
49 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
50 | 84 | | |
51 | 85 | | |
52 | 86 | | |
| |||
0 commit comments