560 likes | 877 Views
Introduction to VoIP. Dr. Adeel Akram Telecommunication Engineering Department UET Taxila. Course Outline. PSTN Voice over IP Technology IP Signaling Protocols VoIP Applications and Services Asterisk PBX Case Study/Term Paper/Research Proposal. Text Book.
E N D
Introduction to VoIP Dr. Adeel Akram Telecommunication Engineering Department UET Taxila
Course Outline • PSTN • Voice over IP Technology • IP Signaling Protocols • VoIP Applications and Services • Asterisk PBX • Case Study/Term Paper/Research Proposal
Text Book • Voice over IP Fundamentals by Jonathan Davidson; James Peters; Manoj Bhatia; Satish Kalidindi; Sudipto Mukherjee • ISBN-10: 1-58705-257-1
Course Website • IP Telephony and Voice over IP Course Website • http://web.uettaxila.edu.pk/CMS/SP2010/teVOIPms will publish • Lecture Notes • Quiz Marks • Assignments • Attendance Record • Web Links • Related Software • Email: adeel@uettaxila.edu.pk
Introduction to VoIP • Classic Telephony • Data Networks(Review) • VoIP • What it is • Protocols • Hardware • Software • Examples • Web Links
Classic Telephony in 1 slide • Classic Telephony • Calls happen by electro-mechanical manipulation of voltage levels between the telco network and end-user phones. • voice “payload” and transport signals must be sent together over the same line/circuit. • “Modern” equipment is electronic, but must work w/older equipment. • This makes upgrades and enhancements difficult and expensive.
VoIP in 1 slide • Manipulate bits not volts • everything can now happen inside a PC • Can be all-digital or a mix of digital and analog equipment • Telephone Company not required • Can use low-power, commodity hardware instead of expensive, dedicated gear
Introduction to VoIP • Review of TCP/IP • VoIP protocols • H323 • SIP • VoIP hardware
TCP/IP Review • 4-layer stack • Packet-switched • Error correcting • Reliable delivery • Designed in 1960s/1970s for use over slow, unreliable analog phone networks • Application layer is the key to VoIP and other commonly used protocols
VoIP • Uses formal protocol suites to provide: • Call routing, forwarding, voicemail, etc. • Compatibility w/ legacy PSTN/POTS systems • Quality of Service(QOS) • Done mostly w/ software • Can still do point-to-point calls
Benefits of VoIP • It’s all just bits. • VoIP is just another application running over a data network(usually TCP/IP) • Service expansion/integration often just a matter of writing the code, not tearing down a switching center • Per-call costs very low, often free • Equipment is often commodity priced
VoIP Concerns • Regulatory issues • Tax revenue issues • Market exploitation and control • Quality & Reliability of Infrastructure
VoIP Protocols • H.323 : ITU standard, uses ASN.1 (Abstract Syntax Notation 1) • SIP : IETF RFC 2543, HTTP-like headers • SCCP : “Skinny”: Cisco proprietary protocol • MGCP : Media Gateway Control protocol • IAX : Inter-Asterisk eXchange protocol : Native to Asterisk PBX • Skype: Proprietary protocol based on Kazaa • Others
H.323 • Specification defined by ITU • Wide support among all telecom providers & manufacturers all over the world • Industry moving away from using it in new products • Meant to provide gateway for telephony devices into the PSTN
SIP • “Session Initiation Protocol” • Designed by Cisco Systems, Inc. • Stand-alone computer-to-computer protocol • Does not presume a PSTN • Calls routed/managed by a SIP Server • No real “official” version, so there are lots of different implementations. • Dominant open VoIP protocol
Protocol Details • Most VoIP protocols split signaling from voice data, unlike POTS • Potential firewall issues • QOS/capacity checked before calls are initiated
RTP • RTP: Real-time Transport Protocol • RTP is ITU standard H.225.0 and is also IETF RFC 1889 • Used by both H.323 and SIP • Similar approaches used by other protocols • Essentially time-stamped UDP packets • Connects between dynamically negotiated port numbers • RTP and NAT/PAT do not mix well !!!
VoIP Hardware • Media Gateways • Telephone adapters • Handsets • Soft-switch/PBX • (Much of this can actually be done on a PC)
Media Gateway • The media gateway provides the necessary interface for transporting voice content over the IP network and is the source of the VoIP traffic. • Provides a bridge between VoIP networks and the PSTN • Gateway and Gatekeeper are used interchangeably
Media Gateway • Media gateway features and services can include some or all of the following: • Trunking gateways that interface between the PSTN network and a VoIP network. Such gateways typically manage a large number of digital circuits. • Cable modem/cable set-top boxes, xDSL devices, broadband wireless devices and other residential gateways that provide a traditional analog interface to a VoIP network. • Small-scale (enterprise) VoIP gateways and other access media gateways that provide a traditional analog or digital PBX interface to a VoIP network.
Analog Telephone Adapter • Lets you use regular phone on VoIP network • Avoid dedicated or “locked” adapters if possible • $40-200 US
VoIP Phones • (Really an embedded computer with VoIP client software) • Ethernet or wireless (802.11b) • $120-300
VoIP Phones • USB Phones(“Skype phones”) • Much simpler, much less expensive ($40-90 US)
Softphones • Telephony functions completely in software • Run on desktop, laptop and embedded systems. • Some common softphone clients • SJPhone • Xlite • Kphone • OhPhone
VoIP Networks • PSTN Telephony • PC-to-PC • Converged Networks • VoIP-based POTS replacement • VoIP PBX using Asterisk
How Telephone Network Works • PSTN: Public Switched Telephone Network • E.164: ITU standard for “phone numbers” • DTMF: Dual-Tone Multi-Frequency “touch tones”
How Telephone Network Works • PBX: Private Branch Exchange • Manages calls into and out of organization • Does phone number translation • ISDN: Integrated Services Digital Network • BRI: Basic Rate, 2 * 64Kbps data channels • PRI: Primary Rate, 2Mbps (E1)
How VoIP Works/IP to IP Telephony • All VoIP protocols operate in a similar fashion • Control channel • to set up a call • Media channels • to carry encoded voice data • Similar approach to FTP • Lots of protocols for control and media channels
Converged Network • Converged networking defines a network that has sufficient resources to pass data and voice traffic simultaneously
Asterisk • Open Source GPL-Licensed PBX • Runs under most popular versions of UNIX (Linux, BSD, OS X) • Can replace a traditional office PBX • Supports soft phones, SIP handsets, wireless phones, etc.
Asterisk • Open Source PBX project, in existence since 1999 • Available on Linux, OS X, Windows • Supports SIP, H.323, H.264, IAX protocols • Can route PC-to-PC, PC-to-PSTN, PSTN-to-PSTN calls • Scriptable/Programmable
Asterisk Applications • Actions are really applications/programs • Dial(), Playback(),Voicemail() • Custom applications can be written using AGI, “Asterisk Gateway Interface” • Support for Perl, Python, C, etc. • Uses Linux stdio to pass data between external applications and Asterisk
Voice CODECs • A CODEC(enCOder/DECoder) is a method or algorithm for processing analog audio signals in a digital data stream • Most commonly used for processing audio data sent over a network but can be streamed from a file
Configuration Issues on IP Networks • SIP-registration/setup on port 5060/5061 • H.323 defaults to ports 1718/1719 • IAX registration defaults to 4559 • Typically runs into problems with multiple NAT layers
PC to PC VoIP Network • How to locate the other phone? • Static configuration is possible — but doesn’t scale • In H.323 a directory server is commonly used • In SIP a proxy server can provide directory services via redirection
SIP Proxy • Another common SIP proxy approach • Proxy in the middle of all control communication • Note how media channels still flow directly
VoIP and Firewalls • VoIP control channel is usually a single well known port • H.323: TCP and UDP 1720 • SIP: TCP and UDP 5060 • Other ports can be used as the port number included in the protocol addresses • Media channels are dynamically negotiated, often within a wide range of ports • Assumes the “end to end” Internet • Can lead to “one way audio”
The Challenge of NAT/PAT • Control channel can usually be NAT’d through firewall okay • But media channel is challenging • Because dynamic port negotiation includes IP addresses • Meaningless outside the LAN if using RFC 1918 addresses (Private) • Typical symptom is “one way audio” • If both ends have the problem then no audio will be heard • This is a moderately common issue with FTP as well, but there is better firewall support for FTP
NAT/PAT solutions • Using a protocol aware firewall • For Linux, sip-conntrack-nat: http://www.iptel.org/sipalg/(Alpha test code; in iptables Patch-o-Matic) • For Linux, h323-conntrack-nat:http://max.kellermann.name/projects/netfilter/h323.html(Alpha test code; in iptables Patch-o-Matic) • Using an application level media proxy • For Linux, Asterisk: http://www.asterisk.org/ • Or siproxd: http://siproxd.sourceforge.net/ • Or for H.323: OpenH323Proxy:http://openh323proxy.sourceforge.net/ • Or for H.323: GnuGK or OpenH323GK: http://www.gnugk.org
NAT/PAT Solutions • STUN: IETF RFC 3489: Simple Traversal of UDP through NAT • Tunneling in unfiltered, globally unique, IP address • Using vtun or another VPN • Will need to do policy routing to send traffic from those IP addresses and back out of the tunnel • Linux: use iproute2 to route based on the source address range(http://lartc.org/howto/lartc.rpdb.html)
Web Links: Open Source VoIP Projects • Asterisk(SIP-based PBX) • www.asterisk.org • AstLinux • www.astlinux.org • OpenH323(H.323) • www.openh323.org • SJ Phone • www.sjlabs.com • Xlite • www.counterpath.com • Mesh Network Hardware • www.belairnetworks.com
Questions • ????