Skip to content

SusheelThapa/A-Phone-Call

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Phone Call

github-profile-readme-generator license github-profile-readme-generator forks github-profile-readme-generator stars

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.

Table of Contents

Objectives

Glimpse of the project

For demo video click here.

Tools we have used

  1. Visual Studio Code: As our code editor
  2. g++: As our compiler
  3. SDL2 : As our Library to create GUI interface
  4. Git : As our local version control system
  5. Github : As our central version control system
  6. Latex : As our document preparation software

Installation of Dependencies

This project has been created and tested in linux platform.

  1. First of all give install.sh file executable permission

    chmod +x install.sh
    

    Note:Make sure you are in the place which has install.sh

  2. 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

Project Compilation

Basic Command

  1. Compiling Client Code

     make client_one client_two

    It will create two client client_one and client_two.

  2. Compiling Server Code

     make server

    It will create server.

  3. Clean command

     make clean

Helping Command

  1. Compiling client_one and running

    make client_one_run
  2. Compiling client_two and running

    make client_two_run
  3. Compile client_one, client_two and server at once

    make all
  4. Run server, client_one and client_two at once.

    make run

How does it works?

IMPORTANT

server, client_one and client_two have their own file which they check if they have been changed or not.

  • When client_one calls client_two

    client_one will send message to server(by writing in the server_file) i.e CALLCLIENTTWO2222222222 as can been seen from above images.

    Then, server will analyse if the number client_one is calling is of client_two or not.

    If the number is correct, then it will write in client_two file CALLFROMCLIENTONE1111111111

    If the number is incorrect, then it will write in client_one file NUMBERUNMATCHED

  • When dialed number is correct(call from client_one to client_two)

    Here, client_two have two option.

    • To reject the call

      When client_two reject the calls then it will write CALLREJECTEDBYCLIENTTWO in server file.

      Then server will write CALLREJECTEDFROMCLIENTTWO in client_one file

    • To accept the call

      When client_two accept the calls then it will write CALLRECEIVEDBYCLIENTTWO in server file.

      Then server will write CALLRECEIVEDFROMCLIENTTWO in client_one file

  • When client_two accept call from client_two

    Both of the client can send audio message to each other one at a time.

    Suppose client_one has send audiomessage to client_two.

    Then, client_one will write AUDIOMESSAGESENDBYCLIENTONE in server file.

    After that, server will write AUDIOMESSAGESENDFROMCLIENTONE in client_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

Authors

Helping Hands

Others

You can find the gif of the project here.

For more information, you can look here.