BeroNet Gateway with Snom One
This small Howto should show you, how to connect a berofix Gateway to a Snom One PBX. In this Howto we have installed a Snom One PBX on a Server, and added two extensions (100 and 101) to it. The Snom One is connected to a berofix Gateway which is connected to the PSTN Network through 2 ISDN BRI interfaces. The local Fax machine is directly connected to an analog FXS Port of the berofix Gateway. The next figure will give you an overview about this scenario:
First of all we have to login to the Snom One PBX as Admistrator. By default the usenrame is admin and the password is empty. Under the menupoint 'Trunks' we have to add a new SIP Trunk to the berofix
Create a SIP Trunk
The first step to configure to above mentioned example is to configure the SIP trunk. Before we are adding a new SIP Trunk we have to set the transport layer. The snom one provides 3 option for that udp / tcp / tls. We recommend to use udp. Go to the menu point 'Settings->PNP' and change Transport layer to udp as you can see in the next figure:
After that go ahead and add a new Trunk with the following values as you can see in the next figure:
Name: berofix (the name of this new created Trunk) Type: SIP Proxy (this makes most sense in our example) Direction: Inbound and outbound ( of course we want to allow both directions) Trunk destination: Generic SIP Server State: Enable
In the next block of the Trunk settings (as you can see in the next figure), you only need to enter a value for 'Proxy Address' and choose the right 'Codec Preference'.
Account: no proxy authentification required, thatfor it can be left empty Username: no proxy authentification required, thatfor it can be left empty Proxy Address: 172.20.10.206 (this should be the IP-address of the berofix gateway) Codec Preference: G.711A (in local area networks we normaly have no bandwith issues. Thatfor we recomend to use G.711A only)
The rest of the values on this site can be left as they are by default, except these ones:
Trunk requires out of band-DTMF tones: yes (we prefer to transmit DTMF tones out of band) Remote Party/Privacy Indication: RFC3325 P-Asserted-Identity (with this setting we are able to choose if we want to hide the CallerID) Send call to extension: will be desribed later
Note: in case you are using snom ONE Versions greater than Alpha_Monocerotids(2011-126.96.36.1996), please set:
Remote Party/Privacy Indication: Custom Header After you set this you will notice a new list of header options. Under To: please choose "Same as request-URI"
After configuring the SIP Trunk we have to setup a outbound dialplan rules. Go to the menupoint Dialplan and add a new row in the Standard Dialplan as you can see in the next figure:
The second row in the above grid is the general outbound rule for all outbound calls. All calls starting with the prefix "0" will be routed to the berofix Gateway. The prefix "0" will be removed before routing the call to the berofix gateway. For instance if you dial 00176242... the rule would send this call to the berofix Gateway with 0176242...
Inbound rules on the snom one are more complex, and there are two ways how you can configure them. Once the SIP-Trunk has been identified and the inbound call is trusted, the system must determine where the call should be routed. The system first looks at the trunk’s Send call to extension setting. If nothing was set in the trunk’s Send call to extension setting, the system must go to the individual extensions to determine whether the called number is associated with any account. These two methods will be explained in the following.
The easiest way to create inbound rules is by adding an external DID two an account. Under the menu point Accounts use the field Account Numbers. For instance if you want to assign the external DID 259389-100 to the the Account 100, just add the DID to the field Account Number(s) separated by a space as you can see in the next figure.
The same appliesto the Account 101 which should be assigned to DID 259389-101. This method of attaching a DID to an extension is a viable routing method only when the number of DIDs is small (e.g., four up to ten DIDs). When a large number of DIDs are involved, using regular expressions in the trunk’s Send call to extension field is a better approach.
!!! NOTEThis methods only work if nothing was set in the trunk's Send Call to extension.
2.Trunk Send Call to extension
Assigning a large number of DIDs to individual extension accounts, however, is cumbersome and can be expedited through the use of regular expressions. Under the menu point Trunk Send call to extension you can enter a regular expressions to define a inbound rule. For instance if we have DID's from 259389-100 to 999, which should be routed to the Accounts in the range from 100-999. The regular expression would would look like
as you can see in the next figure. The '!' is the delimiter of the regular Expression. The first field is the 'Pattern' ((259389)(.*) of the string which defines the numbers that the system will use when searching for a match. The second field is the 'Replacement' (\2) tells the system which expression to use when dialing. The third field is the 'Request URI' (To Header flag). This flag tells the system where to look for the dialed number. In combination with the berofix you should use the 't' flag to tell the system to look in the 'To header' for the dialed number. Last field is the default extension 100, so if the trunk is unable to find an extension using the replacement field, extension 100 will be called.
In this example all inbound calls beginning with 259389XXX will be routed to Accounts XXX, otherwise if no match is found they will be routed to Account 100. A more detailed description on how to use the Trunk 'Send to Extension' can be found in the Snom one User manual.
Configure the berofix gateway
In our example the berofix gateway has the IP address 172.20.0.104. Open your favourite web browser and login to the berofix gateway (default user/password is admin/admin). If you haven't done any configurations on the berofix gateway, a green "Easy Configuration Wizard" will appear on the screen as you can see in the next figure. If you don't see this button you have to go to the menu point Management+-> Reboot/Reset, where you will find the Wizard. This Wizard will guide you to the rest of the configuration.
1.Choose your scenario
The 'Easy Configuration wizard will first ask for the scenario, where you have 3 option. In our case the scenario Gateway will most fit to our example, so we are going to choose this.
In the next step the wizard would ask for the SIP credentials as you can see in the next figure.
Name: Snomone -name of this SIP account. You can choose any name in our case we set this to SnomOne Server Address:172.20.10.206 -the IP address of the server running the snom one PBX User: snomone -the authentication username Secret: snomone -the authentication password
Depending on the modul configuration you have to choose your outgoing PSTN technology. This could be
PRI -primary rate interface (E1 / S2M) BRI -basic rate interface (S0 / ISDN) FXO -foreign exchange office (to connect to analog lines) FXS -foreign exchange station (to connect analog phones) GSM -to connect to GSM networks
In our example we want to connect BRI Port 1 and 2 to an ISDN provider. We choose BRI as the technology and create a group including port 1,2 and use 'TE_PORTS' as 'Group Name' as you can see in the next figure.
The last page of the wizard would show you a summary of all settings. After validating the settings press 'Finish' to confirm them. After that the berofix gateway will do a reboot.
Note:Using the Wizard will overwrite all previous settings.
After rebooting the berofix Gatewaay the system should be in a operational state. You should be able to make inbound and outbound calls. The next step would be to creating a PSTN to Analog redirection for our Faxmachine as describe in the beginning of this howto. Fax device oder analog modem are very Audio sensitive devices, and we always recommend to redirect such kind of Calls directly on the berofix devicce. To do so we first have to configure the analog port where our fax machine is connected. Got to the menu point 'PSTN+->Analog FXS ports' and create a analog port group including port 1 and name it FAX as you can see in the next figure:
After we have configured the analog Port group for our Fax device, we need to configure two dialplan entries for outbound and inbound dialing. Go to the menu point dialplan and add 2 rules with the following settings:
1.Outbound Rule all calls from the analog fax machine should be routed to the ISDN Port Group g:TE_PORTS Direction: Analog->ISDN From ID: g:Fax -origination of the call. In our case the analog Port Group g:Fax To ID: g:TE_PORTS -to where the call should be routed. In our case the ISDN Port Group g:TE_PORTS Destination: (.*) -mathing criteria for CalledID/DAD. (.*) everything will match New Destination: \1 -CalledID/DAD replacement. (.*) and \1 will transparent route the CalledID without modification Source: (.*) -see Destination New Source: \1 -see Destination
2.Inbound Rule all calls from ISDN with the number 259389-119 should be routed to the Fax machine directly Direction: ISDN->ANALOG From ID: g:TE_PORTS -origination of the call. In our case the ISDN Port Group g:TE_PORTS To ID: g:Fax -where the call should be routed. In our case the Analog Port Group g:Fax Destination: (259389119) -mathing criteria for CalledID/DAD. All calls with CalledID/DAD(259389119) will match New Destination: \1 -CalledID/DAD replacement. (259389119) and \1 will transparent route the CalledID without modification Source: (.*) -see above New Source: \1 -see above
As you can see in the next figure we have added this two dialplan entries. The dialplan will look for a match from the top to the button. So please change the priority of the new rules according to the figure.
After you have confirmed your settings by pressing the activate button, you should be able to make test calls for the Fax redirection.
With the above described configurations you should be able to make outbound and inbound calls. To get the best interop between the Snome one and the berofix Gateway some more detailed configuration are required.
-Hidden CallerID for Outbound Calls
The Snom one provides a feature to hide the CallerID for outbound calls. You can do this by pressing the following buttons on your Snom Phone
Settings->3.Identity->2.Call Features->2.Outgoing Calls->4.Hide own outgoing ID.
When you make a outbound call with 'Hide own outgoing ID' set to 'yes', the berofix gateway should hide the CallerID on the ISDN side. To use this feature we have to change the CallerID transmission on the berofix gateway. On the berofix WebGUI go to the menu point SIP+ and choose the SIP entry for the snomone and then set the following values.
1.Dialplan Source: if your snom ONE version is older than 4.5 (Alpha Monocerotids) set this to pai_user, otherwise set this to from_user 2.Additional configuration options: use_privacy_header=1 3.CLIR on OAD: Anonymous
-Hidden CallerID for Inbound Calls
Maybe you have already noticed it, that when you get inbound Calls from the berofix gateway with hidden CallerID you will see the domain name like pbx.beronet.com. To avoid that we have to set 'CLIR_ON_OAD' to for instance 'Anonymous'. On the berofix WebGUI go to the menu point PSTN+ and select the ISDN Port Group 'TE_Ports'. In the advanced option you will find the option CLIR_ON_OAD as you can see in the next figure: