Skip to content

NethVoice: reject unknown SIP peers without opening audio using upstream Core #8218

Description

@Stell0

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

Calls from unknown SIP peers that are rejected by policy should end immediately without answering or opening an audio session. This concerns unmatched SIP peers, not legitimate callers who withhold their telephone number.

The fork first adjusted hangup behavior around Congestion() and later removed Answer, waiting, playback and congestion entirely, replacing them with immediate Hangup. Historical reports describe lingering calls and audio-related file descriptors remaining open until Asterisk exhausted its available resources.

Original changes: 14e0d95c, bf311736 and f1c7943d in nethesis/freepbx-core.

Upstream assessment

Core 17.0.18.54 still answers and plays audio before congestion in the unknown-peer rejection path. Immediate rejection therefore needs a replacement to preserve the fork's final behavior. The historical resource leak has not been reproduced on Asterisk 22 and must not be assumed to persist unchanged.

Implementation plan

  • Confirm which supported trunks and gateways require guest acceptance, and verify their identification on the upgraded stack.
  • If guest acceptance is unnecessary, disable it through supported SIP settings after validating supported inbound paths.
  • Otherwise, route the anonymous endpoint through supported custom configuration to a module-owned context that retains the intended anonymous-call policy and logging, and immediately hangs up rejected calls without answering, playback or opening media.
  • Preserve any deliberately permitted anonymous-call routing; do not change identified trunk behavior or reject legitimate withheld caller IDs.
  • Leave Core's etc/extensions.conf unchanged.

Acceptance criteria

  • Unknown-peer calls rejected by policy end without an answered or media session.
  • Identified trunks, supported gateways and legitimate withheld caller IDs continue working.
  • Deliberately permitted anonymous-call routing remains consistent with configuration.
  • Repeated rejected calls do not accumulate channels or file descriptors; include IPv4 and IPv6 cases where supported.
  • The configuration survives reload, restart and backup/restore with unmodified upstream Core.
  • Record whether the historical lingering-call and descriptor-leak symptoms reproduce on Asterisk 22.

References

Activity

  1. added
    nethvoiceBug or features releted to the NethVoice project
    on Oct 9, 2026
  2. added theissue type on Oct 9, 2026
  3. Stell0 commented on Oct 9, 2026

    @Stell0
    Author

    Test

    Test Case 1

    • Run unknown_peer_rejection_test.php: rejected peers use no audio applications; permitted anonymous routing remains intact.

    Test Case 2

    • Send repeated unknown-peer SIP INVITEs with anonymous calls disabled: reject without answer/RTP and leave no active channels.
    • Make a registered extension call after rejection; it still connects.

    Test Case 3

    • Explicitly enable anonymous calls; verify an unknown peer reaches a configured inbound test destination, then restore the setting.

    Completed checks passed on nethvoice58 with pr-1036.1093-1.1036f75: ten INVITEs returned 100 → 603, no RTP reached the advertised port, no channels remained, and a registered call connected.

    Draft PR: nethesis/ns8-nethvoice#1036.

  4. added
    testingPackages are available from testing repositories
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

nethvoiceBug or features releted to the NethVoice projecttestingPackages are available from testing repositories

Projects

  • Status
    Testing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions