Skip to content

SIP call paths allocate RTP from unbounded kernel-ephemeral ports #70

Description

@ryanmurf

Problem\n\nInbound and outbound SIP legs bind RTP to port 0, so the kernel selects arbitrary ephemeral ports. Firewalls, Kubernetes Services, NAT rules, and test assertions cannot define the media surface.\n\n## Expected\n\n- support Asterisk-compatible rtp.conf [general] rtpstart/rtpend\n- validate the inclusive non-zero range at startup\n- allocate both inbound and outbound RTP sockets only inside one shared range\n- return a deterministic exhaustion error; an inbound INVITE must fail cleanly rather than advertise a fake port\n- release capacity when the call media session is torn down\n\nAsterisk documents rtpstart/rtpend as the global RTP start/end range in its official configs/samples/rtp.conf.sample. SDP advertises the selected media port in the m= line per RFC 4566 section 5.14, so advertising a placeholder after bind failure is invalid operational behavior.\n\n## Regression tests\n\nUse a one-port range to prove first allocation succeeds in-range, the next allocation reports exhaustion, and dropping/tearing down the first session makes the exact port reusable. Cover invalid configuration and the real SIP driver teardown path.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions