voip using wifi p2p

Upload: suman-mohanta

Post on 02-Jun-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 VoIP Using WiFi P2P

    1/31

    Seminar

    On

    Voice over IP Mobile Telephony

    Using Wi-Fi P2Pachelor of Technology

    in

    Information Technology

    Under the Guidance of

    Mr. Chandrakanta Badajena

    Faculty, IT

    Submitted By

    Suman Mohanta

    Registration No: 1101106212

    COLLEGE OF ENGINEERING AND TECHNOLOGY

    BIJU PATANAIK UNIVERSITY OF TECHNOLOGYBHUBANESWAR, ODISHA

  • 8/10/2019 VoIP Using WiFi P2P

    2/31

    COLLEGE OF ENGINEERING AND TECHNOLOGY

    BIJU PATANAIK UNIVERSITY OF TECHNOLOGYBHUBANESWAR, ODISHA

    Certificate

    This is to certify that the seminar entitled

    Voice over IPMobile Telephony Using Wi-Fi P2P being submitted by

    Suman Mohanta bearing Registration No. : 1101106212 in partial

    fulfilment of the requirement for the award of the degree of Bachelor

    of Technology in Information Technology is a bona fide work carried

    out at College of Engineering & Technology under my Supervision.

    GUIDE Seminar Coordinator HOD, IT

  • 8/10/2019 VoIP Using WiFi P2P

    3/31

    COLLEGE OF ENGINEERING AND TECHNOLOGY

    BIJU PATANAIK UNIVERSITY OF TECHNOLOGYBHUBANESWAR, ODISHA

    cknowledgement

    I would like to express my sincere regards and profound sense of

    gratitude to those who have helped us in completing the seminar

    successfully. At the very outset, my special and heartfelt thanks to my

    supervisor Mr. Chandrakanta Badajena, Faculty, IT for his

    precious guidance, assistance and constant supervision to bring this

    piece of work into the present form.

    I also extend my humble gratitude to Dr. Jibitesh Mishra,

    HOD, IT for providing the opportunity to present this seminar in the

    college.

    (Suman Mohanta)

    Regd. No.1101106212

  • 8/10/2019 VoIP Using WiFi P2P

    4/31

    COLLEGE OF ENGINEERING AND TECHNOLOGY

    BIJU PATANAIK UNIVERSITY OF TECHNOLOGYBHUBANESWAR, ODISHA

    Declaration

    I hereby declared that the matter embodied in this seminar is

    original and has not been submitted for the award of any other degree.

    (Suman Mohanta)

    Regd. No.1101106212

  • 8/10/2019 VoIP Using WiFi P2P

    5/31

    CONTENTS

    1 INTRODUCTION .............................................................................................................. 1

    2

    VOICE OVER IP................................................................................................................ 3

    2.1 Benefits of VoIP .......................................................................................................... 4

    2.2 The Obstacles to Voice over IP ................................................................................... 6

    2.3 VoIP using Wi-Fi ........................................................................................................ 7

    3

    PEER TO PEER NETWORK ............................................................................................ 8

    3.1

    How Does a Peer to Peer Network Work? .................................................................. 9

    4

    MOBILE CALL USING Wi-Fi TELEPHONY ............................................................... 10

    4.1 Modules ..................................................................................................................... 13

    4.1.1

    Enable Wi-Fi ...................................................................................................... 13

    4.1.2

    Call ..................................................................................................................... 13

    4.1.3

    Search ................................................................................................................. 13

    4.1.4

    Display Number on Screen ................................................................................ 13

    4.1.5

    Provide GSM option .......................................................................................... 14

    4.1.6

    Connection ......................................................................................................... 14

    4.1.7

    Reject Call .......................................................................................................... 14

    5

    BUILDING THE APPLICATION ................................................................................... 15

    5.1

    The Server Program .................................................................................................. 15

    5.2 The Client Program ................................................................................................... 16

    6 MOBILE IP COVERSION ALGORITHM ..................................................................... 17

    6.1 Traditional Hashing Algorithm for IP ....................................................................... 17

    6.2 Mobile to IP Conversion Algorithm ......................................................................... 17

    6.3 IP to Mobile Conversion Algorithm ......................................................................... 19

    6.4 Algorithm Test Result ............................................................................................... 21

    7 CONCLUSION ................................................................................................................ 23

    REFERENCES ................................................................................................................ 24

  • 8/10/2019 VoIP Using WiFi P2P

    6/31

    LIST OF FIGURES

    Figure 2.1 Voice over Internet Protocol .................................................................................... 4

    Figure 2.2 Voice over Wi-Fi ...................................................................................................... 7

    Figure 3.1 Peer to Peer Network ................................................................................................ 9

    Figure 4.1 Using Wi-Fi P2P and AP to establish call between mobile phones in addition to

    GSM ....................................................................................................................... 11

    Figure 4.2 P2P Ad hoc technique using Wi-Fi between mobile phones and wireless laptops 12

    Figure 5.1 A Server Program Running on Netbeans IDE ........................................................ 15

    Figure 5.2 A Client Program running on Netbeans IDE .......................................................... 16

  • 8/10/2019 VoIP Using WiFi P2P

    7/31

    ABSTRACT

    Voice telephony over mobile is currently supported at a cost using service provider such as

    GSM, or using IP service provider at cheaper cost. The purpose of this research is to

    design and implement a telephony program that uses Wi-Fi in P2P (Peer- to-Peer) or

    WLAN (Wireless Local Area Network) as a means of communication between mobile

    phones at no cost. The system will allow users to search for other individuals within Wi-Fi

    range and to establish free P2P voice connections, or to establish virtual connection through

    Access Points (AP), as well as giving the option to user to use GSM in the case of no Wi-Fi

    connectivity is available. The system will use a novel algorithm to convert mobile number

    into IP address and use it as a mean for contacting other mobile over P2P or AP using Wi-

    Fi technology. The software will use a correlation between current address books available

    in mobile phones to convert phone numbers into IP addresses. The system will allow user

    to make voice conversation, sending SMS (Short Message Service) as well as MMS. Inbox

    and outbox services, message delivery reports, and message drafts will be used for SMS and

    MMS management. The current system will only allow for one call per connection, and

    no call waiting, or conference calls. The first step of this research and development is to

    resolve the technical issue regarding mapping of the mobile users phone number to a

    unique IP address in order to avoid IP collision, centralized control, and user configuration.

    In addition, voice call will be supported using Wi-Fi to allow mobile phones to communicate

    free of cost to each other through P2P or through AP.

  • 8/10/2019 VoIP Using WiFi P2P

    8/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    1

    1 INTRODUCTION

    The support of telephony services over mobile phone has been used everywhere using

    technology such as GSM (Global System for Mobile) and 3rd Generation mobile

    telecommunication 3G , but at high cost. On the other hand, IP telephony try to reduce the

    cost for supporting this service over mobile phone, but it is facing difficulties since the same

    feature is supported on desktop and laptop at lower complexity. The challenge is to provide the

    same service over mobile phone at no cost, as it has been described in this paper. Two

    approaches are suggested in this paper to meet the objective of having free telephony

    services over mobile phones. These are the use of Wi-Fi technology over AP, and Wi-Fi over

    P2P (Peer-to-Peer). In addition, a novel algorithm has been invented to tackle the first

    fundamental problem of designing Ad hoc and P2P telephony using Wi-Fi, which will not

    rely on any central database, and will not require users to register to any service.

    This can be achieved through executing an algorithm to map a mobile number to a unique

    IP address that can be used to establish P2P connection to any other mobile phone running

    the same algorithm. Ad hoc network is an IEEE 802.11 communication network that

    establishes contact with multiple stations in a given area network without the use of access

    points or server . P2P networks help extending the range of fixed wireless networks and give

    rise to flexible architectures to adapt to geography of users, information, and signal

    transmission in a locally optimal manner. This mobile telephony software lends itself to be a

    completely distributed system in terms of architecture.

    Currently, servicing IP addressing in traditional networks are managed by two technologies, the

    DNS (Domain Name System), and DHCP (Domain Host Configuration Protocol). DNS

    Servers resolve human- friendly domain names to IP addresses for computers and resources on

    the Internet globally. DNS keeps website addresses consistent regardless of the physical location

    or routing protocol. DHCP helps to make automatic network configuration, IP address

    allocation, for network devices. Whenever a new device is connected to the network the device

    will request for an IP address from the server, which will allocate the address to the networked

    device for a specific time period , where dynamic network addressing is used . The DNS

    mechanism cannot be applied to P2P Ad hoc network, and therefore a better solution should be

    used such as the one suggested in this paper, which is based on Wi-Fi technology.

    The first stage of developing the voice over Wi-Fi IEEE 802.11 (Wireless Fidelity)application dealt with the problem of developing a method that could assign unique IP

    addresses to mobile devices on the fly without user interaction and central management .

  • 8/10/2019 VoIP Using WiFi P2P

    9/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    2

    However, this was a major challenge since devices in Ad hoc mode do not register with any

    central service such as DHCP and DNS. Since the mobile software IP addressing facility lacks

    coordination with central database, then IP address allocation and IP conflicts present a major

    issue.

    The solution to the IP problem was tackled in a very innovative way that did not

    compromise the softwares P2P and Ad hoc values. GSM mobile phones come with SIM

    (Subscriber Identification Modules) cards that help identify users uniquely in GSM networks,

    by mapping SIM numbers to subscribers and unique telephone address of the subscribe. There

    is no two phones can have the same number in the same network. However the GSM

    approach relies on centralized system of communicationrouting andmanagement. However, the

    solution proposed in this paper will only rely on the fact that each user has a unique phone

    number. An algorithm was devised to map telephone numbers to IP addresses, consequently

    creating a unique IP addresses for P2P devices that wishes to communicate. IPv6 was chosen

    because of its vast address space availability which is 2138 IP addresses. IPv6 utilizes 128-bit

    addresses versus IPv4 which uses 32-bit addresses.

    The telephone number & area code are in the format of 0-9 digits for the area code and 0-9

    digits, except for the first number that cannot be given the value 0 comprise off 9,000,000,000

    numbers unique numbers. IPv6 which has accommodates for more spaces was a better

    candidate than IPv4 which has fewer space and is already being exhausted and already in use

    by many traditional and wireless networks.

  • 8/10/2019 VoIP Using WiFi P2P

    10/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    3

    2 VOICE OVER IP

    Voice over IP (VoIP, or voice over Internet Protocol) commonly refers to the communication

    protocols, technologies, methodologies, and transmission techniques involved in the delivery of

    voice communications and multimedia sessions over Internet Protocol (IP) networks, such as theInternet. Other terms commonly associated with VoIP are IP telephony, Internet telephony, voice

    over broadband (VoBB), broadband telephony, IP communications, and broadband phone.

    Internet telephony refers to communications services voice, fax, SMS, or voice-messaging

    applications that are transported via the Internet, rather than the public switched telephone

    network (PSTN). The steps involved in originating a VoIP telephone call are signalling and media

    channel setup, digitization of the analog voice signal, encoding, packetization, and transmission as

    Internet Protocol (IP) packets over a packet-switched network. On the receiving side, similar steps

    (usually in the reverse order) such as reception of the IP packets, decoding of the packets and

    digital-to-analog conversion reproduce the original voice stream. Even though IP Telephony and

    VoIP are terms that are used interchangeably, they are actually different. IP telephony has to do

    with digital telephony systems that use IP protocols for voice communication, while VoIP is

    actually a subset of IP Telephony. VoIP is a technology used by IP telephony as a means of

    transporting phone calls. Early providers of voice over IP services offered business models (and

    technical solutions) that mirrored the architecture of the legacy telephone network. Second

    generation providers, such as Skype have built closed networks for private user bases, offering the

    benefit of free calls and convenience, while denying their users the ability to call out to other

    networks. This has severely limited the ability of users to mix-and-match third-party hardware and

    software. Third generation providers, such as Google Talk have adopted the concept of Federated

    VoIP, which is a complete departure from the architecture of the legacy networks. These

    solutions typically allow arbitrary and dynamic interconnection between any two domains on the

    Internet whenever a user wishes to place a call. VoIP systems employ session control protocols to

    control the set-up and tear-down of calls as well as audio codecs which encode speech allowing

    transmission over an IP network as digital audio via an audio stream. The choice of codec varies

    between different implementations of VoIP depending on application requirements and network

    bandwidth; some implementations rely on narrowband and compressed speech, while others

    support high fidelity stereo codecs. Some popular codecs include u-law and a-law versions of

    G.711, G.722 which is a high-fidelity codec marketed as HD Voice by Polycom, a popular open

    source voice codec known as iLBC, a codec that only uses 8 kbit/s each way called G.729, and

    many others. VoIP is available on many smartphones and Internet devices so that users of portable

    devices that are not phones, may place calls or send SMS text messages over 3G or Wi-Fi.

  • 8/10/2019 VoIP Using WiFi P2P

    11/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    4

    Figure 2.1 Voice over Internet Protocol

    2.1 Benefits of VoIP

    Businesses are rapidly to VoIP because there are compelling advantages.

    Firstly, and most obviously, there are significant financial savings on running the network itself.One infrastructure carrying both data and voice, provided by one supplier, can be managed,

    maintained and upgraded much more efficiently than two separate networks for voice and data.

    Secondly, and more importantly, while each network has its own value, that value is maximised

    when the two systems are consolidated. Computer applications and communications technologies

    can be intelligently linked to streamline the working environment.

    Thirdly, VoIP allows organisations to integrate their telephone, fax, e-mail and other applications

    to capitalise on the benefits of unified messaging. Such a system can eradicate unnecessary

  • 8/10/2019 VoIP Using WiFi P2P

    12/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    5

    interruptions while ensuring individuals always receive information in the most convenient format

    wherever they are in the world.

    Fourthly, the system can be used to support flexible working practices, whereby members of staff

    work from home or in dispersed, 'virtual' teams. Using the VoIP network, team members can see

    when their colleagues are logged on to the LAN or using the telephone. VoIP offers improved

    bandwidth capabilities and makes video-conferencing a viable and cost-effective option for

    discussions between dispersed team workers.

    Fifthly, VoIP technology can contribute to an effective knowledge management strategy. The

    larger the organisation, the more information that must be shared, so an efficient communications

    system is particularly important. The VoIP network provides individuals with the opportunity to

    tap into colleagues' areas of specialism, allowing them to search for experts according to specific

    criteria.

    Sixthly, an organisation can also use VoIP to enhance relationships with its customers. For

    example, converged call centres, or 'IP contact centres', allow agents to answer all customer

    enquiry mediums, including telephone, e-mail, fax, web call back, web chat and instant

    messaging. Customers appreciate the flexibility of interacting with an organisation that can handle

    feedback from a range of different sources, and are even more inclined to do business with those

    who can offer an integrated response.

    To summarize: VoIP networks provide cheaper means of carrying voice but more importantly

    provide a much enhanced range of services. As an OECD paper of December 2001 put it: "The

    potential for IP-based voice as a cheaper alternative to traditional telephony is considered to be

    less important than the opportunity for the integration of voice in new IP-based applications that

    are considered drivers for broadband services".

    Increasingly, residential consumers too are taking up the option of VoIP services. For them, such

    services offer:

    More choice of voice operators and tariff packages

    Cheaper services including possibility of 'free' calls

    New services such as conferencing

    Innovative services to be announced

    A compelling reason to subscribe to broadband

  • 8/10/2019 VoIP Using WiFi P2P

    13/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    6

    2.2 The Obstacles to Voice over IP

    For new entrants, the main obstacle has been the lack of availability of investment capital as a

    result of the collapse in the dot com boom and the lack of favour in which the telecommunications

    industry has been held by analysts and investors. However, there is now a slow recovery inconfidence and capital availability.

    For traditional telcos, the obstacles to investing in VoIP have been the massive sunk costs in

    legacy networks, the high initial capital costs in creating new networks, and the lack of

    implementation of gateway protocols to allow integration of VoIP with legacy systems. However,

    incumbents now face increasing competition from rival carriers and the protocol issues are largely

    resolved.

    For business customers, in the past, IP telephony has been plagued by doubts over line quality by

    end users and concerns about relying on one network (instead of deploying dedicated voice and

    data networks). However, these problems are now diminishing, as a result of improved technology

    and greater investment in in-house systems. The major remaining problem is the much greater

    cost of handsets.

    For most domestic customers, VoIP currently means using a pair of lightweight headphones with

    a PC to make and receive calls at nil cost even if these calls - as is usually the case - are

    international. However, it is already possible to make VoIP calls over a traditional analogue

    telephone provided one has a special adaptor connected to an ASDL or cable broadband service.

    In future, residential customers will obtain VoIP packaged as a standard item with their broadband

    provision.

    However, a major unknown is how quickly and how comprehensively broadband will penetrate

    the consumer market. In both the UK and the USA, there is evidence of a trailing off in the take-

    up of narrowband services at around the 55-60% penetration level so that, even if everynarrowband customer up-graded to broadband, a sizeable proportion of the population could not

    avail itself of services like VoIP.

    Furthermore, in the residential context, there are a few special problems with VoIP such as

    ensuring a secure emergency call service, since VoIP requires mains supply and uses equipment -

    such as an adaptor or PC - that may not be wholly reliable. However, since most homes now have

    at least one mobile, this may prove not to be a significant deterrent.

  • 8/10/2019 VoIP Using WiFi P2P

    14/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    7

    2.3 VoIP using Wi-Fi

    VoIP is the technology that allows the transmission of audio files by transmitting them into data

    packets across the Internet. By integrating Wireless and VoIP a new generation of audio

    telecommunications has been birthed. By having a VoIP service and a wireless connection, youcan enjoy the best of both worlds- wireless VoIP connections. Wireless networks are activated by

    what is known as a hotspot. A hotspot is an area where there is an access point. Wireless

    connections are basically created by radio signals. An access point is where the network has

    established their main signal. It is possible for wireless users to basically jump from hotspot to

    hotspot and utilize various networks access points. The combination of Wireless and VoIP has led

    to the invention - VoWi-Fi technology. VoWi-Fi stands for Voice over Wireless Fidelity. Many

    people are choosing the freedom that is offered by VoIP. VoIP can offer nearly free or free long

    distance phone calls.

    Figure 2.2 Voice over Wi-Fi

    Since VoWi-Fi operates from hotspot to hotspot or network-to-network, you may think that there

    are roaming charges involved. There are no roaming charges involved with VoIP. So you can take

    your VoWi-Fi phone from hotspot to hotspot, maintaining your connection (provided you easilygo from hotspot to hotspot) absolutely free.

  • 8/10/2019 VoIP Using WiFi P2P

    15/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    8

    3 PEER TO PEER NETWORK

    Peer-to-peer is a communications model in which each party has the same capabilities and either

    party can initiate a communication session. Other models with which it might be contrasted

    include theclient/server model and themaster/slave model. In some cases, peer-to-peercommunications is implemented by giving each communication node both server and client

    capabilities. In recent usage, peer-to-peer has come to describe applications in which users can use

    the Internet to exchange files with each other directly or through a mediating server.

    IBM's Advanced Peer-to-Peer Networking (APPN) is an example of a product that supports the

    peer-to-peer communication model.

    On the Internet, peer-to-peer (referred to as P2P) is a type of transient Internet network that

    allows a group of computer users with the same networking program to connect with each other

    and directly access files from one another's hard drives.Napster andGnutella are examples of this

    kind of peer-to-peer software. Major producers of content, including record companies, have

    shown their concern about what they consider illegal sharing of copyrighted content by suing

    some P2P users.

    Meanwhile, corporations are looking at the advantages of using P2P as a way for employees to

    share files without the expense involved in maintaining a centralized server and as a way for

    businesses to exchange information with each other directly.

    http://searchnetworking.techtarget.com/definition/client-serverhttp://searchnetworking.techtarget.com/definition/master-slavehttp://searchcio.techtarget.com/definition/Napsterhttp://whatis.techtarget.com/definition/Gnutellahttp://whatis.techtarget.com/definition/Gnutellahttp://searchcio.techtarget.com/definition/Napsterhttp://searchnetworking.techtarget.com/definition/master-slavehttp://searchnetworking.techtarget.com/definition/client-server
  • 8/10/2019 VoIP Using WiFi P2P

    16/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    9

    Figure 3.1 Peer to Peer Network

    3.1 How Does a Peer to Peer Network Work?

    The user must first download and execute a peer-to-peer networking program. (Gnutellanet is

    currently one of the most popular of these decentralized P2P programs because it allows users to

    exchange all types of files.) After launching the program, the user enters the IP address of another

    computer belonging to the network. (Typically, the Web page where the user got the download

    will list several IP addresses as places to begin). Once the computer finds another network

    member on-line, it will connect to that user's connection (who has gotten their IP address from

    another user's connection and so on).

    Users can choose how many member connections to seek at one time and determine which files

    they wish to share or password protect.

  • 8/10/2019 VoIP Using WiFi P2P

    17/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    10

    4 MOBILE CALL USING Wi-Fi TELEPHONY

    Wi-Fi telephony, also known as Voice over wireless LAN (VoWLAN), delivers the all the

    capabilities and functionality of the enterprise telephone system in a mobile handset. The Wi-Fi

    phone is a WLAN client device, sharing the same wireless network as laptops and PDAs. Thehandset is functionally equivalent to a wired desk phone, giving end-users all the features they are

    used to having in a wired office phone. The benefits of VoWLAN can result in substantial cost

    savings over other wireless technologies by leveraging the Wi-Fi infrastructure and by eliminating

    recurring charges associated with the use of public cellular networks. For end users, VoWLAN

    enables employee mobility, resulting in increased responsiveness and productivity.

    Wi-Fi telephony is the upcoming technology that can be set up on existing enterprise Wi-Fi

    network and empowers enterprises with voice mobility benefits in an easy, scalable and cost-

    effective way. Increased deployment of superior Wi-Fi networks to achieve wireless data access

    and increased adoption of VoIP technologies to make cost-effective calls has led the concept of

    Wi-Fi telephony to emerge in the recent years. With Wi-Fi telephony in place, voice mobility can

    be achieved in an easy to use and inexpensive way. Voice mobility in general refers to flexibility

    for users to make telephone calls from any place within a premise. Enterprise premises

    empowered with voice mobility have more productive employees, increased employee

    convenience and improved business process resulting in faster decision making, increasedresponsiveness and greater overall productivity and efficiency.

    First, as described in the previous section, using Wi-Fi technology will allow mobile phones to

    communicate to each other at no cost compare to GSM technology where high charge is applied.

    In order to support voice call over mobile phones using Wi-Fi seamlessly without affecting the

    user normal behavior in making a call to any mobile phone, a new novel technique has been

    invented in this paper as described in Figure 4.1.

  • 8/10/2019 VoIP Using WiFi P2P

    18/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    11

    Check if

    IPM2

    connected

    to IPAP

    Yes

    No

    Yes Yes

    NoNo

    Yes

    No

    No

    Figure 4.1 Using Wi-Fi P2P and AP to establish call between mobile phones in addition to GSM

    In this figure, if mobile user (M1) is willing to make a call to other mobile user (M2), the

    invented algorithm will convert both mobile numbers to 2 unique IP numbers using IPv6. Then

    M1 will try to establish a P2P call to M2 using the mapped IP to Mobile ( IPM1, IPM2). If M2

    is within the range of Wi-Fi of M1, then a virtual connection will be established between M1

    and M2, and then M2 will convert IPM1 to M1and make the ring by showing the calling number

    M1 call M2

    Can IPM1

    have P2P

    toIPM2

    Is IPM1

    connected

    to IPAP

    M1 pop up msg to

    user to use GSM to

    call M2

    Is answer

    Yes

    M1 establish virtual

    connection to M2

    using ( IPM1, IPM2)

    At M2 M1=IptToMob

    ( IPM1)

    Ring(display M1)

    M1 establish virtual

    connection to M2

    through AP using

    (IPM1, IPM2, IPAP)

    M1 establish connection

    to m2 through GSM

    If accept call M1 will

    have conversation

    with M2

    Deny call

    IPM2=MobToIp(M2)

    IPM1=MobToI (M1)

  • 8/10/2019 VoIP Using WiFi P2P

    19/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    12

    coming from M1. If user of M2 accepts the call, M1 and M2 will be able to communicate to

    each other using voice over IP. However, if M2 is far from M1, then M1 will try to see if M2 is

    connected to close AP within the same range of M1. If both M1 and M2 are connected through

    AP, then M1 and M2 will establish a virtual connection using ( IPM1 , IPAP, IPM2 ). Then if

    user of M2 accepts the call, M1 and M2 will be able to communicate to each other using voice

    over IP. However, if M1 and M2 are not covered by any Wi-Fi network, a message will be

    popped up to user of M1 asking if he/she is willing to continue the call through GSM or other

    wireless network. Then the user would have the choice to carry on or cancel the call. As it was

    described in the previous section, Wi-Fi would require the mapping of mobile number to a

    unique IP address, and vice versa. The algorithm described in this paper would allow the

    mapping without the need for storing this mapping since it will convert mobile number to

    unique IP and unique IP to mobile number. This algorithm needs to be applied to all mobileswishing to use this technique. It is very clear that the new technique using Wi-Fi would allow

    users to make a voice call through mobile phone at no cost.

    Figure 4.2 P2P Ad hoc technique using WI-FI between mobile phones and wireless laptops

  • 8/10/2019 VoIP Using WiFi P2P

    20/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    13

    WLAN connection using Wi-Fi is during a voice call session to particular IP address. A virtual

    circuit is created. A users microphone device becomes a client to the other users spe aker

    device and vice-versa. This way there can be simultaneous dialogue.

    Figure 4.2 shows the use of Wi-Fi over P2Pconnection between 2 mobile phones as well as 2

    wireless laptops to making voice call. This P2P connection is based on unique IP address linked

    to the mobile number, where user would be able to call other mobile phone using its mobile

    number or through browsing the phone list. In order for this P2P to work using a unique IP

    address, the invented algorithm described in this paper has to be executed at both mobiles to

    convert mobile number into unique IP address and to do the other conversion from IP to mobile

    number needed for displaying the calling number on the mobile phone.

    4.1

    Modules

    A module specifies the functionality of the system. Each Module describes some specific task of

    the system. Generally software is made up of the different modules. This project divided into

    following modules:

    4.1.1 Enable Wi-Fi

    When the Wi-Fi supported mobile will come into Wi-Fi region then we have to enable Wi-Fi of

    that mobile. At that time IP address is generated from mobile number by using novel algorithm.

    That IP address is assigned to that mobile.

    4.1.2 Call

    When caller dials the number (mobile number of receiver), at that time IP address is generated

    from dialled number and the broad cast request for connection.

    4.1.3 Search

    For connection different searches are used. Initially caller mobile will search receiver mobile is

    present in Wi-Fi region directly. If receiver is not found in that region then it will take the help of

    AP (access point). With the help of AP the caller mobile will search receiver mobile. If in both

    cases receiver mobile is not found then system provides GSM option for connection.

    4.1.4 Display Number on Screen

    When the receiver mobile is found then at receiver side source number is displayed on the screen

    with ring. That source number is generated from source IP address using novel algorithm. Novelalgorithm is used for convert mobile number into IP address and IP address into mobile number.

  • 8/10/2019 VoIP Using WiFi P2P

    21/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    14

    4.1.5 Provide GSM option

    If receiver mobile is not found within Wi-Fi directly or with the help of AP then this new option is

    provided to the caller. This is provided for call as like the way of tradition call. In that call method

    charges are applied by GSM services provider. This option is enabled means receiver is not within

    the sources Wi-Fi network.

    4.1.6 Connection

    If receiver mobile is found to caller then number is displayed on the receiver screen then receiver

    mobile user has options like accept call or reject call. If he accept the call then the connection will

    established between caller and receiver mobile. If that connection within Wi-Fi network then it is

    free of cost communication and if it is using GSM service then charges are applied by GSM

    service provider.

    4.1.7 Reject Call

    Reject call means break connection or avoid connection. When phone rings and call is rejected

    means connection is not established and when call is rejected while the communication is going

    on is the break in connection. Connection can be closed by either side as caller or receiver side.

  • 8/10/2019 VoIP Using WiFi P2P

    22/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    15

    5 BUILDING THE APPLICATION

    The application can be developed using any programming language that supports Peer to Peer

    connection but Java is recommended as it can be implemented on almost every mobile platform

    such as Android, J2ME etc. The application contains two major programs which establishconnection between the devices.

    5.1 The Server Program

    The role of the server is to coordinates all the activities of the clients in such a way that the clients

    interact as fast and efficient as possible. The Server should implement a minimal GUI to give

    feedback on client activities. The server will accept connections from multiple clients, but multi-

    threading is not necessary. When a client terminates its connection, it should be done in a cleanfashion where the server operations are not disrupted. With voice calls, the servers only role is to

    check and see if the requested user is still active, and then to initiate the session. All further

    communication between the two users are handled by the client programs. Users should also be

    able to send text messages and these should be correctly displayed by the receiving clients.

    Figure 5.1 A Server Program Running on Netbeans IDE

  • 8/10/2019 VoIP Using WiFi P2P

    23/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    16

    5.2 The Client Program

    The role of the client is to interface with the user, translate requested operations, and interact with

    the server. It is essential for the client to have a GUI, to act as an interface for the user. Clients

    may initiate voice calls to other clients by having the user give a call command and a host nameto call to. Voice communications, between clients are direct, without any server interference. The

    server should merely act as a proxy and look-up service, assisting clients in making the

    connections. Text communications should also be possible. Voice communications should occur

    in real-time.

    Figure 5.2 A Client Program running on Netbeans IDE

  • 8/10/2019 VoIP Using WiFi P2P

    24/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    17

    6 MOBILE IP COVERSION ALGORITHM

    A software solution was developed in order to convert mobile numbers to IP addresses and vice

    versa. In this program development, it is possible to map the mobile numbers to a valid IPv6

    address, and therefore there is no need for DNS lookup. In addition, there is no need forcomplicated hashing and addressing protocols because the IP-to-Mobile algorithm would produce

    a unique number used as input, leading to a unique output hexadecimal IPv6 address. The

    outputted address is then allocated to private IP within a specified range in order not to conflict

    with other devices in the same wireless range.

    6.1 Traditional Hashing Algorithm for IP

    ( )

    N is the size of IP range, which should be a prime number larger than our range in order to assure

    good performance for the algorithm. Consider every IP address as a quadruple of integers modulo

    N which in IP addresses are 32-bit which quadruple 8- bit. We can define function H for hashing

    of number mod N, and fix any four coefficients such that

    ( ) [11]

    6.2

    Mobile to IP Conversion Algorithm

    This algorithm will map any mobile number to a unique IPv6 address,

    where X10 is {x |1,000,000,000 x 9,999,999,999) base 10 decimal integer and the function f(x)

    converts X base10 to X base 16 Hexadecimal integer with range { x|3B9ACA00

    x2540BE3FF}as defined in the pseudo code of MobToIP.

    function MobToIp(String number)

    //Input: String representation of phone number

    //Output: IPv6

    String ip"" String hex""

    //character array of 16 hexadecimal group of 4 hexadecimal octets, and all initialized to zero and

    separated by":"

  • 8/10/2019 VoIP Using WiFi P2P

    25/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    18

    ipArray ['0','0','0','0',':',.....,':','0','0','0','0']

    /* read mobile number and store it in charArray, where each digit of the mobile number is

    represented by one equivalent hex digit. Eg charArray [ ] = readMobNum(9897345112), then

    char Array[9,8,9,7,3,4,5,1,1,2] */

    char Array[ ] =readMobNum(calledNumber)

    /*Initialize Integers counter variables for loop

    Integer i0;

    Integer k0;

    Loop

    {

    if ipArray[k]=0

    {

    ipArray[k]=charArray[i]

    ii+1

    }

    if ipArray[k]=":"

    {

    ipArray[k+1]=charArray[i]

    }

    kk+1

    }

    While( i

  • 8/10/2019 VoIP Using WiFi P2P

    26/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    19

    hexBufferipArray[c] cc+1

    }

    iphexBuffer return ip

    End function

    6.3 IP to Mobile Conversion Algorithm

    This algorithm would do the reverse of Mobile-to-IP algorithm to convert unique IPv6 into

    mobile number, where X16 is {x|3B9ACA00 x 2540BE3FF} base 16 hexadecimal integer and

    the function g(x) converts X base16 from to X base10 decimal integer with range X10 is

    {x|1,000,000,000 x 9,999,999,999} as defined in the pseudo code of IpToMob.

    function IpToMob(String IP)

    /*Input: IPv6

    /*Output: String representation of phone number

    /*Initialize local String variables to empty Strings

    String string1, string2, string3""

    String output""

    charArray will be set to input ip value charArray ip

    /*String buffer object firstBuffer new buffer object

    Integer loop counter i0

    Loop For i< length of charArray

    {

    firstBuffercharArray[i] increment ii+1

    }

    /*reverse order of string buffer elements of firstBuffer

    string1 firstBuffer reverse

    /*Character Array charArray2 will contain values of string 1

  • 8/10/2019 VoIP Using WiFi P2P

    27/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    20

    charArray2 string1

    /*loop replace trailing zeros with "*"

    Integer loop counter c0

    Loop For c

  • 8/10/2019 VoIP Using WiFi P2P

    28/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    21

    character array charArray3 string2

    Integer loop counter k0

    Loop For klength of charArray3

    {

    if charArray3[k]!='*'

    {

    string3string3+charArray3[k]

    }

    }

    End for loop

    character array charArray4 string3

    Integer loop counter a0

    Loop For a

  • 8/10/2019 VoIP Using WiFi P2P

    29/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    22

    alteration in compilation and versioning. J2ME is robust, scalable, and secure platform for mobile

    phones, personal digital assistants, and embedded devices. J2ME contains TCP/IP networking and

    GUI APIs along with other packages that will allow reliable development mobile applications.

    The utilization of native platform dependent code maybe needed in order to automatically change

    IP addresses within the phones operating system without user interaction. At this stage

    implementation covers the conversion of mobile number to IPv6 address and the reverse

    conversion of IPv6 address into mobile number. A Java program for the conversion from mobile

    to IPv6 and from IPv6 to mobile has been done and proven the correctness of the algorithms.

    Where, a user would enter the mobile number which will be converted to a unique IPv6. The other

    IPv6 to mobile algorithm allows user to enter IPv6 in hex and then it will convert it to mobile

    number. In the future a complete program will be developed to establish a P2P connection or a

    virtual connection over AP in order to allow the 2 mobile phones to communicate to each otherover Wi-Fi technology at no cost.

  • 8/10/2019 VoIP Using WiFi P2P

    30/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    23

    7 CONCLUSION

    Voice over Wi-Fi telephony is a challenging research topic. In this paper a novel architecture

    has been proposed and a novel algorithm has been developed to support IP to Mobile

    number conversion. The system is transparent to the user, where a user needs only to dial the

    required phone number the same way of using the normal mobile phone. Following the mobile

    conversion to IPv6, the software applied at the mobile phone will try to establish P2P

    connection to the dialled mobile phone using the same algorithm.

    If no P2P connection can be made, then the calling mobile phone will check if virtual

    connection can be possible through AP using the same mechanism in P2P to establish

    communication channel with the called mobile phone. If no wireless connection using Wi-Fi is

    possible between the 2 mobile phones, then a message would be displayed on the calling mobile

    phone notifying its user to proceed with the call using GSM technology or abort the call.

    The IP collision problem for mapping mobile to IP has been avoided since there is a unique

    mapping resulting in a unique IP for each mobile number. The work presented in this paper is

    a first step for developing a P2P voice to voice communication between 2 mobile users using

    the Wi-Fi network which is based on 10 mobile digit numbers. Future work will focus of the

    development of automated algorithm to develop IP collision avoidance and correction for

    large mobile digit numbers.

    Furthermore, a complete solution to establish communication channel between 2 mobile phones

    using P2P or through AP, and optional GSM will be developed. In addition, the release of the

    voice API by the giant mobile manufacturers will enable future complete working system

    based on the architecture initiated by this research work.

  • 8/10/2019 VoIP Using WiFi P2P

    31/31

    Voice over IP Mobile Telephony Using Wi-Fi P2P

    REFERENCES

    [1] Ghassan Kbar , Wathiq Mansoor , Aryan Naim, Voice OverIP mobile telephony using

    Wi-Fi P2P , 2010 Sixth International Conference on Wireless and Mobile

    Communications.[2] B. Regis J, and D. W. Gregory, Voice and Data Communication, 4rth ed. California,

    Berkeley: McGraw Hill, 2001.

    [3] F. Borko, and M. Ilyas, Wireless Internet Handbook Technology, Standards, and

    Applications, 1st ed.NY, New York: McGraw Hill, 2000.

    [4] O. Tammer, and P. Valduriez, Principles of Distributed Database Systems, 2nd ed. New

    Jersey: Prentice Hall, 1999.

    [5] C. Douglas, Internetworking with TCP/IP Volume 1 : Principles, Protocols, andArchitecture, 3rd. Upper Saddle River, NJ: Prentice Hall International, 1995.

    [6] Hac, and Anna, Mobile Telecommunication Protocols for Data Networks, 1st. London:

    John Wiley & Sons LTD, 2000.

    [7] J. Distefane, and A. Ronan, Guide To Wireless Enterprise Application Architecture, 1st

    ed. NY, New York: John Wiley & Sons Inc, 2002.

    [8] S. Gast, and Mathew, 802.11 Wireless Networks the

    Definitive Guide, 1st. California: Orielly, 2000.[9] William Lee, Wireless and Cellular Telecommunications. 3rd, New York, NY: McGraw

    Hill, 2006.

    [10] Taylor D. Edgar, TCP/IP Complete, 1st. New Jersey: McGraw Hill, 1998.

    [11] A. Forouzan Behrouz, TCP/IP Protocol Suite, 3rd. NY: McGraw Hill, 2006.

    [12] D. Sanjoy, C. Papadimitriou, and U. Vazirani, Algorithms, 1st. New York: McGraw

    Hill,

    2008.[13] Yuan Michael, Enterprise J2ME: Developing Mobile Java Applications, 1st. Upper

    Saddle River, NJ: Prentice Hall, 2004.

    [14] GSM, http://www.gsmworld.com/technology/gsm/index.htm

    [15] Wi-Fi IEEE 802.11, http://www.wi-finotes.com/IEEE802.11.html