Wrong IP used in SIP packets

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Wrong IP used in SIP packets

Postby rebourn » Mon Oct 12, 2015 6:13 am

Hello all.

Have a system running with 2 VLANs and 3 Virtual IP's.

For example:
Code: Select all
vln1:1 = 200.200.200.200 (public)
vln1:2 = 192.168.1.1 (local for phones)
vln2:1 = 10.10.10.10 (local for provider)


My problem is packets intended for the provider have the public IP address in the VIA and from headers, and they are being rejected.
Code: Select all
bindaddr=0.0.0.0

Code: Select all
10.10.10.2/24 via 10.10.10.1 dev vln2  src 10.10.10.10

The OS itself does the routing properly and the INVITE leave through the correct interface with the correct IP address, but the headers are incorrect.

10.10.10.10.5060 > 10.10.10.2.5060: SIP, length: 832
INVITE sip:XXXXXXXXXXXX@10.10.10.2 SIP/2.0
Via: SIP/2.0/UDP 200.200.200.200:5060;branch=z9hG4bK4ee3a9f6;rport
Max-Forwards: 70
From: "Adnan 2" <sip:105@10.10.10.10>;tag=as5ea03b1f
To: <sip:XXXXXXXXXXXX@10.10.10.2>
Contact: <sip:105@200.200.200.200:5060>
Call-ID: 1db97133259a8dae6f28baa31b5932c6@10.10.10.10
CSeq: 102 INVITE
User-Agent: Asterisk
Date: Mon, 12 Oct 2015 11:31:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 273


Any advice how to get this corrected?
rebourn
Newsterisk
 
Posts: 1
Joined: Mon Oct 12, 2015 5:54 am

Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 18 guests