Introduction
Karoo Bridge is a SIP Session Border Controller developed by OSS Software Solutions. Unlike other similar commercial offerings, Karoo Bridge tries to reconcile the evils of B2BUA and the SIP standards. Thus, Karoo Bridge is much closer to being a proxy rather than being a switch. Primarily, Karoo Bridge solves the issues brought about by NAT using well tested far-end NAT traversal techniques as well as bridging between multi-homed network deployments. It is also capable of acting as a switch that would connect and register to ITSP while doing protocol corrections for features that are otherwise unsupported by the service provider. Karoo Bridge also boasts of its scripting API which allows administrators to design their own routing logic.
Installation
Download the repository file from http://bridge.ossapp.com/karoo/repo/ for the latest version of Karoo Bridge.
- cd /etc/yum.repos.d
- wget http://bridge.ossapp.com/karoo/repo/karoo-centos-i386.repo
- yum install karoo
- /usr/local/bin/karoo_setup-{version#}
- chkconfig --add karoo-init
- /etc/init.d/karoo-init start
To check the status of Karoo Bridge server, execute /etc/init.d/karoo-init verify.
Configuration
Karoo Bridge configuration environment is located under /etc/karoo.conf.d/ directory.
Karoo Bridge environment configuration is stored in /etc/karoo.conf.d/config/sip.cfg file. This file is used to specify external interface, internal interface, rtp port ranges, sip ports, etc... Look inside the file to become more familiar with it.
Flexi-Routing (/etc/karoo.conf.d/routes/route.js)
Karoo Bridge routing is done using an API called Flexi-Route. Flexi-Route gives you a handle on every SIP Message that goes in and out of Karoo Bridge. Flexi Route is standard ECMA JavaScript so it benefits from every cool feature that the language provides including JavaScript regular expressions. The inspiration behind a scripting language versus using DB-based dial plans was born out of the fact that there is no single rule in routing and no amount of database structure would be enough to compensate for the different and ever changing rules needed for dial-plan maintenance.
Debugging
Karoo Bridge logs are found under /var/log/karoo/ directory. The main log of interest is sbc.log.
To change the level of logging, execute karoo --reset-log-level {log level} while Karoo Bridge is running. ie karoo --reset-log-level debug.
When testing javascript handler code, you may wish display variable values by writing to either error or debug logs by calling log_debug(""); or log_error(""); procedures.