Files
asterisk/include/asterisk
mattia 8e221dfd03 res_pjsip: Add per-endpoint RTP port range configuration
Add rtp_port_start and rtp_port_end options to PJSIP endpoint
configuration, allowing each endpoint to use a dedicated RTP port
range instead of the global rtp.conf setting.

This is useful for scenarios where different endpoints need isolated
port ranges, such as firewall rules per trunk, multi-tenant systems,
or network QoS policies tied to port ranges.

The implementation adds ast_rtp_instance_new_with_port_range() to the
RTP engine API, which sets the port range on the instance before the
engine allocates the transport. The default RTP engine
(res_rtp_asterisk) checks for per-instance overrides in
rtp_allocate_transport() and falls back to the global range when
none is set.

Both options must be set together, with values >= 1024 and
rtp_port_end > rtp_port_start. Setting both to 0 (the default)
preserves existing behavior.

Resolves: https://github.com/asterisk/asterisk-feature-requests/issues/71

UserNote: PJSIP endpoints now support rtp_port_start and
rtp_port_end options to configure a dedicated RTP port range per
endpoint, overriding the global rtp.conf setting.

UpgradeNote: An alembic database migration has been added to add
the rtp_port_start and rtp_port_end columns to the ps_endpoints
table. Run "alembic upgrade head" to apply the schema change.

DeveloperNote: New public API: ast_rtp_instance_new_with_port_range()
creates an RTP instance with a per-instance port range.
ast_rtp_instance_get_port_start() and ast_rtp_instance_get_port_end()
allow RTP engines to query the override. Third-party RTP engines can
use these getters to support per-instance port ranges.
2026-04-28 17:45:53 +00:00
..
2021-11-16 05:59:44 -06:00
2021-12-02 15:02:09 -06:00
2021-11-16 05:59:44 -06:00
2025-06-02 16:35:34 +00:00
2024-02-28 18:39:03 +00:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-03 10:38:39 -06:00
2025-08-06 15:37:52 +00:00
2026-03-02 16:43:25 +00:00
2021-12-02 15:02:09 -06:00
2021-12-13 08:57:26 -06:00
2021-12-02 15:02:09 -06:00
2023-01-31 11:23:11 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2023-04-10 14:38:51 -05:00
2021-12-02 15:02:09 -06:00
2023-01-10 14:07:44 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-11-18 16:13:18 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2025-04-21 13:29:33 +00:00
2021-12-13 08:57:26 -06:00
2021-12-02 15:02:09 -06:00
2025-04-02 12:16:41 +00:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2025-04-21 13:29:33 +00:00
2021-12-02 15:02:09 -06:00
2021-11-16 05:59:44 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-03 10:38:39 -06:00
2021-12-02 15:02:09 -06:00
2021-11-16 05:59:44 -06:00
2021-11-16 05:59:44 -06:00
2025-09-22 17:39:18 +00:00
2023-01-31 11:23:11 -06:00
2022-12-09 08:59:04 -06:00
2021-12-03 10:38:39 -06:00
2021-11-19 02:50:36 -06:00
2021-12-03 10:38:39 -06:00
2021-12-03 10:38:39 -06:00
2021-11-16 05:59:44 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-11-18 14:46:42 -06:00
2021-11-18 14:46:42 -06:00
2021-11-18 14:46:42 -06:00
2021-11-18 14:46:42 -06:00
2021-12-03 10:38:39 -06:00
2021-12-02 15:02:09 -06:00
2022-05-09 08:21:45 -05:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2023-01-31 11:23:11 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2025-06-02 16:35:34 +00:00
2023-01-31 11:23:11 -06:00