[OpenSIPS-Users] Load Balancer

Matt Broad matt at supportedbusiness.com
Wed Jun 24 16:40:16 CEST 2015


Hi,

I have the following setup (the IP addresses are made up but should give an
indication):

1 x opensips server with load balancer module - IP 192.168.0.1
2 x freeswitch servers - IP 192.168.0.2 & 192.168.0.3

All 3 servers have seperate external IP address routing to their internal
IP via our firewall:
217.0.0.1 routed to 192.168.0.1 (Opensips)
217.0.0.2 routed to 192.168.0.2 (FS1)
217.0.0.3 routed to 192.168.0.3 (FS2)

I have the load_balancer table with the following details:

id,  | group_id, |                  dst_uri,            | resources,  |
probe_mode, | description
'1',  |      '1',     |  'sip:192.168.0.2:5080',  |   'pstn=10', |
 '2',       |          'FS1'
'2',  |      '1',     |  'sip:192.168.0.3:5080',  |   'vm=1',     |
'2',       |          'FS2'


Now the initial invite goes through the usual steps, as shown below, but
the issue arises when the ACK comes back from the SIP provider.  Opensips
is trying to forward the packet to the Freeswitch external IP address
rather than the internal IP.  This is due, I think, to the Contact details
in the 200 response from Freeswitch containing the Freeswitch external IP.
Is there a way of having Opensips take the external IP and route to the
internal IP instead?  Any help/suggestions would be much appreciated.



No.TimeSourceDestinationProtocolLengthInfo425.827674SIP ProviderOpenSips
InternalSIP/SDP873Request: INVITE sip:test at Opensips External |
435.828043OpenSips
InternalSIP ProviderSIP397Status: 100 Giving a try | 445.828159OpenSips
InternalFreeswitch InternalSIP/SDP1039Request: INVITE sip:test at Opensips
External | 455.828605Freeswitch InternalOpenSips InternalSIP588Status: 100
Trying | 465.832171Freeswitch InternalOpenSips InternalSIP/SDP1221Status:
200 OK | 545.833451OpenSips InternalSIP ProviderSIP/SDP1132Status: 200 OK |
555.836739SIP ProviderOpenSips InternalSIP522Request: ACK
sip:test at Freeswitch External:5080;transport=udp | 615.838075OpenSips
InternalFreeswitch ExternalSIP545Request: ACK sip:test at Freeswitch
External:5080;transport=udp | 706.33254Freeswitch InternalOpenSips Internal
SIP/SDP1221Status: 200 OK | 716.33265OpenSips InternalSIP ProviderSIP/SDP
1132Status: 200 OK | 807.332536Freeswitch InternalOpenSips InternalSIP/SDP
1221Status: 200 OK | 817.332666OpenSips InternalSIP ProviderSIP/SDP1132Status:
200 OK | 869.332576Freeswitch InternalOpenSips InternalSIP/SDP1221Status:
200 OK | 879.332712OpenSips InternalSIP ProviderSIP/SDP1132Status: 200 OK |
13613.331858Freeswitch InternalOpenSips InternalSIP/SDP1221Status: 200 OK |
15216.938621SIP ProviderOpenSips InternalSIP553Request: BYE
sip:test at Freeswitch External:5080;transport=udp | 15816.939786OpenSips
InternalFreeswitch ExternalSIP577Request: BYE sip:test at Freeswitch
External:5080;transport=udp | 16017.33247Freeswitch InternalOpenSips
InternalSIP/SDP1221Status: 200 OK | 16117.37482OpenSips InternalFreeswitch
ExternalSIP577Request: BYE sip:test at Freeswitch External:5080;transport=udp
| 16317.937941SIP ProviderOpenSips InternalSIP553Request: BYE
sip:test at Freeswitch External:5080;transport=udp | 16618.375894OpenSips
InternalFreeswitch ExternalSIP577Request: BYE sip:test at Freeswitch
External:5080;transport=udp | 17018.776373OpenSips InternalSIP ProviderSIP
415Status: 408 Request Timeout | 17821.332616Freeswitch InternalOpenSips
InternalSIP/SDP1221Status: 200 OK | 22225.333161Freeswitch InternalOpenSips
InternalSIP/SDP1221Status: 200 OK | 25729.333884Freeswitch InternalOpenSips
InternalSIP/SDP1221Status: 200 OK | 28333.334482Freeswitch InternalOpenSips
InternalSIP/SDP1221Status: 200 OK | 30637.335049Freeswitch InternalOpenSips
InternalSIP/SDP1221Status: 200 OK |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150624/fcb0c8f8/attachment-0001.htm>


More information about the Users mailing list