Difference between revisions of "Documentation"

From berofix - professional SIP gateway
Jump to: navigation, search
(Configuring berofix via Web-interface)
(Dialplan entry examples)
Line 435: Line 435:
 
This settings has the highest priority and will overwrite all settings that have been set in the SIP- or in the ISDN-Group sections.
 
This settings has the highest priority and will overwrite all settings that have been set in the SIP- or in the ISDN-Group sections.
 
===Dialplan entry examples===
 
===Dialplan entry examples===
 +
 +
The best way to explain how to handle berofix dialpans is to make some  examples.
 +
<br><br>
 +
====Example1: Incoming call from SIP with the following settings====
 +
 +
SourceIP:    172.20.0.1
 +
CallerID:    2593890
 +
CalledID:    025938912.
 +
<br><br>
 +
Dialplan entry values:
 +
 +
Direction:          “SIP->ISDN”
 +
FromID:            “(.*)”    will match any IP-Address from where the call is coming
 +
ToID:              “(g:te)”    will go to ISDNPort-Group g:te
 +
Destination:        “0(.*)”    will match all numbers starting with 0
 +
New Destination:    “\1 “    \1 is the parameter 1 (\1 the value in the first parenthesizes of Destination
 +
Source:            “(.*)”    will match any CallerID
 +
New Source:        “\1 “    \1 is the value in the first parenthesizes of Source
 +
 +
With this settings the the “Call” will be routed to ISDNPort Group “g:te”. The CalledID will be changed to 25938912, that means the first 0 will be stripped and the CallerID is still 2593890.
 +
 +
====Example2: Incoming call from SIP with the following settings====
 +
 +
SourceIP:    172.20.0.1
 +
CallerID:    12
 +
CalledID:    0176242XXXXX.
 +
<br><br>
 +
Dialplan entry values:
 +
 +
Direction:        “SIP->ISDN”
 +
FromID:            “172.20.0.1”  will match only this source IP-Address
 +
ToID:              “1”          will go to ISDNPort 1
 +
Destination:      “0176(.*)”    will match all numbers starting with 0176
 +
New Destination:  “0049176\1”  will cut 0176 from CalledID and add 0049176 to the CalledID followed by add the parameter 1 (\1 the value of the first parenthesizes in Destination
 +
Source:            “(..)”        will match Caller IDs with 2 Characters
 +
New Source:        “25938912”    will overwrite the CallerID with this value
 +
 +
With this settings the the “Call” will be routed to ISDNPort 1”. The CalledID will be modified to 0049176XXXXX. The CallerID will be changed to 25938912.
 +
 +
 +
====Example3: Incoming call from ISDN with the following settings====
 +
 +
ISDNPort:    g:teports
 +
CallerID:    25938912
 +
CalledID:    0176242XXXX
 +
 +
Dialplan entry values:
 +
 +
Direction:        “ISDN->SIP”
 +
FromID:            ”g:teports”          will match only this ISDNPort-Group
 +
ToID:              “p:mysipserver”      will go to SIP Proxy mysipservedr
 +
Destination:      ”259389([0-9][0-9])”  will match all numbers starting with 259389 followed by 2 digits in the range from [0-9]
 +
New Destination:  “\1”                  will cut 259389 from CalledID and add the 2 digits (\1 the value in the first parenthesizes)
 +
Source            “(.*)”                will match any CallerID
 +
New Source:        “\1 “                \1 is the value in the first parenthesizes of  Source
 +
 +
With this settings the the “Call” will be routed to SIP Proxy p:mysipserver. The CalledID will be changed to 12. The CallerID is untouched
 +
 +
====Example4: Incoming call from ISDN with the following settings====
 +
 +
ISDNPort:    1
 +
CallerID:    12
 +
CalledID:    02593890
 +
 +
Dialplan entry values:
 +
 +
Direction:        “ISDN->SIP”
 +
FromID:            ”1”                will match only this ISDNPort-Group
 +
ToID:              “p:mysipserver”    will go to SIP Proxy mysipservedr
 +
Destination:      ”0([2-9])(.*))”    will match all numbers starting with 0. The second digit has to be in range[2-9] followed by the any characters
 +
New Destination:  “\1\2”            will cut 0 from CalledID and add the parameter 1 (\1 the value in the first parenthesizes) followed by parameter 2 (\2 the value in the second parenthesizes)
 +
Source            “(.*)”            will match any CallerID
 +
New Source:        “\1 “              \1 is the value in the first parenthesizes of Source
 +
 +
With this settings the the “Call” will be routed to SIP Proxy p:mysipserver. The CalledID will be changed to 2593890. The CallerID is untouched. With the above examples you should be able to handle almost every situation in the real world. If this is not enough and you need some special things, feel free to implement more complex Regular Expressions. For each Dialplan entry you can also set the special features like enable Echocanceler or turn on T.38. More informations  about this can be found in section 3.3.2 SIP-Options and 3.4.1 ISDN Options.
 +
 
==SIP==
 
==SIP==
 
===SIP Settings Overview===
 
===SIP Settings Overview===

Revision as of 13:29, 24 June 2009

The berofix card overview

The following picture show you the schema of the berofix-baseboards.

Bf ansicht.png
Each Lineinterface socket has access to 2 slots. Slot 1 & 2 are applied to Lineinterface 0, while slot 3 & 4 applies to Lineinterface 1. Depending on the Lineinterface you are using, different slots with different Pin Out's are used.

The bf4S0 4 Port BRI module


The bf4S0 Lineinterface is a 4 Port BRI module. The bf4S0 Lineinterface can be configured individually for each port to NT (Network Termination) or TE (Terminal Equipment) mode. In either modes the module supports Point-To-Multi-Point (PMP) or Point-To-Point (PTP). The TE/NT mode as well as the Line termination of 100 ohms are selectable via software (Jumperfree). If you use a bf4S0 connected on Lineinterface socket 0 and use a bf4S0Bridge on Lineinterface socket 1, the 4 BRI Ports are lead through Slot 1-4 according to picture 2.

Bf ansicht lf.png
If you want to use two bf4S0 modules to get a 8 Port BRI card, you have to plug the first bf4S0module on Lineinterface socket 0 and the second one on Lineinterface socket 1, then the 8 BRI are lead through Slot 1,2,3,4 on a different way as described in picture 3.

Bf ansicht lf2.png
As you can see, on each slot two ports are connected. To help you connect your ISDN Lines in this special scenario we have the optional available external dongles “, the BNTAdapters” which can be used. If you use a bf4S0 modules without the above mentioned BF4S0Bridge (picture2) the Pin-Out is similar according to picture 3.

The bfXE1 1-2 Port PRI module


The bfXE1 PRI module are available as 1 Port BF1E1 or as 2 Port BF2E1 LineInterfaces. The bfXE1 module can be configured individually for each port to NT (Network Termination) or TE (Terminal Equipment) mode. The default Pin-Out of this module is always TE mode with PINS 1,2,4,5. If you want to use NT-mode you may need a cross cable which is optional available (the bnE1Crosscable). Line termination (120/75 ohms) is selectable for each port by DIP switches on the Lineinterface. The following example will show you the Slot and Pin-Out's when you plug a BN2E1 module on Lineinterface socket 0 and a BF1E1 module on Lineinterface socket 1.

Bf ansicht lf pri.png
As you can see, the bf2E1 connected on Lineinterface socket 0, lead out through Slot 1 and 2, while the bf1E1 connected on Lineinterface socket 1 uses Slot3. The next example will show you the Slot usage as well as the Pin-Out's, when you use a bf1E1 mixed with a bf4S0 Lineinterface.

Bf ansicht lf2 pri.png
In any combination of PRI LineInterfaces with BRI LineInterfaces, please always plug the PRI LineInterfaces on Lineinterface socket 0.

The bfXGSM 1-2 Port GSM module


The BFXGSM GSM module will be available as 1 Port BF1GSM or as 2 Port BF2GSM. Digital Audio quality with noise suppression and echo canceling is granted by the use of Quadband Siemens GSM Modules (850/900/1800/1900 Mhz). These LineInterfaces will be available during Q4 2009.

Install


The next chapters will describe you the basic steps to bring your new berofix card into your network, and how to configure it, that you can make SIP to ISDN calls and vice versa.

Identifying berofix cards


As mentioned in chapter 1. berofix uses a Realtek PCI/PCIe Network Chip to communicate with the Host PC. Which means that the berofix looks like a network card, when you put it into a PC.
berofix uses MAC addresses beginning with 00:50:C2.
It looks like a network card and you don't have to compile or load any additional driver except of the network card driver (8139too for berofix PCI and R8169 for PCIexpress on Linux based systems). This should normally be done automatic from your Operating System. To make it more clear the network environment looks like:

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

The following examples will show you how you can identify your berofix card in your system.

Linux

Output from lspci for berofix PCI card:

berofix#lspci
0000:03:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

Output from ifconfig:

 berofix#ifconfig
 eth1    Link encap:Ethernet  HWaddr 00:50:C2:83:D0:04  
         inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:12920014 errors:0 dropped:0 overruns:0 frame:0
         TX packets:11879494 errors:0 dropped:0 overruns:24 carrier:0
         collisions:0 txqueuelen:1000 
         RX bytes:2864269597 (2731.5 Mb)  TX bytes:2590970576 (2470.9 Mb)
         Interrupt:18 Base address:0x2000


Windows

If you plugged in berofix and Windows has booted, please open the device manager and go to the network adapter secion:

Bf win deviemanager.png
If you can see one or more Realtek RTL-8139-Family (or RTL-8136-Family (RTL8101E) for PCI express) NIC's your OS has installed drivers automaticly. If you don't see a Realtek 8139 NIC please refer to Realtek's driver site
To identify berofix card please open a Windows console (cmd.exe) and type:

C:\Dokumente und Einstellungen\Administrator>ipconfig -all

Windows-IP-Konfiguration 

   Hostname  . . . . . . . . . . . . : test-li3hfoglbs
   Primäres DNS-Suffix . . . . . . . :
   Knotentyp . . . . . . . . . . . . : Hybrid
   IP-Routing aktiviert  . . . . . . : Nein
   WINS-Proxy aktiviert  . . . . . . : Nein
   DNS-Suffixsuchliste . . . . . . . : beronetoffice.local

Ethernet-Adapter LAN-Verbindung 2: 

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung  . . . . . . . . . . : Realtek RTL8139-Familie-PCI-Fast Ethernet-NIC #2
   Physikalische Adresse . . . . . . : 00-50-C2-83-D0-00
   DHCP aktiviert  . . . . . . . . . : Nein
   IP-Adresse. . . . . . . . . . . . : 172.20.70.10
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Standardgateway . . . . . . . . . :
 
Ethernet-Adapter LAN-Verbindung:

   Verbindungsspezifisches DNS-Suffix: beronetoffice.local
   Beschreibung  . . . . . . . . . . : Realtek RTL8139-Familie-PCI-Fast Ethernet-NIC
   Physikalische Adresse . . . . . . : 00-0B-6A-EE-E7-4F
   DHCP aktiviert  . . . . . . . . . : Ja
   Autokonfiguration aktiviert . . . : Ja
   IP-Adresse. . . . . . . . . . . . : 172.20.5.75
   Subnetzmaske  . . . . . . . . . . : 255.255.0.0
   Standardgateway . . . . . . . . . : 172.20.0.1
   DHCP-Server . . . . . . . . . . . : 172.20.0.1
   DNS-Server  . . . . . . . . . . . : 172.20.0.11
                                       172.20.0.1
   Primärer WINS-Server  . . . . . . : 172.20.0.11
   Lease erhalten  . . . . . . . . . : Montag, 15. Juni 2009 11:58:46
   Lease läuft ab  . . . . . . . . . : Montag, 15. Juni 2009 23:58:46

Network configuration

To bring the system up and running the only thing you have to do, is to give berofix an ip-address. That is almost all you have to do before you can work with the berofix card. For several reasons, especially for SIP re-invites, which is a must for T.38, it might make sense to advance your network settings so that berofix is reachable from the network too.
There are 2 common ways how to handle this.

  • Ethernet Bridge (the recommended way)
  • IP-Forwarding with a Static Route

These methods will be described in the next chapters more detailed. We recommend to use a the bridge setup, since this makes the easiest setup and allows the most flexibility. It is also possible to use bridges on other operating systems than Linux.
Attention!: If you want using another IP-Adresses for berofix as 10.0.0.1 and 10.0.0.2, please change the berofix internal address (10.0.0.2) first through Webgui or bfDetect-Tool. Otherwise you will not have access anymore to the internal device if you change the NIC address first.

Setup Network using ip-forwarding

Linux

Before we will explain how to setup ip-forwarding we have to give our berofix card an ip-address. As described above we will use ifconfig to check our network settings.

beropbx:#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:127.0.0.1  Mask:255.0.0.0
            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 eth0 is our NIC from our PC and eth1 is the NIC from the berofix. The internal default IP-address of berofix is 10.0.0.2. So if we give eth1 an ip-address like 10.0.0.1 we will have access to the berofix. This can be done i.e. via ifconfig like described in the following example:

berofix:#ifconfig eth1 10.0.0.1 up

To check if this is working try to ping 10.0.0.2

berofix:#ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=63 time=12.2 ms

By default any modern Linux distributions will have ip-forwarding disabled. This is normally a good idea, as most peoples will not need ip-forwarding, but we will need to enable ip-forwarding to support SIP reinvites.
Check if IP Forwarding is enabled: We have to query the sysctl kernel value net.ipv4.ip_forward to see if ip-forwarding is enabled or not. Using sysctl:

sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0

or just checking out the value in the /proc system:

cat /proc/sys/net/ipv4/ip_forward

As we can see in both the above examples this was disabled (as show by the value 0). Enable IP-Forwarding on the fly As with any sysctl kernel parameters we can change the value of net.ipv4.ip_forward on the fly (without rebooting the system):

sysctl -w net.ipv4.ip_forward=1

or

echo 1 > /proc/sys/net/ipv4/ip_forward

the setting is changed instantly; the result will not be preserved after rebooting the system.
Permanent setting using /etc/sysctl.conf If we want to make this configuration permanent the best way to do it is using the file /etc/sysctl.conf where we can add the following Line in /etc/sysctl.conf.

net.ipv4.ip_forward = 1

If you already have an entry net.ipv4.ip_forward with the value 0 you can change that to "1". To enable the changes it is necessary to run the command:

sysctl -p /etc/sysctl.conf

On Red Hat based systems this is also enabled when restarting the network service:

service network restart

And on Debian/Ubuntu systems this can be also done restarting the procps service:

/etc/init.d/procps.sh restart

To make berofix accessable for other devices in your LAN you have to setup a route either by adding a static route in your router or just change the standard gateway of the device from where you want to reach berofix:

route  add 10.0.0.2 <ip-eth0-of-berofix-host>

or change standard gateway

route add default gw <ip-eth0-of-berofix-host>

If everything was successfully setup you can try to login to the berofix using your favorite Web browser by typing the following URL with default username=admin and password admin:

http://10.0.0.2/


Bf webgui login.png

Windows

Before we will explain how to setup ip-forwarding we have to give our berofix card an ip-address. As described above we will use ipconfig to check our network settings:

C:\Dokumente und Einstellungen\Administrator>ipconfig -all

Windows-IP-Konfiguration 

   Hostname  . . . . . . . . . . . . : test-li3hfoglbs
   Primäres DNS-Suffix . . . . . . . :
   Knotentyp . . . . . . . . . . . . : Hybrid
   IP-Routing aktiviert  . . . . . . : Nein
   WINS-Proxy aktiviert  . . . . . . : Nein
   DNS-Suffixsuchliste . . . . . . . : beronetoffice.local

Ethernet-Adapter LAN-Verbindung 2: 

   Verbindungsspezifisches DNS-Suffix:
   Beschreibung  . . . . . . . . . . : Realtek RTL8139-Familie-PCI-Fast Ethernet-NIC #2
   Physikalische Adresse . . . . . . : 00-50-C2-83-D0-00
   DHCP aktiviert  . . . . . . . . . : Nein
   IP-Adresse. . . . . . . . . . . . : 10.0.0.1
   Subnetzmaske  . . . . . . . . . . : 255.0.0.0
   Standardgateway . . . . . . . . . :
 
Ethernet-Adapter LAN-Verbindung:

   Verbindungsspezifisches DNS-Suffix: beronetoffice.local
   Beschreibung  . . . . . . . . . . : Realtek RTL8139-Familie-PCI-Fast Ethernet-NIC
   Physikalische Adresse . . . . . . : 00-0B-6A-EE-E7-4F
   DHCP aktiviert  . . . . . . . . . : Ja
   Autokonfiguration aktiviert . . . : Ja
   IP-Adresse. . . . . . . . . . . . : 172.20.5.75
   Subnetzmaske  . . . . . . . . . . : 255.255.0.0
   Standardgateway . . . . . . . . . : 172.20.0.1
   DHCP-Server . . . . . . . . . . . : 172.20.0.1
   DNS-Server  . . . . . . . . . . . : 172.20.0.11
                                       172.20.0.1
   Primärer WINS-Server  . . . . . . : 172.20.0.11
   Lease erhalten  . . . . . . . . . : Montag, 15. Juni 2009 11:58:46
   Lease läuft ab  . . . . . . . . . : Montag, 15. Juni 2009 23:58:46

To give berofix an ip-adress go to "Control Panel" and open the "Network connectinos". Double klick the icon for the berofix networkadapter "LAN-Verbindung 2" (Realtek RTL8139-Familie-PCI-Fast Ethernet-NIC #2). Now press the "Preferences" button:

Bf winconf nicprefs.png

The Preferences window appears:

Bf winconf nicprefs2.png

Double klick to "Internetprotocol" and the IP-Konfiguration dialog will apear:

Bf winconf nicprefs3.png

Now you can give berofix an IP-Adresse like "10.0.0.1" and klick "OK". After the network has been restarted you can open a cmd and enter:

ping 10.0.0.2



Bf winconf pingberofix.png

berofix is now reachable from the host. To enable Windows IP-Forwarding please enter the folowing in the cmd console:

regedit



The RegEdit32-Tool apears.

Bf winconf anable ipfwrd.png

To enable IP-Forwarding please go to "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\ Parameters" and change the entry "IPEnableRouter" (Type REG_DWORD) and change it to "1".
After that you can reach berofix if your origin system has a corresponding route. For example if you want to reach berofix from a second Windows System in your Network you have to set a static route:

route add 10.0.0.2 <ip-eth0-of-berofix-host>

Or you can set the standard gateway to the berofix-host:

route add 0.0.0.0 mask 0.0.0.0 <ip-eth0-of-berofix-host>

If you want to make setting persistent please give the "-p" parameter to the route tool.
Now you can login to berofix via:

http://10.0.0.2

Bf webgui login.png

Setup Network bridge

Linux

You can setup the bridge under Linux with the "brctl" utility. This utility is provided by the "bridge-utils" package on debian based systems (like Ubuntu). As mentioned above the berofix cards have MAC Addresses beginning with "00:50:c2", so you can identify these cards with "ifconfig -a" as described in the next example:

beropbx:#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:127.0.0.1  Mask:255.0.0.0
             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 and eth0 is our interface to the LAN. We want to apply our LAN interface the ip-address 192.168.0.2 and our berofix device the ip-address 192.168.0.3. After we setup the Bridge we want to access the berofix device from all devices in our LAN which are all in the network 192.168.0.1-254. To setup this bridge, you need to enter a few commands like in the following example:


berofix:# ifconfig eth0 0.0.0.0 up
berofix:# ifconfig eth1 0.0.0.0 up
berofix:# brctl addbr br0
berofix:# brctl addif br0 eth0
berofix:# brctl addif br0 eth1
berofix:#ifconfig br0 192.168..0.2 up 
  

These commands will first remove the ip-addresses from your network cards, then will create the bridge and add your network card and the berofix card to this bridge. In this case the bridge gets the IP-address 192.168.0.2. The default IP of the berofix is 10.0.0.2 with the subnet 255.0.0.0 and we have to change this with the bfdetect tool to 192.168.0.3 with 255.255.255.
To setup this bridge in a persistent way, you can modify your "/etc/network/interfaces" file on debian based systems (like ubuntu):

auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0 eth1

Then you can restart your networking with:

berofix:#/etc/init.d/networking restart

Now you should be able to communicate with the berofix using the bridge. Your PC with the ip-address 192.168.0.2 and the berofix with the ip-address 192.168.0.3 should be reachable from all device of your LAN. That means the berofix can directly accessed from any device of your LAN to make sure that SIP reinvites works like expected. Try to check this by simply using a web browser and browse to the IP of the berofix, is this example just simply enter:

http://192.168.0.3  

You will be prompted to enter a username and password, which is by default user:"admin" password:"admin".

Windows

To bridge your Host NIC with berofix please opne "network connections". You will see two Connections, your Host NIC ("LAN-Verbindung 1") and berofix ("LAN-Verbindung 2"). To bridge these both connection please mark them and klick the right mouse button. The Context menu apears:

Bf winconf bridge1.png

Klick on "Bridge connections" and a third connection apears: The network bridge

Bf winconf bridge2.png

Now both connections don't have an IP-Adress anymore. By default the Bridge try to get an IP-Adress by DHCP. If you don't have DHCP-Server, please mark the Bridge klick the right mouse button, choose "Preferences" and configure an IP-Adress of your choice. In the moment the bridge is reachable through the LAN you can also reach the internal berofix device. For example:
Let's assume your LAN is 172.20.0.0/255.255.0.0, your bridge got an IP 172.20.5.194 and you configured berofix internal IP address to 172.20.70.11. Through the configured bridge, berofix is reachable from the whole network now, except your firewall is blocking it!

Detecting berofix with bfdetect tool

With bfetect tool you can detect any berofix device in your network and modfiy several settings like changing the ip-address, change the password or reset the device to factory settings. It is also a recommended tool if you forgot the ip address of the internal network device.
The bfdetect tool can be downloaded from our Website:

For Linux:

http://www.beronet.com/downloads/berofix/bfdetect.tar.gz


For Windows:

http://www.beronet.com/downloads/berofix/bfdetect_win_x86.zip


Simply untar/unzip the file somewhere and if you are ruinning Linux, you have to compile it like in the next example:

beropbx:#tar xzf bfdetect.tar.gz
beropbx:#cd bfdetect
beropbx:#make install (In case don't forget to change permission of the file to be executable)

In case you are using Windows, you got already a compiled version for Windows, and you can just follow the next steps.

The bfdetect sends out broadcast UDP Packets to the default network adapter, with this method it is possible to detect and configure berofix cards which have different IP Addresses than the IP Address of the host. If you don't set up a network bridge, berofix is normally not your standard nic to your network. For sending broadcast to a internal berofix device you have to tell bfdetect tool trough which nic this have to be done. For that you can give the ip address of berofix host device as parameter (For example 10.0.0.1)

beropbx:#bfdetect 10.0.0.1
Scanning network for bero*fix devices...

[1] mac:00:00:24:CA:D8:98 ip:10.0.0.2

If you have more then one device select the one you want to configure by typing the number. You'll get a menu with all the options you can set like shown in the following output:

Select a device: 1

Configuration of selected device:

 mac: 00:50:C2:83:D0:56
 ip: 10.0.0.2
 netmask: 255.0.0.0
 gateway: 10.0.0.1
 dhcp: no

 [i] change ip
 [n] change netmask
 [g] change gateway
 [d] switch dhcp on
 [s] save and quit
 [q] quit

What would you like to do? 

If you want to change the ip address, don't forget to set even the ip mask and the default gw. If you have finished the configuration chosse "s" for "save and quit". After that berofix will be reachable through the new setting immediately.

Configuring berofix via Web-interface

If you have successfully setup the network like described in chapter 1 you can completely configure the berofix card via the web interface. Simply enter the IP-address of the berofix in your favorite browser, for instance:

http://10.0.0.2

The default login username and password for the berofix is:

username: admin password: admin

After you have successfully logged in to the system you will see the following major menu-points

  • Dialplan (to manage the Dialplan)
  • SIP (to manage SIP related stuff like registrations and proxy's)
  • ISDN (to manage ISDN related stuff like ISDN-groups and ISDN-settings)
  • Hardware (to modify hardware related settings like NT/TE, PTP/PMP)
  • Preferences (to manage Network Setting, Firmware updates and Logging)
  • Management (to check the state of the system or enabled Debugging)

Bf webconfig state.png

All functions and menu-points to configure the berofix through the web interface will be described in the following chapters.

Activating changes

After you have change some values through the web-interface a small button in the top of the web-interface will appear. To activate this changes you have to press the “activate” button. The button will appear in three colors which have the following meanings:

Bf webconfig activate1.png

  • Yellow means only a reload of the system. You can press the “activate” button every time it appears. No influence to the current calls on the system.
  • Orange means that the ISGW (ISDN-SIP-Gateway a peace of software) has to be restartet. That means that all current calls are going to be dropped when you press the “activate” button.
  • Red means that the ISGW and all LineInterfaces has to be restarted. That means that all current calls are going to be dropped when you press the “activate” button. This restart can take up to 30sec..

Dialplan

The Dialplan is one of the most important things during the configuration of the berofix. Here you can define rules from where and to where a call should go as well as the configuration of special features like enabling T.38 or deactivating EC for a particular call.

The berofix dialplan engine is based on Regular Expressions and will read the dialplan entries from the top to the button and will exit, when it finds the first match. So be aware, if you have two possible matches, only the first one will be taken into account. That fore you have the position arrows on the right of the following picture, to change the priority. As shown in picture 9 you see the Dialplan entries grid, where you can add, modify, copy and delete a Dialplan entry as well as changing its position as mentioned above.

Bf webconfig dialplan1.png

The columns in the grid have the following meaning:

  • Column Direction: Shows you the direction from where the “Call” is originated and to where it is routed. For instance in the first row you see that the “Call” is originated from SIP and will be routed to ISDN. In the the second row it is vice versa.
  • Column FromID: Shows you from which ID the “Call” is originated. This could be the name of a SIP proxy, a SIP Registrar or just an IP-Address, if the “Call” is originated from SIP. If the “Call originated from ISDN the From ID could be a single ISDNPort or an ISDNPort-Group.
  • Column ToID: Shows you to which ID the “Call” is routed. This could be a single ISDNPort or a ISDNPort-Group, if the “Call” will be routed to ISDN. If the “Call” is routed to SIP the To ID is could be the name of a SIP proxy, a SIP Registrar or just an IP-Address.
  • Column Destination: shows you the original destination (CalledID or DAD) .
  • Column New Destination: show you the new modified destination (CalledID or DAD).
  • Column Source: show you the original CallerID (OAD)
  • Column New Source: show you the new modified CallerID (OAD)

Adding new Dialplan entry

You can add a new Dialplan entry by pressing the “add” button in the Dialplan overview. The following screen will appear:

Bf webconfig dialplanentry1.png

As mentioned above the Dialplan entries are based on Regular Expressions. In the next Chapter we will show you how to use Regular Expression with some examples. In the Direction field you have to choose the direction from where the call is originated and to where the call is routed. Possible values are SIP->ISDN or ISDN->SIP. After you choose the direction, the form will change its style. The meaning of From-ID and To-ID are depending on the direction you choose. In Direction SIP->ISDN the From-ID is a configured SIP-Proxy, a SIP Registrar or just an IP-Address, from where the call is originated. In this case the To-ID is a configured ISDNPort Group or just a single ISDN Port. If you choose the Direction ISDN->SIP the From-ID is the a configured ISDNPort Group or just a single ISDN Port, while the To-ID is just a SIP-Proxy, a SIP Registrar or just an IP-Address. The other values are already described in the previous Chapter. Behind the “more “ button you will find a bunch of values you could use for this specific Dialplan entry like disable/enable Echocanceler and much more like described in picture 11.

Bf webconfig dialplanentry2.png

This settings has the highest priority and will overwrite all settings that have been set in the SIP- or in the ISDN-Group sections.

Dialplan entry examples

The best way to explain how to handle berofix dialpans is to make some examples.

Example1: Incoming call from SIP with the following settings

SourceIP:    172.20.0.1
CallerID:    2593890
CalledID:    025938912.



Dialplan entry values:

Direction:          “SIP->ISDN”
FromID:             “(.*)”    will match any IP-Address from where the call is coming
ToID:               “(g:te)”    will go to ISDNPort-Group g:te
Destination:        “0(.*)”     will match all numbers starting with 0
New Destination:    “\1 “    \1 is the parameter 1 (\1 the value in the first parenthesizes of Destination
Source:             “(.*)”    will match any CallerID
New Source:         “\1 “    \1 is the value in the first parenthesizes of Source

With this settings the the “Call” will be routed to ISDNPort Group “g:te”. The CalledID will be changed to 25938912, that means the first 0 will be stripped and the CallerID is still 2593890.

Example2: Incoming call from SIP with the following settings

SourceIP:    172.20.0.1
CallerID:    12
CalledID:    0176242XXXXX.



Dialplan entry values:

Direction:         “SIP->ISDN”
FromID:            “172.20.0.1”  will match only this source IP-Address
ToID:              “1”           will go to ISDNPort 1
Destination:       “0176(.*)”    will match all numbers starting with 0176
New Destination:   “0049176\1”   will cut 0176 from CalledID and add 0049176 to the CalledID followed by add the parameter 1 (\1 the value of the first parenthesizes in Destination
Source:            “(..)”        will match Caller IDs with 2 Characters
New Source:        “25938912”    will overwrite the CallerID with this value

With this settings the the “Call” will be routed to ISDNPort 1”. The CalledID will be modified to 0049176XXXXX. The CallerID will be changed to 25938912.


Example3: Incoming call from ISDN with the following settings

ISDNPort:    g:teports
CallerID:    25938912
CalledID:    0176242XXXX

Dialplan entry values:

Direction:         “ISDN->SIP”
FromID:            ”g:teports”           will match only this ISDNPort-Group
ToID:              “p:mysipserver”       will go to SIP Proxy mysipservedr
Destination:       ”259389([0-9][0-9])”  will match all numbers starting with 259389 followed by 2 digits in the range from [0-9]
New Destination:   “\1”                  will cut 259389 from CalledID and add the 2 digits (\1 the value in the first parenthesizes)
Source             “(.*)”                will match any CallerID
New Source:        “\1 “                 \1 is the value in the first parenthesizes of  Source

With this settings the the “Call” will be routed to SIP Proxy p:mysipserver. The CalledID will be changed to 12. The CallerID is untouched

Example4: Incoming call from ISDN with the following settings

ISDNPort:    1
CallerID:    12
CalledID:    02593890 

Dialplan entry values:

Direction:         “ISDN->SIP”
FromID:            ”1”                will match only this ISDNPort-Group
ToID:              “p:mysipserver”    will go to SIP Proxy mysipservedr
Destination:       ”0([2-9])(.*))”    will match all numbers starting with 0. The second digit has to be in range[2-9] followed by the any characters
New Destination:   “\1\2”             will cut 0 from CalledID and add the parameter 1 (\1 the value in the first parenthesizes) followed by parameter 2 (\2 the value in the second parenthesizes)
Source             “(.*)”             will match any CallerID
New Source:        “\1 “              \1 is the value in the first parenthesizes of Source

With this settings the the “Call” will be routed to SIP Proxy p:mysipserver. The CalledID will be changed to 2593890. The CallerID is untouched. With the above examples you should be able to handle almost every situation in the real world. If this is not enough and you need some special things, feel free to implement more complex Regular Expressions. For each Dialplan entry you can also set the special features like enable Echocanceler or turn on T.38. More informations about this can be found in section 3.3.2 SIP-Options and 3.4.1 ISDN Options.

SIP

SIP Settings Overview

SIP-Options

SIP General Settings

ISDN

ISDN-Options

GSM

Hardware

Modify Hardware Settings

Preferences

Logging

Changing Password

Update Tool

Network settings

Backup and Restore

Management

State

Debug

Info

Reset

Reboot

Logout

The Telnet Interface

Examples with Asterisk

Support