Environment:
IncrediblePBX (FreePBX) / Asterisk 22.11.0, chan_pjsip
Server with multiple network interfaces:
192.168.22.209 (eth0) — external-facing NIC, port forwarding for remote/roaming extensions + IAX2
192.168.23.209 (eth1) — internal VLAN, all internal phones live here (isolated, no internet access by design)
10.0.10.10 — SIP trunk Providers
All PJSIP UDP transports bound on port 7666 (per-IP)
SIP trunk Providers on 5060
Problem:
I have a multi-homed FreePBX / Asterisk (chan_pjsip) server. When an extension's transport is left empty, Asterisk auto-selects a transport and, in this multi-homed setup, often picks the wrong one. As a result the media_address ends up as the wrong interface IP — e.g. a phone registered from 192.168.23.69 gets media_address = 192.168.22.209.
What I've found works (but only per-extension):
I've found two ways to fix it, but each one has to be done per extension:
Option 1 — edit pjsip.endpoint_custom_post.conf:
[<extension number>](+)
media_address=192.168.23.9
Option 2 — modify the extension (GUI Advanced tab):
transport = 192.168.23.209-udp (the correct interface)
media_use_received_transport = yes
My question:
Is there a way to make this happen globally / automatically for all extensions, instead of editing every single extension (via the GUI Advanced tab or pjsip.endpoint_custom_post.conf)?
IncrediblePBX (FreePBX) / Asterisk 22.11.0, chan_pjsip
Server with multiple network interfaces:
192.168.22.209 (eth0) — external-facing NIC, port forwarding for remote/roaming extensions + IAX2
192.168.23.209 (eth1) — internal VLAN, all internal phones live here (isolated, no internet access by design)
10.0.10.10 — SIP trunk Providers
All PJSIP UDP transports bound on port 7666 (per-IP)
SIP trunk Providers on 5060
Problem:
I have a multi-homed FreePBX / Asterisk (chan_pjsip) server. When an extension's transport is left empty, Asterisk auto-selects a transport and, in this multi-homed setup, often picks the wrong one. As a result the media_address ends up as the wrong interface IP — e.g. a phone registered from 192.168.23.69 gets media_address = 192.168.22.209.
What I've found works (but only per-extension):
I've found two ways to fix it, but each one has to be done per extension:
Option 1 — edit pjsip.endpoint_custom_post.conf:
[<extension number>](+)
media_address=192.168.23.9
Option 2 — modify the extension (GUI Advanced tab):
transport = 192.168.23.209-udp (the correct interface)
media_use_received_transport = yes
My question:
Is there a way to make this happen globally / automatically for all extensions, instead of editing every single extension (via the GUI Advanced tab or pjsip.endpoint_custom_post.conf)?