Wrong IP address in FROM header when using multiple interfaces

Hello to all,

I’m facing basicly the same problem as descdibed here:

But with difference that I have correct SDP.

I determine that the poblem is causing because of setting of default GW. By that I mean:

I have one interface for example eth1 with acces to internet and with set GATEWAY parameter in /etc/sysconfig/network-scripts/ifcfg-eth1

and also I have enother interface eth2 which has been using only for phones and with no GATEWAY

and FROM header has displaying eth1 IP instead eth2 IP.
but I need that FROM header displaysIP of eth2.
CONTACT header is right.

So if I change GW (comment in eth1 and type some GW IP to eth2 settings) it displays the correct FROM header.
The problem is that eth2 must not have the GW.

Has anyone idea how to achive that?

I would suggest that investigating why someone told you you need a network connection with no configured gateway might be a good first start into this issue.

How about you clarify things. Your post starts with eth0 and eth1 by then end you are talking about eth1 and eth2. Where did eth2 come from?

The local networks in Asterisk SIP settings is where you define subnets that are not going to be natted.

Where is eth0 mentioned?
I told about eth1 and eth2.
eth0 was mentioned only in post of another user but wih same problem