Network in a Box

"Network in a Box" ("NIB") performs all the functions of a regular network. It implements Javascript script(s) for registering, routing calls, SMSs, and user authentication for YateBTS. The script(s) implement(s) a 'Network in a Box' for its users and will allow routing calls outside the network.

NIB contains the basic HLR/AuC and VLR/MSC functions of the 2G GSM network. The NIB mode is a standard feature of all YateBTS installations, but its use is optional.

In the future, a YateBTS unit in NIB mode may also be used as an HLR/Auc for YateBTS units in the same network.

Routing Calls
NIB can route calls as follows:
 * between 2 local registered users
 * from a local user to outside (outside call can be done on SIP/IAX). Account 'outbound' must be configured in accfile.conf
 * from outside network to local user
 * if outside call comes for unknown/unregistered user call will be rejected
 * local conference server. Users can reach conference room by calling to 333
 * to test ivr (david - 32843) that allows for an echo test or accessing the conference

SMS
NIB handles SMSs as follows:
 * SMSs are routed between registered users.
 * Bonus: Yate includes an ELIZA chat robot. Users can have SMS conversations with ELIZA if they send a text message to 35492.

Registration

 * You can define a list of accepted IMSIs or a regular expression for matching accepted IMSIs.
 * Starting in release 2.0 YateBTS NIB supports authentication via:
 * COMP128v1
 * Milenage
 * COMP128v3 (commercial release only)
 * For handsets that support 3G-style mutual authentication, the NIB will perform full mutual authentication.

USSD

 * You can define local USSD applications in Javascript. (Only in the commercial release.)

Web GUI for NIB Management
The NIB is configured and managed via a Web GUI. The GUI can be accessed via HTTP at: http://127.0.0.1/nib (only from the YateBTS server) or http://server_ip/nib

Starting with YateBTS 3 The interface can be accessed from other machines (not only localhost). If the machine is not in a secured network, it can be made accessible only from localhost by uncommenting the content of the .htaccess'''.

The functions of the Web GUI are the same as those described in Javascript_NIB, but presented in a graphical interface for ease of access.

The Web GUI has the following sections:
 * Subscribers contains: List Subscribers, Online Subscribers, Rejected IMSIs
 * List Subscribers
 * each IMSI can be inserted individually or
 * insert a regular expression to be used to match the subscribers IMSIs.
 * the configured data will be written in subscribers.js file.
 * Country code and SMSC -- configure country code where YateBTS is located. You can also configure the SMSC number, which is used when writing SIMs. While the SMSC is not required in the NIB mode, you will need to configure it when in Roaming mode.
 * Online Subscribers -- lists all the subscribers who are online.
 * Rejected IMSIs -- lists all the rejected subscribers.
 * Manage SIMs -- lists all the SIMs written using pySIM
 * BTS Configuration -- displays forms for each section from ybts.conf file that can be configured. After submitting the forms the section are written in the file.
 * Outgoing - configure outbound connection on IAX or SIP protocol with their specific parameters that will be written in accfile.conf

Installation and configuration
Requirements


 * YateBTS
 * PHP
 * Apache
 * pySIM

Setting up Web GUI

The YateBTS LabKit is delivered with an already installed Web GUI.
 * In case it needs to be installed manually, this can be done from packages or from sources with the make install command and then set up.

After installing, the sources of the Web GUI will be located in /usr/local/share/yate/nib_web.

Depending on your operating system the main web directory will be /var/www (for older Debian based systems) or /var/www/html otherwise. Note: If you don't have this path, then you need to install Apache server.

cd /var/www/html  (or cd /var/www on older Debian based OS) ln -s /usr/local/share/yate/nib_web nib


 * If you want to have access to the latest copy from the SVN, insert the following commands:

cd /usr/src svn co http://voip.null.ro/svn/yatebts/trunk/nib/web nib_web cd /var/www/html  (or cd /var/www on Debian older based OS) ln -s /usr/src/nib_web nib

Web GUI configuration

Before using the interface, the Web GUI must be given write right to Yate's configuration directory.

The command that has to be run as root is: chmod a+rw /etc/yate (If yatebts is installed from package.) or  chmod a+rw /usr/local/etc/yate/ (If yatebts is installed from sources.)

Failing to configure the right permissions will make the interface display some errors the first time when it's used.

If you still receive a message stating: Error!! Don't have r/w permission on /usr/local/etc/yate/. Please run this command as root: 'chmod -R a+rw /usr/local/etc/yate/' after running the chmod command, you probably have SELinux enabled. Disable it an try again.

BTS Configuration Management
This screen allows you to set the basic parameters of the GSM radio interface. The parameters here are the same ones given in ybts.conf.

After modifying this parameters, Yate is automatically restarted.



Subscriber Management
This page allows you to:
 * add and remove subscribers
 * manage security features for individual subscribers
 * assign telephone numbers

Adding and listing subscribers

Subscribers are accepted either by matching the IMSI against a configured regular expression or by individually configuring each acceptable IMSI.

Subscribers can be inserted individually from the link Add subscriber.

Regular expressions can be inserted from the link Accept by REGEXP.




 * Accept by REGEXP

Click on "Accept by REGEXP" to add regular expressions. They must be written without “/” at the beginning and end of the REGEXP.

Note: In the initial version the “/.../” were required. If you are unsure about how to set them check the example by pressing the question mark symbol ?

The “Modify” button will allow the editing of the existing regex and the button “Set subscribers” will display the form for adding Subscribers parameters. This is the same form as if the "Add subscriber" link was chosen instead of "Accept by REGEXP", as seen in the example below.

The form for adding a regular expression.



After inserting the regular expression and pressing “Save” button you will see the information below:




 * Set subscribers individually

Use the "Add subscriber" or “Set subscribers” to insert subscribers individually. By clicking on the question mark “?” each field in the form is described. The fields marked with the asterisk “*” are required.



After clicking on the "Save" button, the subscriber will be saved in subscribers.conf from Yate's configuration directory and the subscriber will appear in the Subscribers List as seen below.



Note: After Adding/Editing/Moving from REGEXP to individual subscribers/Moving to REGEXP from invidual subscribers Yate will be restarted.

Outgoing Call Route Management
This page allows you to specify a SIP or IAX connection for routing calls out of the local network to the rest of the world.

First, you need to select the protocol for the outbound connection from the drop-down list. This will generate the parameters that need to be configured. There are 2 types of parameters: and
 * basic parameters (that are displayed when the protocol is chosen)
 * advanced parameters (that are hidden and will be displayed if “Advanced” is clicked).

The “Save” button will save the configuration in accfile.conf. A typical example of setting up a SIP outbound connection will start with an outgoing form without any protocol selected.

Here is the SIP configuration page. After selecting the SIP protocol, the Basic parameters will be displayed:



Finally, after adding the connection data, click the "Save" button.



The "Modify" button permits editing the parameters.

The parameters controlled here are the same ones described in Outbound_connection.

The “Switch to IAX” button deletes the old configuration and permits the new outbound connection to be set.



If you click on “Yes”, the SIP outbound connection is deleted from accfile.conf file and the form for adding the IAX outbound connection is displayed:



Using NIB with YateBTS
To enable NIB in Yate see the instructions here.