Repository navigation
NethVoice: preserve pickup across profile contexts with upstream FreePBX Core #8215
Description
Parent: #7570
Preserve this NethVoice behavior while using the unmodified upstream FreePBX Core module. The upgrade checkout installs Core 17.0.18.54. The old nethesis_nv8 fork is based on Core 16.0.68.40; comparing it with the matching upstream 16 release isolates the Nethesis changes from unrelated upstream updates. The obsolete Flexisip transport change is excluded from this migration.
Problem and original purpose
A phone or CTI user must be able to pick up a ringing extension according to the configured permissions, even when the two extensions use different profile contexts. The fork resolves the target extension context and includes it in the pickup candidates. It also adjusts the extension and group candidates generated for ring-group members.
Original changes: bf28bbfc and c0befcfd in nethesis/freepbx-core. Historical reports document failures for direct and queue calls across contexts, and missing candidates for ring-group members outside from-internal.
Upstream assessment
Core 17.0.18.54 still generates an unqualified pickup target and hard-coded ring-group contexts. NethVoice still assigns cti-profile-* device contexts. Asterisk resolves an unqualified target in the current context, so this behavior needs a replacement. This assessment is based on source inspection; live call validation on the upgraded stack remains part of the work.
Implementation plan
- Add a late dialplan hook in the existing NethVoice module, after Core has generated
app-pickup. - Use a shared, module-owned context resolver based on
Core()->getDevice()rather than copying the fork's direct SQL lookup. - Add the target extension context and the appropriate group context while retaining
PICKUPMARKand existing standard candidates. - Cover generic pickup patterns, exact ring-group member entries, intercom-prefixed targets, and customized feature codes.
- Keep any required runtime helper inside the NethVoice module. Preserve existing pickup permissions and handle deleted devices explicitly.
- Leave Core source files unchanged. Share the resolver with the forwarding-context migration sub-issue.
Acceptance criteria
- Phone and CTI pickup work across different profiles for direct, queue, ring-group and intercom calls.
- Same-profile pickup and customized pickup codes continue working.
- Existing pickup permissions remain effective.
- Profile changes and deleted devices are handled correctly after Apply Config.
- Generated dialplan remains valid after repeated reloads, restart and backup/restore, with unmodified upstream Core.
References
- Direct pickup doesn't work if extension aren't in the same context nethesis/dev#6059
- Pickup doesn't work for extensions that aren't in from-internal context nethesis/dev#6039
- Fix pickup between extension with different context nethesis/freepbx-core#5
- https://github.com/FreePBX/core/blob/release/17.0.18.54/functions.inc.php#L1304
- https://docs.asterisk.org/Asterisk_22_Documentation/API_Documentation/Dialplan_Applications/Pickup/
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTesting
Activity
Stell0 commentedon Oct 9, 2026
Test
Test Case 1
profile_pickup_test.php: profile and legacy candidates, custom pickup/intercom codes, missing devices.Test Case 2
**<extension>.Test Case 3
Completed checks passed on
nethvoice58withpr-1032.1089-1.89528f1(Core 17.0.18.54). Draft PR: nethesis/ns8-nethvoice#1032.fix(pickup): Use the target profile context