Network in a PC

From YateBTS
(Redirected from Network in a Box)
Jump to: navigation, search

"Network in a PC" ("NiPC") 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 PC' for its users and will allow routing calls outside the network.

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

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

Network in a PC (NiPC) Services

Routing Calls

NiPC 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

NiPC 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 NiPC supports authentication via:
    • COMP128v1
    • Milenage
    • COMP128v3 (commercial release only)
  • For handsets that support 3G-style mutual authentication, the NiPC will perform full mutual authentication.

USSD

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

Web GUI for NiPC Management

The NiPC module is configured and managed via a Web GUI.

Depending on your YateBTS version, you can access the GUI, via HTTP, on two different ports.

1. If the machine is not in a secured network, it should be made accessible only from localhost by uncommenting the content of the .htaccess:

or

2. You may also connect to the web server using the following links:

or

The Web GUI's functions are the same as those described in Javascript_NiPC, 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 NiPC 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

The WebGUI can also be used in Roaming mode.

Installation and configuration

Requirements

  • YateBTS
  • PHP
  • Apache
  • pySIM

Setting up the WebGUI

The YateBTS LabKit is delivered with an already installed WebGUI.

  • In case it needs to be installed manually, this can be done from packages or from sources:
svn checkout http://voip.null.ro/svn/yatebts/trunk yatebts
run ./autogen.sh
run ./configure
cd nipc
make install 

After installing, the sources of the WebGUI will be located in /usr/share/yate/nipc_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/nipc_web nipc
  • 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/nipc/web nipc_web
cd /var/www/html   (or cd /var/www on Debian older based OS)
ln -s /usr/src/nipc_web nipc

WebGUI configuration

Before using the interface, the WebGUI 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.

Also check that Apache is configured to listen on port 80 for requests. The config file is located in /etc/httpd/conf/httpd.conf.

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.

File:bts config.png

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.

Listsubscribers step1.png

  • 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.

Addexpressionform.png

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

Setregularexpression.png

  • 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.

Addsubscriber.png

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.

File:list subs.png

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:

  • basic parameters (that are displayed when the protocol is chosen)

and

  • 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:

Outgoingparameters.png

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

Outgoingsave.png

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.

Switch iax.png

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:

Addiaxoutbound.png

Using NiPC with YateBTS

To enable NiPC in Yate see the instructions here.