Popular Posts

Monday, February 20, 2017

Introduction to Voice Over Internet Protocol (VOIP)


What is VOIP:


VOIP stands for Voice Over Internet Protocol. It’s a great new way from to use the power of internet to make and receive phone calls. If you have a high speed internet connection then you can use VOIP and begin making phone calls using your regular touch tone phone. Just like sending an e-mail through the internet VOIP service provider does the same thing with voice and the best part is that you will be able to call anywhere at anytime and save money too. VOIP is also called broadband phone as it uses high speed internet connection which is also called broadband connection.

History:

The concept of VOIP comes from the concept of text chatting. In earlier days when internet was invented there was big problem for the general users that how they can get access to it because to get an access to internet there is need for a physical connection between the user and the internet. It is not possible to cover million and billions of users around the world through means of physical connection. But there exists a physical connection around the world that is already in use by billions of people to connect anywhere in is world with their friends and relatives and that physical connection is our local phone cable. By using this cable they can overcome the physical connection problem but then another comes up and that is local phone signals are analog and the computer sends and receive digital signals from the internet. They over come this problem by inventing modem whose function is to convert digital signals into analog and analog signals into digital. So users are connected to internet and using it for different purposes including chatting. Most of the users around the world were using internet because of chatting. They progress further in increasing the speed of internet and then were able to transfer voice over internet which was popular all around the world as voice chatting and is still in use as VOIP service is not that much cheaper for every user. From voice chatting they get this concept of making and receiving phone calls by means of internet as they are already using the resources of the telephone. Now a day we are still connecting to the internet by means of telephone cable but there is tremendous improvement in its speed and its facilities. VOIP is one of the most important facilities of the internet.

Requirements for VOIP:

In order to get a VOIP connection following are the requirements:
                 
  • Broadband Internet connection (DSL or Cable).
  • A regular touch tone telephone.
  • A VOIP phone adapter.
  • A VOIP service provider account.

How VOIP works:

You connect your telephone to your high-speed Internet connection using the VOIP phone adapter. Pick up the phone, and use it just like you do today. When you pick up the phone, the VOIP phone adapter converts your voice into data and sends it through the Internet like an email. The VOIP service provider’s network sends the call where you want it and translates it back into voice. When the person you're calling picks up the phone, it sounds just the same as any other call. When someone calls you, they dial your number, your phone rings, and all you have to do is pick up and answer it. Once you connected a VOIP adapter with your cable or DSL modem then your phone calls are routing through the internet. Below is a diagram that how its works and general procedure:

http://wakasmalik.blogspot.com/2017/02/introduction-to-voice-over-internet.html
VOIP Setup

  • VOIP adapter sends your phone call across the Internet.
  • Your calls go through your modem.
  • Your VOIP phone adaptor splits your high-speed broadband Internet connection.
  • Your Internet connection should work as it did before you installed the VOIP phone adaptor sending emails and other web data to your personal computer.
  • Your phone calls are sent through your VOIP phone adaptor to your regular or cordless phone.


Advantages of VOIP Service:



·         First and one of the important advantages is that it will lower your phone bills and especially if you have an international connection or you are using calling cards.

·         Secondly wherever you live in this world you can get a local telephone number of your choice of country regardless of the geographical difference of both the countries. Let’s take an example if you live here in USA but still you can own a UK number. In this way you and your UK friends save a lot of money on phone calls as both you have the same area code that’s possible now with the power of internet and VOIP service.

·         You can get all great features like Caller ID with Name, Call Waiting Voicemail and Conference Calling included at no additional cost.

·         There are number of additional features that you can get like: 911 Dialing Call transfer, In-Network calls, area code selection, Click 2 Call, Call Return, Caller ID block, International Call Block and Ring List.

·         Soft Phone: Whether you're traveling across the globe or just into the next room, carrying on a conversation doesn't have to mean carrying extra equipment. Download Soft Phone software and you can turn any PC or laptop into a full-functioning telephone. Soft Phone is a screen-based interface that works just like your telephone keypad. You can make a call, receive a call, and pick up your voicemails too.


Disadvantages of VOIP Connection:
  • One major disadvantage of VOIP is the quality of the sound which can be uneven, and phone calls often have lot of delay with lot of echo. It makes conversation difficult .To get lower bandwidth, the voice compression algorithms and echo cancellation requires additional processing power that makes digital phones more expensive than analog phones.
  • If your cable, DSL or electric power goes out so does your phone line. 
  • No emergency reliability. Maybe you will never need it but if you have to use 911 you have to give exact address and name, they have a hard time tracking where you are and this could cost you valuable seconds.


Please comment if you have any questions or concerns.

Thursday, February 16, 2017

Calculate Time Difference Between Two Clocks in String Format

The other day I was looking for calculating the time difference between two clocks in String format. I could find a better solution, so I wrote a custom one. Take a look at the Java Code below:

   1:  public static String calTimeDifference(String startHour, 
       String startMin, String endHour, String endMin){
   2:   
   3:  String total = "0";     
   4:   
   5:  if (!StringUtils.isEmpty(startHour) && 
       !StringUtils.isEmpty(startMin) && 
       !StringUtils.isEmpty(endHour) && 
       !StringUtils.isEmpty(endMin){
   6:   
   7:   int stHr = Integer.parseInt(startHour) * 60 ;
   8:   
   9:   int stMn = Integer.parseInt(startMin);
  10:   
  11:   int enHr = Integer.parseInt(endHour) * 60 ;
  12:   
  13:   int enMn = Integer.parseInt(endMin);
  14:   
  15:   int startTime = stHr + stMn;
  16:   
  17:   int endTime = enHr + enMn;
  18:   
  19:    if (endTime > startTime){
  20:   
  21:     int durationHr = (endTime - startTime)/60;
  22:   
  23:     int durationMn = (endTime - startTime)%60;
  24:   
  25:     total = Integer.toString(durationHr) + " Hr and "
         + Integer.toString(durationMn) + " Min" ;
  26:   
  27:      }
  28:   
  29:     else{
  30:   
  31:      total = "Ending Time cannot be before Starting Time";
  32:   
  33:      }
  34:   
  35:    }       
  36:   
  37:   return total;
  38:   
  39:  }


The above code should work as long as you keep in mind the pre and post conditions.

Pre-Condition:
This function assumes that all four parameters are present so if even one of them is missing it will return zero.

Post-Condition:
This function will also make sure that the ending time cannot be before the starting time if it is it will return the error message.