15 Replies Last post: Dec 3, 2009 2:18 AM by austincao   1 2 Previous Next
Click to view mapombo's profile   7 posts since
Apr 8, 2009

Apr 8, 2009 9:50 AM

OpenSBC Two Nics Scenario

Hi,

I've been trying to setup OSBC on a server with two NICs, one for outside an the other for inside.

However, when receiving an INVITE from the outside, I can see via Wireshark the INVITE being sent correctly to the inside proxy through the inside NIC, but the source IP is the one from the outside NIC. How can I force the requests to inside to use the source IP belonging to the inside NIC?

Thanks a lot,

mapombo

Click to view joegen's profile   519 posts since
Apr 28, 2007
1. Apr 13, 2009 10:32 PM in response to: mapombo
Re: OpenSBC Two Nics Scenario
Two ways. If you are using linux, make sure that you configure opensisptack to use the gpl-libs
#./configure --enable-gpllibs
This should enable opensipstack to use the more reliable iproute2 library when choosing the correct interface.

If the above still doesn't work for you, check out the latest opensbc from CVS. I have recently added a new page in the admin called SIP-Transports.
Interface-Route-List parameter is what would be significant for you. I provided the comment below.

In case where OpenSBC acts as a bridge across multiple networks, it is vital for OpenSBC to use the correct interface which can route outbound packets to the target network. Although OpenSBC has quite a good way of determining this by maximizing the use of the actual OS route table, there are cases where the complexity or probably just misconfigured route tables may produce a wrong interface address. This list allows us to statically impose which interface OpenSBC would use for particular destinations. The entry here should be expressed in B2BUA-Route format using SIP-URI syntax. Example: [sip:10.0.1.*] sip:10.0.1.1 where sip:10.0.1.* is the target network and sip:10.0.1.1 is the interface to use to reach the network. 
Click to view joegen's profile   519 posts since
Apr 28, 2007
3. Apr 15, 2009 9:20 PM in response to: mapombo
Re: OpenSBC Two Nics Scenario
Can you post the level five log of the call please together with your opensbc.ini
Click to view joegen's profile   519 posts since
Apr 28, 2007
5. Apr 17, 2009 10:45 PM in response to: mapombo
Re: OpenSBC Two Nics Scenario
Thanks for the logs. I can see the error you are talking about. I've patched the OpenSIPStack Library accordingly. Can you download the recent OpneSIPStack and recompile OpenSBC? Let me know how it goes.
Click to view joegen's profile   519 posts since
Apr 28, 2007
8. May 6, 2009 10:30 PM in response to: mapombo
Re: OpenSBC Two Nics Scenario
I agree about the record route. I will patch than one up soon. However, I couldnt replicate the contact problem here. In fact OpenSBC relays the contact of the callee in the 200 OK. Thats definitely a major screw up. Woul you be able to test with me real-time and place test calls to my test server? Let's a gree on a time and date. I am nomrally available 8 PM - 12 PM Eastern Standard Time.
Click to view joegen's profile   519 posts since
Apr 28, 2007
11. May 30, 2009 7:49 PM in response to: mapombo
Re: OpenSBC Two Nics Scenario
I think this is already fixed in the latest CVS version. Could you test against that and report your findings?
  30 posts since
Jun 24, 2009
12. Jun 29, 2009 12:01 PM in response to: joegen
Re: OpenSBC Two Nics Scenario

Anyone has a proper configuration for OSBC Two Nic.

Right now all external registrations give 408

Using OSBC v1.1.5-108

  30 posts since
Jun 24, 2009
13. Jun 29, 2009 12:49 PM in response to: dablackgreek
Re: OpenSBC Two Nics Scenario
Ok one thing learned... In SIP Transports you have to list your Public Interface first to get it to register
  30 posts since
Jun 24, 2009
14. Jun 29, 2009 3:58 PM in response to: dablackgreek
Re: OpenSBC Two Nics Scenario

Ok All. I finally got my OSBC with TWO NICS to Work

My working config is below...

Pay close attention you must declare your Interfaces in the SIP Transports and also look at the Route List in SIP Transports.

FYI: I am running OpenSBC in front of Asterisk

OpenSBC WAN IP: w.x.y.188
OpenSBC LAN IP: 192.168.1.150

Asterisk IP: 192.168.1.250

If you have questions i am actively on this board

[Solegy]
RTTS-Client-Address=192.168.1.150

[OpenSBC-General-Parameters]
SIP-Log-Level=5
PTRACE-Log-Level=1
Log-File-Prefix=opensbc
User-Agent-Name=SBC
SBC-Application-Mode=B2BUpperReg Mode
Interface-Address Array Size=0
Enable-Backdoor-Port=True
Enable-Trunk-Port=False
Enable-Calea-Port=False
Static-RTP-Media-Address=
RTP-Min-Port=30001
RTP-Max-Port=40000
Send-Responses-Using-New-Socket=True
Enable-Local-Refer=False
Max-Forwards=70
Encryption-Mode=XOR
Encryption-Key=GS
Transaction-Thread-Count=10
Session-Thread-Count=10
Alerting-Timeout=30000
Seize-Timeout=60000
SIP-Timer-B=Default
SIP-Timer-H=Default
Session-Keep-Alive=1800
Session-Max-Life-Span=10800
Max-Concurrent-Session=100
Max-Call-Rate-Per-Second=10
Interface-Address 1=sip:192.168.1.150:5060

[Upper-Registration]
All-Reg-As-Upper-Reg=True
Enable-Stateful-Reg=False
Rewrite-TO-Domain=True
Rewrite-FROM-Domain=True
Route-List Array Size=1
Route-List 1=[sip:*@sip.mydomain.net] sip:192.168.1.250;domain=sip.mydomain.com

[Internal-DNS-Mapping]
Internal-DNS-Map Array Size=0

[RTP-Proxy]
Proxy-On-Private-Contact=True
Proxy-On-via-received-vs-signaling-address=True
Proxy-On-Private-Via=True
Proxy-On-Different-RPORT=True
Proxy-All-Media=True

[Media-Server]
Enable-Media-Server=False
Media-Server-Number=5000
Codec-List Array Size=0
No-RTP-Proxy-On-All-Transfers=False
Enable-Announcement-Service=False
4xx-Error-Map=prompts/basic/cant_complete.wav
5xx-Error-Map=prompts/basic/cant_complete.wav
6xx-Error-Map=prompts/basic/cant_complete.wav
Announcement-Error-Map Array Size=0

[B2BUA-Routes]
Enable-Route-Scripting=False
Route-Script=b2bua-route.cscript
Route-List Array Size=1
Route-List 1=[sip:*@sip.mydomain.net] sip:192.168.1.250
Catch-All-Route=
Insert-Route-Header=True
Rewrite-TO-URI=True
Rewrite-From-Domain=
Prepend-ISUP-OLI=False
Route-By-Request-URI=True
Route-By-To-URI=False
Drop-Routes-On-Ping-Timeout=False
Use-External-XML=False
External-XML-File=b2bua-route.xml

[Local-Domain-Accounts]
Accept-All-Registration=True
Account-List Array Size=0

[Trusted-Domains]
Accept-All-Calls=True
Trusted-Domain-List Array Size=0

[Privacy-RFC-3325]
Default-Realm=
Trusted-Domain-List Array Size=0

[SIP-Transports]
Main-Interface-Address Array Size=2
Backdoor-Interface-Address=sip:*:5062
Trunk-Interface-Address=sip:*:5064
Media-Server-Interface-Address=sip:*:5066
CALEA-Interface-Address=sip:*:5068
Auxiliary-Interface-Address=sip:*:5070
Interface-Route-List Array Size=2
Interface-Route-List 1=[sip:192.168.1.*] sip:192.168.1.150
Main-Interface-Address 1=sip:192.168.1.150:5060
Main-Interface-Address 2=sip:w.x.y.188:5060
Interface-Route-List 2=[sip:w.x.y.*] sip:192.168.1.150;external=w.x.y.188