A Phone Call is all about demostrating the simulation of how phone call works between two clients in real world and how everything is controlled and managed by server at the backend of the communication.
- Objectives
- Glimpse of the Project
- Tools we have used
- Installation of Dependencies
- Project Compilation
- How does it works?
- Author
- Helping Hands
- Others
- To learn Object Oriented Programming
- To learn Simple Media Direct Layer
- To learn how to collaborate with each other in a project.
- To learn how does call get establish in real world.
For demo video click here.
- Visual Studio Code: As our code editor
- g++: As our compiler
- SDL2 : As our Library to create GUI interface
- Git : As our local version control system
- Github : As our central version control system
- Latex : As our document preparation software
This project has been created and tested in linux platform.
-
First of all give
install.sh
file executable permissionchmod +x install.sh
Note:Make sure you are in the place which has
install.sh
-
Run
install.sh
./install.sh
Give it sometime it will install all the dependencies required by the project. When it completed you can head over to Project Compilation
-
Compiling Client Code
make client_one client_two
It will create two client
client_one
andclient_two
. -
Compiling Server Code
make server
It will create
server
. -
Clean command
make clean
-
Compiling
client_one
and runningmake client_one_run
-
Compiling
client_two
and runningmake client_two_run
-
Compile
client_one
,client_two
andserver
at oncemake all
-
Run
server
,client_one
andclient_two
at once.make run
IMPORTANT
server
, client_one
and client_two
have their own file which they check if they have been changed or not.
-
When
client_one
callsclient_two
client_one
will send message to server(by writing in theserver_file
) i.e CALLCLIENTTWO2222222222 as can been seen from above images.Then,
server
will analyse if the numberclient_one
is calling is ofclient_two
or not.If the number is correct, then it will write in
client_two
file CALLFROMCLIENTONE1111111111If the number is incorrect, then it will write in
client_one
file NUMBERUNMATCHED -
When dialed number is correct(call from
client_one
toclient_two
)Here,
client_two
have two option.-
To reject the call
When
client_two
reject the calls then it will write CALLREJECTEDBYCLIENTTWO inserver
file.Then
server
will write CALLREJECTEDFROMCLIENTTWO inclient_one
file -
To accept the call
When
client_two
accept the calls then it will write CALLRECEIVEDBYCLIENTTWO inserver
file.Then
server
will write CALLRECEIVEDFROMCLIENTTWO inclient_one
file
-
-
When
client_two
accept call fromclient_two
Both of the client can send audio message to each other one at a time.
Suppose
client_one
has send audiomessage toclient_two
.Then,
client_one
will write AUDIOMESSAGESENDBYCLIENTONE inserver
file.After that,
server
will write AUDIOMESSAGESENDFROMCLIENTONE inclient_two
file.
Note: All the above explanation is based from client_one
to client_two
. The explanation is true from client_two
to client_one
. Also, we have explain only how client communicates but not what happen after the message is receive by respective client
You can find the gif of the project here.
For more information, you can look here.