9/29/98

Group G1

Arthur Choi #379582

Anton Shevchenko #375506

Signaling Team

Pseudocode

/* PBX Server */

While (True) do {

If (there is an incoming call) then {

Extract the domain name from the call

Extract the destination name from the call

Check to see if the domain has the rights to make the call to the destination

If (destination is a tel. number) {

Dial destination tel. number

Handle errors, if any

}

Else destination is a name

Forward request to the gateway

While (connection is not broken) do

Send and receive voice packets between gateway and tel. number

}

}

/* Gateway Server */

While (True) do {

If (there is an incoming call) then {

Extract the domain name from the call

Extract the destination name from the call

Check to see if the domain has the rights to make the call to the destination

If (destination is a name) {

Dial(destination name);

Handle errors, if any

}

Else destination is a tel. number

Forward request to the PBX

While (connection is not broken) do

Send and receive voice packets between name and PBX

}

}

/* Internet Telephone Client Application */

GUI box for the user with the following options:

New Call: Dial(name or tel. number user wants to call)

If (received INVITE call from domain of above name or tel. number) then

Send ACK back to that domain

Else try again until INVITE call is received or max. number of retries is reached

On Incoming Call: RegisterUpcallForIncomingConnections(call ID)

Accept Call: Accept(call ID)

Reject Call: Reject(call ID)

Terminate Call: Hangup(call ID)

Class DesktopSignaling: {

Int RegisterUpcallForIncomingConnections(call ID) {

Send "1xx" to acknowledge that a call is incoming

Return error codes

}

Int Dial(name or tel. number) {

Extract the domain name from the name or tel. number

Translate the domain name into an IP address through Directory Service

Send INVITE(name or tel. number) to the obtained IP address

If ("200 OK" received) then

Send ACK(name or tel. number) to the obtained IP address

Else If ("302 Moved Temporarily to Location: new name or tel. number" received) then {

Send ACK(name or tel. number) to the obtained IP address

Dial(new name or tel. number)

Check if new name or tel. number is repeated (to prevent loops)

}

Else decode the received response and process accordingly

.

.

.

Return error codes

}

Int Hangup(call ID) {

Send BYE across connection

Return error codes

}

Int AcceptCall(call ID) {

Check incoming call to see if it is intended for the correct target

If correct

Send "200 OK"

Else decode the received response and process accordingly

.

.

.

Return error codes

}

Int RejectCall(call ID) {

Send "486 Busy"

Send BYE across connection

Return error codes

}

}/* Class DesktopSignaling */

Interfaces provided to others

Class DesktopSignaling:

{Constructor();

Int RegisterUpcallForIncomingConnections(name);

/* Acknowledge incoming calls

Return 1 if successful, 0 otherwise */

Int Dial(name);

/* Attempt to make connection with a phone number or computer name

Return 1 if successful, 0 otherwise */

Int Hangup(name);

/* Hangup an accepted call

Return 1 if successful, 0 otherwise */

Int AcceptCall(name);

/* Accept an incoming call

Return 1 if successful, 0 otherwise */

Int RejectCall(name);

/* Reject an incoming call

Return 1 if successful, 0 otherwise */

Destructor();

}

Interfaces needed

From Team 1: interface to set up a connection between any source and destination and send data between the two endpoints.

From Team 3: interface for the data flow inside the gateway.

From Team 4: interface to look up IP addresses, telephone numbers, and location(s) associated with a given name and vice-versa.

From Team 8: interface and specifications of their API for multiparty audio conferencing/whiteboard.

Schedule

Week of 9/28/98: Read articles on SIP, JTAPI, and other Internet Telephony methods; submit first report

Week of 10/5/98: Finish all reading; finalize our interface for other teams to use and start implementing our API

Week of 10/12/98: Get Team 1, 3, 4, and 8’s interfaces and incorporate them into our code

Week of 10/19/98: Finish the above; submit second report

Week of 10/26/98: Implement the Internet Telephone application; start implementing PBX Server and Gateway Server code

Week of 11/2/98: Finalize PBX Server and Gateway Server code

Week of 11/9/98: Start error testing and obscure event handling

Week of 11/16/98: Finish the above; submit third report

Week of 11/23/98: Get all the teams code together and start doing major testing; fix any incompatibilities and incorporate any useful/necesssary additions into our code

Week of 11/30/98: Final testing of the whole Internet Telephony project; submit final report

References

http://www.cs.cornell.edu/cs519/project/overview.pdf

http://www.cs.columbia.edu/~hgs/sip/sip.html

http://www.cs.cornell.edu/cs519/project/Doc/JTAPI/Default.htm