SIP externip problem

Asterisk Version 11.17.1

My system running Asterisk has two network interfaces.

First one goes to a router with access to the internet and local lan.
Second goes directly to my SIP trunk provider. This interface can only be used to access one host. The host is the system that provides my SIP trunks. I have a route setup on my Asterisk computer to send traffic to this host over the second interface. All other traffic comes and goes over the first interface.

For some reason I have to set my externip = to the second interface ip address. If i set it to the other interface ip address my SIP trunks will work. I get a one way connection.

If i set the externip = to the router ip address then the external sip clients can communicated but the SIP trunks from the other interface won’t work.

I am not sure why I need to set the externip for the SIP trunks as they are not doing NAT. nat=no in the SIP configuration for the trunks and the IP is direction on the box.

All SIP devices coming in over the LAN no problem.

How can I have externip set for each sip device differently? what am I doing wrong?

You can’t. Asterisk expects to be run on properly multi-homed machine.

(You probably can by having two instances of Asterisk and having them forward the calls between themselves.)