Project

General

Profile

Controller Algorithm

The controller have two different method to use it. the easy way to make a test is use website, controller will start automatic by web interface when user click the submit button. Another way, user can used command terminal on the server to make test depend from the variable given by user. For more information how to use controller with terminal just type "./gsmselftest --help".

Description of SIP2GSMx to RZ algorithm

Here is a short description of the SIP to GSMRZ Test (GSMRZ means the local GSM system of our university). The test works as following:

The first thing that happens here is the test information are stored in the DB. Then the controller is started (if this is the first test, otherwise it is already started and will just proceed from this step). The controller checks the connection to the DB, if the session can be established then fetch the information from the DB what should be done (in this case, the information needed are the SIP username, password, calling number of the GSM phone, etc..). After the connection to the DB has been established, next what we do, we ping each subsystem (SIP, GSM, LANDLINE,...). The ping results are written in the ping table. If the systems to be tested don't respond then we stop the tests and write in the DB why we were unable to proceed with the test, otherwise proceed with the test. The procedure SIP2GSMRZ is called. The test will proceed by testing each GSMx subsystem (by GSMx we mean, it will test each GSM1, GSM2 and GSM3 subsystem). So how does it work? Controller first establishes a connection with the SIP handler and sends it the command to wake up, to register the account and to be ready to make a call test. Then the SIP handler talks to the main controller with an acknowledgement that it is ready to make a call. After the controller receives this message from the SIP handler that it can call at any time point the main controller tries to establish a connection with the GSMx handler (e.g. x=1,2,3) to wake it up and sends the command to tell the GSMx handler side to be in the receiving mode (by receiving mode we mean, it enters the state to be ready to receive a call from some device, in this case SIP). The GSMx handler enters the receiving mode and responds to controller with an acknowledgement that it received the command and that it is ready to receive a call. After receiving this the main controller tells the SIP handler, call now GSMx. In the meantime the main controller waits for the results which will be sent by GSMx and SIP handler. Now the main controller disconnects from SIP and GSMx handler and stores the results in the DB. The test is repeated for all three GSMx stations and later on when we display the results there will be some intelligence to describe you a problem if there was one based on the stored results in the DB.

Algorithm SIP2GSMx RZ

Controller Algorithm

1. Check connection to the DB
   IF Failed
      Send error message, update DB and terminate
   ELSE
      Go to second step

2. Ping SIP Server and BTSx Box.
    (we ping all BTS Box for information purpose)
    Save ping responds in a variable and the DB

3. Parse the information task.
   Task ID
   Kind of test, etc.

4. IF SIP2GSMRZ == 1 then
     IF ping to SIP server is OK then

      4.1 SIP to GSM1 RZ
          Open SIP caller script, include ID test and SIP ID account
          Wait respond from Handler with timeout

             IF SIP handler == OK then
                Main controller tell GSM1 Handler to open the receiver mode script, include ID test and caller number
                   wait for the respond from the GSM1 Handler with timeout
                       IF GSM2 handler == OK then
                        Send SIP message to start the call including the destination number.
                        (SIP will send the message back if it received the message)
                        Wait for respond from both of the handlers with timeout.
                        Save results in the DB
               ELSE or timeout
            Cancel SIP to GSM1 RZ test and report.
            (send message to SIP handler to terminate)

             ELSE or timeout
                Cancel SIP to GSM1 RZ test and report.

      4.2 SIP to GSM2 RZ
          Open SIP caller script, include ID test and SIP ID account
          Wait respond from Handler with timeout

             IF SIP handler == OK then
                Main controller tell GSM2 Handler to open the receiver mode script, include ID test and caller number
                   wait for the respond from the GSM2 Handler with timeout
                       IF GSM2 handler == OK then
                        Send SIP message to start the call including the destination number.
                        (SIP will send the message back if it received the message)
                        Wait for respond from both of the handlers with timeout.
                        Save results in the DB
               ELSE or timeout
            Cancel SIP to GSM2 RZ test and report.
            (send message to SIP handler to terminate)

             ELSE or timeout
                Cancel SIP to GSM2 RZ test and report.

      4.3 SIP to GSM3 RZ
          Open SIP caller script, include ID test and SIP ID account
          Wait respond from Handler with timeout

             IF SIP handler == OK then
                Main controller tell GSM3 Handler to open the receiver mode script, include ID test and caller number
                   wait for the respond from the GSM3 Handler with timeout
                       IF GSM3 handler == OK then
                        Send SIP message to start the call including the destination number.
                        (SIP will send the message back if it received the message)
                        Wait for respond from both of the handlers with timeout.
                        Save results in the DB
               ELSE or timeout
            Cancel SIP to GSM3 RZ test and report.
            (send message to SIP handler to terminate)

             ELSE or timeout
                Cancel SIP to GSM3 RZ test and report.

    ELSE (SIP server not respond)
       update DB and ignore the test.

5. IF SIP2LocalSIP == 1 then
    the others test will be the same with SIP2GSMRZ

Class on Controller

Test Class

Controller use this class to call initial test and make a test. For more information about this class, click Here

Client Class

This class use for communication purpose between controller and handler. Controller should be client part and the handler being the server part. For more information about this class, click Here

Database Class

This class use for getting and send result task from the test. this class use for communicating between controller and database. For more information about this class, click here

Ping Class

Ping Class use for pinging all server which related to the test such as SIP server, SIPGate server, SIP university telephone, GSM box 1 and GSM box 2. This class use for checking purpose before controller decide to start the test task. If the controller found that the server does not alive, he will ignoring the test task and continue to another task. For more information about this class, click Here

Function on the Controller.

Update devices

Since we had used cables to connect the cell phones with the computer, usually the devices got their own port addresses. They were automatically assigned by the operating system, either after the cables were plugged into the USB port or after a system reboot. One of the problems we had to deal with was assigning the right cell phone (i.e. with the appropriate GSM network) to the corresponding port address. The operating system

Smart Test

The smart test is not called smart without a reason. It tries automatically to identify problems inside of the telecommunication network. The user is not required to define what kind of tests have to be performed. In the first part the test software communicates with the database to see what systems are available. In the next step it performs a call from the University telephone system to a random local cell phone14 inside of our University GSM network. While executing this task, automatically the Asterisk server, OpenBSC and a random nanoBTS (or the one cell phone in RZ) are tested. The next task to be performed in the smart test, a randomly selected cell phone inside of our local GSM network will try to call: a random cell phone within the external (O2, Vodaphone,E-Plus or T-Mobile) or local GSM network. This might test the external network and will test it with high probability, however the probability exists to make a local to local GSM test call. In the third task, we perform a test where we call from the landline a random cell phone inside of our local GSM network. In the fourth or last task, we call from SIP to the service we did not test yet (e.g. if we did not test the external GSM network using the second test task, then in this last task we will exploit it). After the smart test had been completed you will be presented with the results.

SIP Test

The SIP test option will perform test in such a way that all the SIP subsystems are tested (SIP and University telephone network). It will try to identify if there are any problems on the Asterisk server and our University telephone network, including incoming and outgoing calls from the SIP side.

GSM Test

In the GSM test both GSM networks get tested, the local and the external GSM network. We test the nanoBTS controller boxes (i.e. BeagleBoards) as well. Using this test, both incoming and outgoing calls are performed, we can detect possible errors on the OpenBSC and the nanoBTS.