telephony based grading solution

42
Telephony Based Telephony Based Grading Solution Grading Solution by Svechinsky Ella and by Svechinsky Ella and Simanovich Len Simanovich Len

Upload: cindy

Post on 19-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Telephony Based Grading Solution. by Svechinsky Ella and Simanovich Len. Project Description. Control Model. Solution enables: Retrieving their grades using a dial-phone. Server Answers Communicates Retrieves grades. We used: TAPI SDKs SQL DB C#. Telephony Operator. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Telephony Based Grading Solution

Telephony Based Telephony Based Grading SolutionGrading SolutionTelephony Based Telephony Based Grading SolutionGrading Solution

by Svechinsky Ella and by Svechinsky Ella and Simanovich LenSimanovich Len

Page 2: Telephony Based Grading Solution

ProjectProject

DescriptionDescriptionProjectProject

DescriptionDescription

Page 3: Telephony Based Grading Solution

Control Model

TAPIDataBase Main

answering service

Database inteface

DBIF

TAPI interface

ProjectTapiTAPI

GradesDBFeed

Database manager

Students - callers

Page 4: Telephony Based Grading Solution

• Solution enables:– Retrieving their grades using a dial-

phone.

• Server – Answers– Communicates– Retrieves grades

Page 5: Telephony Based Grading Solution

• We used:– TAPI SDKs– SQL DB– C#

Page 6: Telephony Based Grading Solution

Telephony Telephony OperatorOperator

Telephony Telephony OperatorOperator

Page 7: Telephony Based Grading Solution

IntroductionIntroductionto TAPI 3.0to TAPI 3.0

IntroductionIntroductionto TAPI 3.0to TAPI 3.0

Page 8: Telephony Based Grading Solution

• TAPI 3.0– Simple and generic methods for:

• making connections • accessing media streams

– Abstract call-control functionality.

Page 9: Telephony Based Grading Solution

Call Control Model for TAPI 3.0

ITCallHubCall HubAddress

ITAddress

ITTerminalSupport

ITMediaSupport

ITAddressEventNotification

ITCallNotification

TerminalITTerminal

IBasicVideo

ITBasicAudioTerminal

ITMediaSupportITBasicCallControl

ITCallTones

ITCallInfo

ITCallTonesNotification

ITConsultCall

ITParticipantInfo

Call

TAPIITTAPI

ITTAPIEventNotification

ITCallHubEventNotification

Page 10: Telephony Based Grading Solution

Telephony Operator Telephony Operator DesignDesign

Telephony Operator Telephony Operator DesignDesign

Page 11: Telephony Based Grading Solution

• Telephony Operator application:– features for dial-up modem

communication for Telephony Based Grading Solution project.

Page 12: Telephony Based Grading Solution

Definition of Definition of InterfacesInterfaces

Definition of Definition of InterfacesInterfaces

Page 13: Telephony Based Grading Solution

• Generalized solution:– Abstract interfaces.– Different kinds of communication.

Page 14: Telephony Based Grading Solution

• Defined interfaces:– IEngine– ILine– ICall– IDisconnectCallBack

Page 15: Telephony Based Grading Solution

• Enable communication• Support:

– multiple lines.– incoming and outgoing requests.– receiving and sending data.

Page 16: Telephony Based Grading Solution

Communication Control Model

Line WaitForNewCall

GatherOneDigit

PlayMessage GatherDigits

DisconnectCall ClearDigitEvents

Call

Engine Initialize Shutdown GetFirstLine

GetNextLine

DisconnectCallBack

DisconnectCallBack

Page 17: Telephony Based Grading Solution

DisconnectCallBack Interface

• Assigned to the Call object.• Callback interface.• Signals the main server.

Page 18: Telephony Based Grading Solution

Implementation of Implementation of InterfacesInterfaces

Implementation of Implementation of InterfacesInterfaces

Page 19: Telephony Based Grading Solution

• Using TAPI 3.0:– ProjectEngine– ProjectLine– ProjectCall

Page 20: Telephony Based Grading Solution

• Multiple modems.• One TAPI object = Engine object.• Dial-up modem = Line object.• Incoming call = Call object.• Methods:

– multithreaded– callback

Page 21: Telephony Based Grading Solution

ProjectEngine implementation

• ProjectEngine:– TAPI object– ArrayList with Line objects.

Page 22: Telephony Based Grading Solution

ProjectEngine implementation (cont.)• Multithreaded methods allow:

– Registration for Lines.– Listening for TapiEvents.– Receiving events for all.– Identification of Line.– Passing event to the Line.

Page 23: Telephony Based Grading Solution

Project Line implementation

• ProjectLine:– TAPI object– Address of dial-up modem– Call object for a current call– Queue object with DigitEvents

Page 24: Telephony Based Grading Solution

Project Line implementation (cont.)• Multithreaded methods allow:

– Handling TapiEvents.– Getting a new call.

Page 25: Telephony Based Grading Solution

Project Line implementation (cont.)• NOTE:

– Always answering the incoming call.– Delayed disconnection (Visual

Studio .Net 2003)

Page 26: Telephony Based Grading Solution

ProjectCall implementation

• ProjectCall object:– ProjectLine object– CallInfo object.

Page 27: Telephony Based Grading Solution

ProjectCall implementation (cont.)• Multithreaded callback methods

allow:– Gathering one or more DigitEvents.– Playing audio messages.– Disconnecting.

• NOTE:– IsConnected() method is enabled.

Page 28: Telephony Based Grading Solution

Data-Base Side Data-Base Side and Main Serviceand Main Service

Page 29: Telephony Based Grading Solution

Telephony Operator Telephony Operator ProjectProjectData-Base Side and Main Data-Base Side and Main ServiceService

TAPIDataBase Main

answering service

Database inteface

DBIF

TAPI interface

ProjectTapiTAPI

GradesDBFeed

Database manager

Students - callers

Overview

Page 30: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

• Implemented using Microsoft SQL server 2000.

• The logic of managing the information is done in stored procedures.

Data Base

Page 31: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

• The queries in the Main Service are done in real time, so it has to be fast. The database is designed to have fast queries, on GradesDBFeed’s expense.

• The database is on one of the lab server. The connection to it is done with a connection string, using SqlConnection object.

Data Base

Page 32: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

Data Base Tables and Relationships

Page 33: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

• SP_last_grade_course_occurrence_update - used every time that a grade in changed/deleted.

• SP_last_grade_all_students_course_update - used whenever a course occurrence is changed/deleted, and we have to update the records of all the students that were registered to this course occurrence.

•SP_last_grade_course_update - used every time that a grade is changed/deleted, or the time of a course occurrence is changed/deleted.

Data BaseSpecial Stored Procedures

Page 34: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

Data Base Data integrity

Change in students table

Change in grades table

Change in course

occurrences table

Change in courses table

Automatic change

Automatic change

Automatic change

Last_grade_all_students_course

Last_grade_courseLast_grade_course_occurrence

Page 35: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

•MasterForm•StudentsForm•CoursesForm•CourseOccurrencesForm•GradesForm

GradesDBFeed Forms Application

Page 36: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

GradesDBFeed Data Adapter

DataBase

Data Adapter(operates stored

procedures upon a change in the data set)

insert

select

delete

update

SP1

SP6

SP5

SP4

SP3

SP2

Stored procedures

Data set

Form

Page 37: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

•This class library has an explicit function for every query.

•This code uses the AutoSProc tool.

DBIF Class Library (Database Interface)

Page 38: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

// creating a command object with the stored procedure nameSqlCommand cmd = new

SqlCommand("SP_valid_student_password", cnn);cmd.CommandType = CommandType.StoredProcedure;//defining the parameters that the stored procedure getscmd.Parameters.Add("@student_id",SqlDbType.VarChar,50).V

alue=student_id;cmd.Parameters.Add("@student_password",SqlDbType.VarCh

ar,50).Value=student_password;cmd.Parameters.Add("@valid", SqlDbType.Int);cmd.Parameters["@valid"].Direction=ParameterDirection.Out

put;//executing the sql command

DBIF Class Library AutoSProc

public interface ISprocCalls: ISprocBase {

int SP_valid_student_password(string student_id, string student_password, ref int valid);

...}

Page 39: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

•Most of the operations are allowed for a maximum number of tries.

This service is implemented only for one phone line.

•Has a function for handling grammer of reading a number a loud. It combines a set of messages to one array."the number of points is 99.5" is translated to

"the number of points is ",90","9","and, "a half".

MainService

Page 40: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

MainService

Entering the system,Initialize

Waitingfor

a call

Data Request

Main menuStudent’s

details

Drop,Dissconnect the system,

Exit

End call

Succeeded Succeeded

Succeeded, valid

User chose one of

the datarequest options

Failed

FailedFailed,

not valid,disconnected

Stop listening to events of attempts to start a call

User chose to give Another

student’sdetails

User asked to end call,disconnected,

failed

Asked to repeat the menu

Note: when a data request failed, it’s one of the possible results for a data request. It does not require a separate state.

Asked toreturnto the

calling menu

Dissconnected

Failed

Succeeded

Start state

Stop state

User asked to repeat the same request

Sub menuUser chose a sub-menu

Asked to repeat the menu

User asked to end call,disconnected,

failed

User asked to repeat to the main menu

Page 41: Telephony Based Grading Solution

Telephony Operator Project Telephony Operator Project Data-Base Side and Main ServiceData-Base Side and Main Service

•System design and Layers of abstractions

•C# and .Net

•Databases: stored procedures and data integrity.

What did we have here? (key learnings)

Page 42: Telephony Based Grading Solution

THE ENDTHE END