Route Trunk to special Eth

Hello Freinds! Could you help me please?

I need to connect similar Trunks to different Eth ports (router):
Three operators Sip accounts linked to own DSL modem,
accounts can be connected only through own modem.

What we have, Freepbx 15:

  1. Three PJSIP Trunks, named: T1, T2, T3 , with same operator sip server:
  2. Three ETH ports connected to DSL modems, with networks:,,
  3. Trunk T1 must be connected through ETH1, T2 on ETH2, T3 on ETH3

It’s easy to make route only for 1 trunk with linux routing like:
route add -host gw dev eth1,

And if I do it, works only Trunk T1. Trunks T2, T3 will be rejected from server.

The question:
How to configure FreePBX to:
Trunk T1 will connect through ETH1,
T2 through ETH2,
T3 through ETH3

Thank you!!!

How are you configuring/specifying the host for each individual trunk? If it’s by IP you may need to set static routes for each individual host destination to force the connections to certain IPs through the correct gateway.

I think the problem is that the destination address is the same for all of these. I think they are trying to manipulate the external address to be different by using three local interfaces and three ISP connections (although ti could be one ISP connection with multiple addresses).

They need to create three pjsip transports, each bound to a different interface. I believe that has to be done with custom .conf files.

I guess that could be but I am not understanding why the need for the three different trunks if it’s all ending up at the same host?

Dear Freinds,
Operator blocked SIP accounts to each OWN DSL modem,
and SIP account can be connected to SIP server only through its DSL Modem.

SIP server of the operator checks something, like external IP of DSL modem or something else.
And when you try to coonect to SIP server not from linked DSL modem, connection rejected.

I have only one telephone line connected to SIP server, other two linesare waiting for solution :slight_smile:


That’s why im here, try to fins solution how to make something like custom .conf file,
to link Trunk to Eth, which i need.

I’m not pro in FreePbx, and i didn’t find relevant solution in internet,
Could you help me to make custom .conf ?

I belive it’s possible to make addiditional .conf, which will be added to generated by FreePBX from GUI .conf file. But I don’t know exactly.

Possibly, the GUI will allow you to create multiple UDP transports. In Asterisk SIP Settings, chan_pjsip tab, do you see (for example)
udp - - All
udp - - - eth1
udp - - - eth2
udp - - eth3

If so, can you set the All entry to No and more than one of the others to Yes?
If this isn’t clear, post a screenshot of this page.

Not so easy from the GUI but @lgaetz posted

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.