Asterisk with Dual IP/NIC Source address

Closed - This job posting has been filled and work has been completed.
IT & Networking Network & System Administration Posted 3 years ago


Hours to be determined
Less than 1 week

Start Date

March 18, 2013



We have an Asterisk server with 2 IP address (1 Physical card) and we want to make it work through both IP as a seperate trunks.

IP address for eth0:
IP address for eth0:0:

We are accessing both IPs externally through different Public IP.
(i.e. 175.x.x.x --> --> and 202.x.x.x --> -->

We are being successful in getting SSH and other functions normally and can access server externally using 2 IPs,

However, for SIP when registration request comes it uses source address as always (even for inbound request to and as a result client cant get registered through 175.x.x.x.-->

10:07:06.293653 IP 27.x.x.x.54544 > SIP, length: 578
10:07:06.293911 IP > 27.x.x.x.54544: SIP, length: 595
(look above, it is replying with src IP instead of

But for other service it is ok (e.g. ICMP)
e.g ICMP for reply the source IP is same as on which request is received(

10:02:52.695348 IP 27.x.x.x > ICMP echo request, id 1, seq 1037, length 40
10:02:52.695361 IP > 27.x.x.x: ICMP echo reply, id 1, seq 1037, length 40
(Reply from the same source where it receives request.)

Asterisk version is and server Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37)

Can anyone provide us solution to make SIP and RTP working through the same GW and it is received like other traffic?


Skills: gnu, linux

About the Client

(4.79) 24 reviews

Edgecliff 01:58 PM

104 Jobs Posted
34% Hire Rate, 1 Open Job

Over $20,000 Total Spent
43 Hires, 4 Active

$5.08/hr Avg Hourly Rate Paid
4,157 Hours

Member Since Jul 25, 2011