You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NethVoice: Off-hour voicemail fails after Macro-to-Gosub migration #8339
On NethVoice 1.8.3, a caller hears the off-hour announcement for a rule configured as “message and voicemail,” then the call ends before they can leave a message. The same flow was reported working on 1.7.14. The exact set of affected 1.8.x releases is unverified.
The Asterisk log shows the following after announcement playback (channel suffix omitted).
Enable an off-hour rule on an inbound route and select “message and voicemail.”
Choose an announcement and an enabled mailbox such as 220.
Call the inbound route while the rule is active and listen through the announcement.
The call should play the announcement once, let the caller record a message, and then end.
Initial investigation
The Asterisk 22 migration in nethesis/ns8-nethvoice@68b47df2 changed this AGI from EXEC Macro to EXEC Gosub. Asterisk 22.10.0 source shows that the dialplan Gosub application updates the next dialplan location. The AGI EXEC handler returns that application's result immediately, so the script's following HANGUP can run while the channel is still at the new location's preceding priority (0). The dedicated AGI GOSUB command runs the target dialplan before sending its final response. AGI result 4 means Asterisk detected a channel hangup during the AGI session. That code alone does not identify who ended the call.
Adding exit(0) after EXEC Gosub was suggested as an unverified workaround. Its behavior needs checking for a returning subroutine and a missing destination, as well as for normal voicemail.
Setup: an inbound route (DID) with an off-hour rule set to "message and voicemail", an announcement and an enabled mailbox (e.g. 201). Follow /var/log/asterisk/full inside the freepbx container during the calls.
Test Case 1 - Off-hour message and voicemail
Call the DID while the off-hour rule is active: the announcement plays once, then the voicemail greeting starts
Leave a message and hang up: the message is in the mailbox (CTI / phone voicemail / *98)
The log shows Goto (nethvoice-offhour-voicemail,s,1) followed by VoiceMail(201@default,s), no exited non-zero right after the AGI
No channel stays up after the caller hangs up (asterisk -rx "core show channels")
Test Case 2 - Regression
Off-hour rule set to "message only": the announcement plays and the call ends
Off-hour rule set to another destination (extension, queue, IVR): the call reaches it
Off-hour rule not active: the call follows the normal inbound route destination
Voicemail reached in the normal way (busy/no answer on an extension) still works
changed the title [-]Off-hour voicemail fails after Macro-to-Gosub migration[/-][+]NethVoice: Off-hour voicemail fails after Macro-to-Gosub migration[/+]on Nov 23, 2026
Activity
fix(nethvoice): restore off-hour voicemail
edospadoni commentedon Nov 20, 2026
Test
PRs: nethesis/ns8-nethvoice#1267
Setup: an inbound route (DID) with an off-hour rule set to "message and voicemail", an announcement and an enabled mailbox (e.g. 201). Follow
/var/log/asterisk/fullinside the freepbx container during the calls.Test Case 1 - Off-hour message and voicemail
*98)Goto (nethvoice-offhour-voicemail,s,1)followed byVoiceMail(201@default,s), noexited non-zeroright after the AGIasterisk -rx "core show channels")Test Case 2 - Regression
Testing release: 1.8.5-testing.53 (nethesis/ns8-nethvoice#1267, nethesis/ns8-nethvoice#1268)
[-]Off-hour voicemail fails after Macro-to-Gosub migration[/-][+]NethVoice: Off-hour voicemail fails after Macro-to-Gosub migration[/+]edospadoni commentedon Nov 23, 2026
Release
nethesis/ns8-nethvoice1.8.5