Linux Short Installation Guide

From berofix - professional SIP gateway
Revision as of 10:08, 16 September 2013 by WikiSysop (Talk | contribs) (Discovering and Resetting berofix:)

Jump to: navigation, search

Linux Installation Short Guide

This howto describes the basic steps to bring your new beroFix card into your network, and howto configure it so that you can make SIP to ISDN calls and vice versa. This howto is intended to use Asterisk as SIP Proxy, but you can use most of the setup for other SIP Proxies as well.

So the Steps are:

1. Setup Networking
1.1 Discovering and Resetting berofix
2. Add User for berofix in the Proxy/Registrar
3. Setup SIP/ISDN and Routing in beroFix

After these steps, you should be able to place and receive calls with berofix.

Setup Networking:

beroFix uses a Realtek PCI Network Chip to communicate with the Host PC. Which means it looks like a Network Card when you put it into a PC. This means that you don't have to compile or load any additional driver instead of the Network card driver ( 8139too on Linux). The layout looks basically like:

LAN <----> NIC_LAN (eth0) <-> PC <-> NIC_BEROFIX (eth1) <---> BEROFIX CPU

The PC can directly talk to the beroFix CPU via IP, but to make the beroFix CPU talk to other network Elements an additional Setup is required.

There are 3 common ways to make the Berofix CPU visible to the LAN components:

1. a Ethernet Bridge (recommended) 2. proper Routing 3. NAT

We will focus on howto use a bridge for now, since this makes the easiest setup and allows the most flexibility. It is also possible to use bridges on other operating systems than linux.

You can setup the bridge with the "brctl" utility. This utility is provided by the "bridge-utils" package on debian based systems (like ubuntu).

The beroFix cards have MAC Addresses beginning with "D8:DF:0D" or with "00:50:c2", so you can identify these cards with "ifconfig -a" :

  ifconfig -a 
  eth0      Link encap:Ethernet  HWaddr 00:0C:6E:D3:86:C6  
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:797562 errors:0 dropped:0 overruns:0 frame:0
            TX packets:35206 errors:20 dropped:0 overruns:0 carrier:20
            collisions:7447 txqueuelen:1000 
            RX bytes:141351732 (134.8 MiB)  TX bytes:19431622 (18.5 MiB)
            Interrupt:11 Base address:0xc000 
  eth1      Link encap:Ethernet  HWaddr 00:50:C2:83:D0:01
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:35124 errors:0 dropped:0 overruns:0 frame:0
            TX packets:276362 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:20636164 (19.6 MiB)  TX bytes:28931756 (27.5 MiB)
            Interrupt:11 Base address:0xa000 
  lo        Link encap:Local Loopback  
            inet addr:  Mask:
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:9 errors:0 dropped:0 overruns:0 frame:0
            TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:720 (720.0 b)  TX bytes:720 (720.0 b)

In this example eth1 is the berofix card.

To setup the bridge, you need to enter a few commands:

  ifconfig eth0 up
  ifconfig eth1 up
  brctl addbr br0
  brctl addif br0 eth0
  brctl addif br0 eth1
  ifconfig br0 up 

These commands will first remove the ip-addresses from your network card, will create the bridge and add your network and the berofix card to this bridge. In this case the bridge gets the IP

The default IP of the berofix CPU is, you can change this later, then you can modify the bridge IP too.

To setup this bridge in a persitant way, you can modify your "/etc/network/interfaces" file on debian like systems (like ubuntu):

  auto lo
  iface lo inet loopback
  auto br0
  iface br0 inet static
     	bridge_ports eth0 eth1

Then you can restart your networking with:

  /etc/init.d/networking restart

Now you should be able to communicate with the berofix CPU. You can do this by simply using a webbrowser and browse to the IP of the berofix CPU, simply enter:  

In your favourite Webbrowser. You will be prompted to enter a username and passwort, which are user:"admin" password:"admin" by dafault.

Discovering and Resetting berofix:

The following mechanisms require a bridge Setup! See above (1.).

If you ever get lost, while setting up a wrong IP or DHCP without a DHCP Server you can use the bfdetect tool to find and reset the device.

The bfdetect tool can be fetched via:

Simply untar and compile it with:

  tar xzf bfdetect.tar.gz
  cd bfdetect
  make install

now you can discover the berofix device with:


You'll get a menu with every found berofix, then you can configure it's IP Settings.

Add User for berofix in the Proxy:

Assuming that you use Asterisk as SIP Proxy, you can make a very simple setup for berofix. Simply add the following lines to the "/etc/asterisk/sip.conf":


In the "/etc/asterisk/extensions.conf" you need to add a context "from-sip" like:

  exten => _X.,1,Playback(tt-monkeys)

So every call from berofix will be routed to Playback(tt-monkeys). When you want to send calls to beroFix you can simply use the following dial statement:

  exten => _0X.,1,Dial(SIP/${EXTEN:1}@berofix)
  exten => _0X.,n,hangup

To make this work you need to reload the configs on the asterisk cli:

  asterisk -rx "reload"

No you need to setup these paramters at berofix as well, and you should be able to make basic calls.

Setup SIP/ISDN and Routing in beroFix:

beroFix can be completely configured by your webbrowser. So simply browse to berofix, by entering:  

in your webbroswer. Now log in with "admin:admin". You will see a Web GUI with The major Points:

  • ISDN Hardware - modify hardware related Settings (NT/TE, PTP)
  • ISDN - group Ports together
  • SIP - manage SIP Server registrations
  • Dialplan - manage routing

In the first step you should put your isdn ports into groups. In the most simple scenario you can put your 4BRI Ports together in one group named "BRI".

Then create a SIP Server entry, which gets the name "asterisk" Serveraddress: "", User "berofix", Secret "berofix" Type "proxy" and default "enabled".

Finally you need 2 dialplan entries, one for "SIP-ISDN" and one for "ISDN-SIP".


From ID: "(.*)" To ID: "g:BRI" Destination: "(.*)" New Destinatoin: "\1" Source: "(.*)" New Source: "\1" Configuration: ""

As you can see, berofix understands regular Expressions Patterns. The Setting above means that every SIP Call is directly routed to the "BRI" group, the dialed number and the callerid are transported transparently.


From ID: "g:BRI" To ID: "g:asterisk" Destination: "(.*)" New Destinatoin: "\1" Source: "(.*)" New Source: "\1" Configuration: ""

This setup means that every ISDN Call coming from the ISDN Ports of the "BRI" group are routed to Asterisk.

As last step you need to activate the configuration. Do this by clicking on the "activate" icon.

Setting up a Bridge on other OS than debian

Open Suse

Howto setup a bridge on Suse: