Telephony Based Grading Solution
description
Transcript of Telephony Based Grading Solution
![Page 1: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/1.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/2.jpg)
ProjectProject
DescriptionDescriptionProjectProject
DescriptionDescription
![Page 3: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/3.jpg)
Control Model
TAPIDataBase Main
answering service
Database inteface
DBIF
TAPI interface
ProjectTapiTAPI
GradesDBFeed
Database manager
Students - callers
![Page 4: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/4.jpg)
• Solution enables:– Retrieving their grades using a dial-
phone.
• Server – Answers– Communicates– Retrieves grades
![Page 5: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/5.jpg)
• We used:– TAPI SDKs– SQL DB– C#
![Page 6: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/6.jpg)
Telephony Telephony OperatorOperator
Telephony Telephony OperatorOperator
![Page 7: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/7.jpg)
IntroductionIntroductionto TAPI 3.0to TAPI 3.0
IntroductionIntroductionto TAPI 3.0to TAPI 3.0
![Page 8: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/8.jpg)
• TAPI 3.0– Simple and generic methods for:
• making connections • accessing media streams
– Abstract call-control functionality.
![Page 9: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/9.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/10.jpg)
Telephony Operator Telephony Operator DesignDesign
Telephony Operator Telephony Operator DesignDesign
![Page 11: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/11.jpg)
• Telephony Operator application:– features for dial-up modem
communication for Telephony Based Grading Solution project.
![Page 12: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/12.jpg)
Definition of Definition of InterfacesInterfaces
Definition of Definition of InterfacesInterfaces
![Page 13: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/13.jpg)
• Generalized solution:– Abstract interfaces.– Different kinds of communication.
![Page 14: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/14.jpg)
• Defined interfaces:– IEngine– ILine– ICall– IDisconnectCallBack
![Page 15: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/15.jpg)
• Enable communication• Support:
– multiple lines.– incoming and outgoing requests.– receiving and sending data.
![Page 16: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/16.jpg)
Communication Control Model
Line WaitForNewCall
GatherOneDigit
PlayMessage GatherDigits
DisconnectCall ClearDigitEvents
Call
Engine Initialize Shutdown GetFirstLine
GetNextLine
DisconnectCallBack
DisconnectCallBack
![Page 17: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/17.jpg)
DisconnectCallBack Interface
• Assigned to the Call object.• Callback interface.• Signals the main server.
![Page 18: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/18.jpg)
Implementation of Implementation of InterfacesInterfaces
Implementation of Implementation of InterfacesInterfaces
![Page 19: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/19.jpg)
• Using TAPI 3.0:– ProjectEngine– ProjectLine– ProjectCall
![Page 20: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/20.jpg)
• 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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/21.jpg)
ProjectEngine implementation
• ProjectEngine:– TAPI object– ArrayList with Line objects.
![Page 22: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/22.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/23.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/24.jpg)
Project Line implementation (cont.)• Multithreaded methods allow:
– Handling TapiEvents.– Getting a new call.
![Page 25: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/25.jpg)
Project Line implementation (cont.)• NOTE:
– Always answering the incoming call.– Delayed disconnection (Visual
Studio .Net 2003)
![Page 26: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/26.jpg)
ProjectCall implementation
• ProjectCall object:– ProjectLine object– CallInfo object.
![Page 27: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/27.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/28.jpg)
Data-Base Side Data-Base Side and Main Serviceand Main Service
![Page 29: Telephony Based Grading Solution](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/29.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/30.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/31.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/32.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/33.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/34.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/35.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/36.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/37.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/38.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/39.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/40.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/41.jpg)
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](https://reader035.fdocuments.net/reader035/viewer/2022062519/56814f09550346895dbc9c46/html5/thumbnails/42.jpg)
THE ENDTHE END