[asterisk-ha-clustering] HA SIP configuration

Ron Byer Jr. ronb at netweave.com
Mon Mar 23 16:57:07 CDT 2009


Greetings,

I'm stumped on what initially appeared to be a minor configuration, 
(could still be), but has avoided my attempts to resolve.

I have a 2 node Asterisk (v 1.4.18) solution in what right now is an 
active-passive configuration, utilizing heartbeat and a virtual-ip as 
the shared resource.

Simply put, I can easily contact the primary server using the 
virtual-ip, but the primary server responds with it's own ip, and all 
the SIP/SDP fields (From, Contact, etc) as well as the rtp media 
definition use the master's IP address. This screws up the down stream 
devices which expect to be talking to the virtual IP address.

I thought for sure that using externip/localnet would enable me to 
change the ip addresses in the SIP addresses, but it hasn't changed.

Here is a registration sequence: downstream device contacts x.y.z.196, 
asterisk responds with x.y.z.194

919.886986 68.162.18.94 -> x.y.z.196 SIP Request: REGISTER sip:x.y.z.196
919.887122 x.y.z.194 -> 68.162.18.94 SIP Status: 100 Trying    (1 bindings)

919.887154 x.y.z.194 -> 68.162.18.94 SIP Status: 401 Unauthorized    (0 
bindings)
920.286086 68.162.18.94 -> x.y.z.196 SIP Request: REGISTER sip:x.y.z.196

920.286154 x.y.z.194 -> 68.162.18.94 SIP Status: 100 Trying    (1 bindings)
920.288624 x.y.z.194 -> 68.162.18.94 SIP Status: 200 OK    (1 bindings)


for instance, the following INVITE refers to x.y.z.194, whereas the 
virtual ip that is expected is x.y.z.196

<--- SIP read from x.y.z.194:5060 --->
INVITE sip:1234567899 at 68.162.18.94 SIP/2.0
Via: SIP/2.0/UDP x.y.z.194:5060;branch=z9hG4bK5483927e;rport
From: "Cell Phone   NJ" <sip:9084155221 at x.y.z.196>;tag=as29b82d1a
To: <sip:1234567899 at 68.162.18.94>
Contact: <sip:1234567890 at x.y.z.194:5060>
Call-ID: 1e40784a6b85c438170fd87e5825482b at sip.agiletel.net
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Mon, 23 Mar 2009 21:08:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 341

v=0
o=root 26714 26714 IN IP4 x.y.z.194
s=session
c=IN IP4 x.y.z.194
t=0 0
m=audio 18486 RTP/AVP 0 111 18 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

downstream device (which is a Astlinux-based Asterisk appliance running 
Asterisk 1.4.23

Any thoughts on direction to pursue would be most appreciated.

Regards,

Ron Byer





More information about the asterisk-ha-clustering mailing list