Project

General

Profile

Controller Class

Creating Test Object.

To create an object of test class would be use by typing. "ControllerClass.controller(callFrom, callAdd, accCaller, callTo, destAdd, destNo, accDest)".

Where:
  1. callFrom, mean where call is coming from or can also called caller.
  2. callPortName, mean port name of the caller device.
  3. accCaller, mean account login information about the caller, such as username, password and server of the caller. It's used for SIP handler.
  4. callTo, mean destination call.
  5. destPortName, mean port name of the destination device.
  6. destNo, mean number should caller calling in.
  7. accDest, mean account login information about the caller, such as username, password and server of the caller. It's used for SIP handler.

Making test function.

To start the test function. First we need to create test object and giving parameter they need then call FuncTest(). Inside this class, another function will call such as initCaller, initReceiver, waiting feedback etc.
You can find more information below.

Function.

initCaller and initReciever function.

This function use for initialize caller and receiver handler which use variable callFrom, callTo, accCaller and accDest to assign into the handler.

initGSM function.

This function use only for calling GSM handler and start the program with parameter given by the controller such as port address for socket communication and also device address for the GSM.

callerGreating and receiverGreating function.

This function create an object for socket communication class to communicate between controller and handlers. greeting message between handlers and controller handled here.

startCall function.

Whenever this function called, its means that handler is ready to make a test. Then send a message "RECEIVE START" and "CALL START" to the handler, means the handler should start to proceed the test.

waitingFeedback function.

After controller send "RECEIVE START" and "CALL START" message, controller will be on the waiting mode with call this function. Controller will waiting approximately 50 seconds to get any test result message from the handlers.

initTerminate function.

This function use to send a "TERMINATE" message to handler after got all the result from handler. After got this message, handler will immediately shutting down.