RTMM, VoIP, VVoIP, NGN, Convergence?

Slides:



Advertisements
Similar presentations
NETW-250 Troubleshooting Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Advertisements

July 20, 2000H.323/SIP1 Interworking Between SIP/SDP and H.323 Agenda Compare SIP/H.323 Problems in interworking Possible solutions Conclusion Q/A Kundan.
Voice over IP Fundamentals
Arcturus empower embedded. How To Setup Asterisk On the MCF54451 DRAFT – VERSION 0.5 January 6/08.
 3G is the third generation of tele standards and technology for mobile networking, superseding 2.5G. It is based on the International Telecommunication.
Internet Telephony Helen J. Wang Network Reading Group, Jan 27, 99 Acknowledgement: Jimmy, Bhaskar.
Introduction to SIP Speaker: Min-Hua Yang Advisor: Ho-Ting Wu Date:2005/3/29.
Real-time multimedia and communication in packet networks Asterisk The open source IP PBX.
RTMMoIP Alfredo Terzoli / Mosiuoa Tsietsi. PLAN Defining the softswitchDefining the softswitch An example softswitch: iLangaAn example softswitch: iLanga.
Asterisk & ENUM Extending the Open Source PBX Michael Haberler, IPA Otmar Lendl, nic.at.
AGI + PHP “Making phones jump through fiery hoops of death.” Rob Peck dealnews.com PHP Appalachia 2008.
A gentle introduction to Asterisk Anthony Critelli.
VoIP Study and Implementation VoIP Ecosystem and Strategy Version 1.0 – Author : Marc PYBOURDIN / Julien BERTON Last Update : 15/05/2012.
1 Kommunikatsiooniteenuste arendus IRT0080 Loeng 4 Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
Real-time multimedia and communication in packet networks JAIN SLEE and Mobicents.
1 © NOKIA 1999 FILENAMs.PPT/ DATE / NN SIP Service Architecture Markus Isomäki Nokia Research Center.
Call Control with SIP Brian Elliott, Director of Engineering, NMS.
Applied Communications Technology Voice Over IP (VOIP) nas1, April 2012 How does VOIP work? Why are we interested? What components does it have? What standards.
Session Initiation Protocol (SIP). What is SIP? An application-layer protocol A control (signaling) protocol.
Presented By Team Netgeeks SIP Session Initiation Protocol.
Real-time multimedia and communication in packet networks Asterisk AGI and Manager Interface.
Real-time multimedia and communication in packet networks iLanga.
Omar A. Abouabdalla Network Research Group (USM) SIP – Functionality and Structure of the Protocol SIP – Functionality and Structure of the Protocol By.
Real-time multimedia and communication in packet networks Mobicents Service Delivery Platform.
VoIP Signaling Protocols A signaling protocol is a common language spoken by telephones and call-management servers, the PSTN, and legacy PBX systems as.
Session Initiation Protocol (SIP) Chapter 5 speaker : Wenping Zhang data :
TCP/IP (Transmission Control Protocol / Internet Protocol)
RTMMoIP Alfredo Terzoli / Mosioua Tsietsi. PLAN: tiding up… ENUM: a few more wordsENUM: a few more words B/W calculation for VoIPB/W calculation for VoIP.
CSE5803 Advanced Internet Protocols and Applications (14) Introduction Developed in recent years, for low cost phone calls (long distance in particular).
S Postgraduate Course in Radio Communications. Application Layer Mobility in WLAN Antti Keurulainen,
1 Network Communications A Brief Introduction. 2 Network Communications.
Asterisk PBX. What is Asterisk ? A Full-featured open source (GPL) PBX for  Home users  Small to Medium Business  Enterprise  VoIP Service Providers.
سمینار تخصصی What is PSTN ? (public switched telephone network) تیرماه 1395.
VoIP ALLPPT.com _ Free PowerPoint Templates, Diagrams and Charts.
Web fundamentals: Clients, Servers, and Communication
IP Telephony (VoIP).
Instructor Materials Chapter 5 Providing Network Services
How To Setup Asterisk On the MCF54451
Business and Technical details Mark Spencer
WWW and HTTP King Fahd University of Petroleum & Minerals
CS408/533 Computer Networks Text: William Stallings Data and Computer Communications, 6th edition Chapter 1 - Introduction.
Chapter 5 Network and Transport Layers
Digium | Switchvox Product Announcement
SIX MONTHS INDUSTRIAL TRAINING REPORT
Session Initiation Protocol
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
VOICE AND VIDEO OVER IP VOIP, RTP, RSVP.
The IP-PBX.
Session Initiation Protocol (SIP)
Introduction to Networking
Lecture 6: TCP/IP Networking By: Adal Alashban
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Alfredo Terzoli / Mosioua Tsietsi
Net 431: ADVANCED COMPUTER NETWORKS
Chapter 6: Distributed Applications
Chapter 2 Introduction Application Requirements VS. Transport Services
Where should services reside in Internet Telephony Systems?
CS222 Web Programming Course Outline
Topic 5: Communication and the Internet
Progress leisure OCR GCSE ICT.
Multimedia and Networks
Simulation of Session Initiation Protocol
William Stallings Data and Computer Communications
Applications Layer Functionality & Protocols
SIP Basics Workshop Dennis Baron July 20, 2005.
Chapter 7 Network Applications
VoIP Signaling Protocols Framework
Alfredo Terzoli / Mosioua Tsietsi
Exceptions and networking
Presentation transcript:

RTMM, VoIP, VVoIP, NGN, Convergence? Alfredo Terzoli / Mosioua Tsietsi

PLAN Admin Real time communication today: your experience A bit of terminology The Internet for transport of real-time data An initial smattering of protocols Convergence What do you expect from this module?

Admin Length of each lecture: 1 to 1.5 hours Expected study time, for each lecture: at least 3 hours (this excludes practicals) Schedule: most days of the week, starting at 8:30 or 9:00 Main practical will be the creation of service, which will be presented to the class

Real time communication today Skype (desktop / cell) Gtalk (desktop / cell) MSN Fring (mobile) Yeigo (mobile) … PC to telephone / cellphone Telephone/cellphone to telephone/cellphone

RTMM RealTime MultiMedia: all media, obviously (smell anybody? The power of digitization!) in particular, naturally, voice and video the way we are proceeding we should call it RTMMoIP. (or RTMMoATM?) BTW, how do you conceptualize the Internet?

VoIP/VVoIP Voice/video over the Internet Protocol two classic ways of deploying VoIP, for the enterprise or for the long haul (they can be combined) we will use this term as equivalent to RTMM are we going to talk just about real-time multimedi? Actually not. An important part of the course is to talk about service provision in a converged telecommunication environment

IP to transport voice Can the Internet transport voice? (This is a major change! Up to recently only Telco's have been doing it.) Let’s be more precise: can the INTERNET PROTOCOL be used to transport voice?

Realtime communication Two problems: (easy!) how can a telephone conversation become DATA? does this type of DATA have special requirements?

A conversation becomes DATA

And it is transported…

Another view!

Digitized voice: demanding DATA!

So, is VoIP possible or not? Yes, it is possible, but things do need some work here and there, depending on the setting. Once the stuff is done, though, we will get Video transport almost for free too!

Different settings… Internet LAN

RTP, RVSP, DiffServ, IPv6 RTP: Realtime Transport Protocol (has a companion, RTCP) RSVP: Resource Reservation Protocol DiffServ: Differentiated Services IPv6: IP version 6, the next version of the Internet

(Video) Telephony vs Streaming Real-time communication is the next frontier of the Internet Telephony, Video telephony, Audio and Videoconferencing are more demanding than STREAMING, which has ‘softer’ real-time constraints.

Why VoIP/Convergence? Packet based networks are in general more bandwidth-efficient than legacy voice networks

Why VoIP/Convergence? Much easier to create ‘services’ Services need DATA, and data is much easier to access and distribute if your network is already a data network. Example: create a a service to read end-of-the-year marks to students phoning in (put in at Rhodes in 2002-3 by Jason Penton)

Why VoIP/Convergence? Much easier to extend later to other media Because of digitization, other media can be treated very much in the same way: once digitized, they are just data Example: extend the system to support video. (And let’s not forget smells! ;-)

Typical deployment iLanga Core Local VoIP Endpoints SIP IAX Internet H.323 MGCP Internet Asterisk GnuGK SER iLanga proxy Legacy PBX BRI PRI PSTN BRI PRI iLanga Core

Legacy service provider use TDM network 1 TDM network 2 Asterisk GnuGK iLanga proxy iLanga Core SER Asterisk GnuGK iLanga proxy iLanga Core SER IP Network (Typically not the Internet)

NGN Next Generation Network (replaces and extends IN, the Intelligent Network) telecommunication network, such a Telco network, where service creation is easy and can be done by third parties (that is, not directly by the Telco owning the network) the ‘opening’ of the network is done introducing elements such OSA/Parlay gateways loved by telecommunication engineers!

NGN and Internet The Internet is a good candidate to be the ‘de facto’ realization of a NGN big statement, of course and maybe the Internet is going to change name… to say the least, it won’t be the ‘legacy network’ that NGN will have to carry into the future

Questions?

URLs to follow http://en.wikipedia.org/wiki/Telecommunication_convergence (an overview on convergence in telecommunication and a springboard for many other related topics; in particular, follow up the link http://en.wikipedia.org/wiki/Telecommunication_convergence ) http://www.cs.virginia.edu/~cs757/slidespdf/757-09-overlay.pdf (clear explanation of what an overlay network is) http://www.kcnap.com/whatisanap.html (an idea of interconnection on the Internet: and how the Internet is actually formed, but helps with the idea of an overlay too)

Alfredo Terzoli / Mosioua Tsietsi RTMMoIP Alfredo Terzoli / Mosioua Tsietsi

PLAN Did you read the hand-out? A few important acronyms A call is more than a conversation: signalling! Timeline & general organization

A few acronyms for you to expand PBX TDM PSTN T1 SS7 SIP

Solutions PBX : Private Branch Exchange TDM : Time Division Multiplexing PSTN : Public Switched Telephone Network T1 : Trunk (level) 1 (ok, a bit strange); btw, in SA is normally E1 – 2 Mbps SS7 : Signalling System 7 SIP : Session Initiation Protocol

Legacy service provider use TDM network 1 TDM network 2 Asterisk GnuGK iLanga proxy iLanga Core SER Asterisk GnuGK iLanga proxy iLanga Core SER IP Network (Typically not the Internet)

Enterprise setting iLanga Core Local VoIP Endpoints SIP IAX Internet H.323 MGCP Internet Asterisk GnuGK SER iLanga proxy Legacy PBX BRI PRI PSTN BRI PRI iLanga Core

VoIP signalling protocols SIP: Session Initiation Protocol IETF, Internet Engineering Task Force H.323 ITU, International Telecommunication Union MGCP: Media Gateway Control Protocol - ITU H.248/MEGACO: MEdia GAteway COntrol – ITU / IETF

SIP In a sense the child of SMTP (Simple Mail Transport Protocol) and HTTP (Hyper Text Transfer Protocol) Simple: establishes the session only uses SDP, for the description of the session RTP for the transport of the media

User Agent UAS – server UAS – server UAC – client UAC – client

A simple SIP network

A SIP conversation

Some experiments First, let’s get ourselves a SIP UA besides the one embedded in the telephone: SJphone, www.sjlabs.com (& in the software resources for this module)

Experiments Experiment 1: let’s call directly the hardphone, using its IP address Experiment 2: let’s call the hardphone via iLanga, but without being part of iLanga (btw, this is the way the rest of the world can contact you) Experiment 3: let’s join iLanga and start using the extensions and dialling out to the PSTN

Got a packet sniffer? A good idea not to get bored with networks is to use a packet analyzer If you don’t have one already, use WireShark, http://www.wireshark.org or in the software resources of this module

The INVITE message

Rough timeline First week: general VoIP concepts + SIP your work: reading, playing with SIP UA, analyzing SIP and RTP packets Second week: more SIP + Asterisk your work: reading, experimenting with Asterisk; thinking about a service you want to create Third week: more Asterisk, presentation of your service idea your work: reading, starting putting together your service,

Questions?

Alfredo Terzoli / Mosioua Tsietsi RTMMoIP Alfredo Terzoli / Mosioua Tsietsi

PLAN Getting to know SIP better: essential structure of SIP messages Beyond the single User Agent: more complex SIP networks Have you played with SJPhone? Some thoughts on your ‘telecommunication status’ right now

SIP messages Either a REQUEST or a RESPONSE Uniform structure: Start line Headers (some mandatory, most optional) (optional) Body Request: start line carries a method Response: start line carries a status

User Agents UAS – server UAS – server UAC – client UAC – client Request Response UAC – client UAC – client

Requests/Methods INVITE REGISTER BYE ACK CANCEL INFO

Responses / Status(es) 1xx provisional information 2xx success 3xx redirection 4xx client error 5xx server failure 6xx global failure

Headers Quite a few: To, From, Cseq, Contact, Subject, Via, Accept, Accept-Language, Accept-Encoding, Authorization, Content-Type, Content-Length, Date, Encryption, Expires, Hide, In-Reply-To, Organization, Max-Forwards, etc

Body Not compulsory Typically a description of the session, typically done using SDP, Session Description Protocol BTW, the session description includes what other protocols to use for the actual session. For voice/video session, typically RTP (Real Time Protocol)

While exploring… A very useful resource while making sense of SIP and related protocols is the RFC sourcebook that you can find at http://www.networksorcery.com (folllow the links ‘RFC sourcebook>Protocols’)

Ok, we are ready for some fun! Let’s go checking SIP messages in a UA-to-UA situation, using Ethereal. We won’t be exhaustive in our analysis: SIP is simple, but it is still a full blown protocols for real entities living in a complex environment! Naturally, we will quickly check some of the related protocols (SDP, RTP)

Introducing the server

Types of SIP servers Proxy (as in the previous slide) Redirect Stateful, stateless Redirect Registration

Our SIP server, SER Sip Express Router (sip.ict.ru.ac.za) in our system acts as proxy & registration server, never as a redirect server Open source, large volume Info about it at www.iptel.org

Your telecommunication ‘status’ Your SIP soft/hard phones Internet Asterisk SER iLanga Core Rhodes PBX Telkom

Call through a proxy

Questions?

Alfredo Terzoli / Mosioua Tsietsi RTMMoIP Alfredo Terzoli / Mosioua Tsietsi

A conversation becomes DATA

And it is tranported…

Another view!

VoIP bandwith calculation Let’s get more specific on B/W usage, for AUDIO transmission Two families of CODECS: wave coding unrestricted, any sound (sound engineering) vocoding good for voice, can reach very low bitrates kbps: kilo bits per second (here kilo=1000, not 1024!)

‘Vocoders’ for Videos?

Voice Synthesisers & Vocoders A voice synthesiser includes a vocoder of some type, naturally In fact, using a voice synthesiser one can substantially reduce the bandwidth needed for the transmission of voice. HOW? (BTW, who knows how MIDI works?)

B/W consumption of a few codecs

VoIP bandwith calculation

VoIP bandwith calculation

Bandwidth calculators at: http://www.newport-networks.com/pages/voip-bandwidth-calculator.html (btw, the white paper distributed to you on b/w calculation comes from newport-networks) http://www.packetizer.com/voip/diagnostics/bandcalc.html

Reducing overhead cRTP compact RTP (RFC 2508): From 40 to 2 to 4 bytes, substantial Trunking: same packet transport more than one conversation (of course, can be used only if on a trunk)

Questions?

Alfredo Terzoli / Mosioua Tsietsi RTMMoIP Alfredo Terzoli / Mosioua Tsietsi

A conversation becomes DATA

And it is tranported…

Another view!

VoIP bandwith calculation Let’s get more specific on B/W usage, for AUDIO transmission Two families of CODECS: wave coding unrestricted, any sound (sound engineering) vocoding good for voice, can reach very low bitrates kbps: kilo bits per second (here kilo=1000, not 1024!)

‘Vocoders’ for Videos?

Voice Synthesisers & Vocoders A voice synthesiser includes a vocoder of some type, naturally In fact, using a voice synthesiser one can substantially reduce the bandwidth needed for the transmission of voice. HOW? (BTW, who knows how MIDI works?)

B/W consumption of a few codecs

VoIP bandwith calculation

VoIP bandwith calculation

Bandwidth calculators at: http://www.newport-networks.com/pages/voip-bandwidth-calculator.html (btw, the white paper distributed to you on b/w calculation comes from newport-networks) http://www.packetizer.com/voip/diagnostics/bandcalc.html

Reducing overhead cRTP compact RTP (RFC 2508): From 40 to 2 to 4 bytes, substantial Trunking: same packet transport more than one conversation (of course, can be used only if on a trunk)

Questions?

Real-time multimedia and communication in packet networks Asterisk The open source IP PBX 85

Some House Rules Practical component of the course Workings and power of asterisk, an IP Private Branch eXchange (PBX) Small tutorials will be given on a daily basis before each lecture Large practical – write your own application that adds value to an Asterisk PBX This will be demonstrated to the class at the end of the course. Practical to be done on a Linux machine you can ssh into cc 86

Some Admin You should have by now: - found your extension on pbx.ict.ru.ac.za - registered on iLanga your two phones (sj and hardphone) - explored the messaging between the two phones and the SIP proxy server in iLanga at least in these situations: 1. Registration 2. Call establishment with callee answering and without answer (voicemail) - checked the media stream in iLanga and discovered possible difference with respect to the case of calling directly an end point. What happens if you call a telephone registered with iLanga directly via its IP number? Please make sure that problems that you had yesterday are cleared in the first part of the lecture. Enjoy Asterisk! 87

Some House Rules Practical component of the course Workings and power of asterisk, an IP Private Branch eXchange (PBX) Small tutorials will be given on a daily basis before each lecture Large practical – write your own application that adds value to an Asterisk PBX This will be demonstrated to the class at the end of the course. Practical to be done on a Linux machine you can ssh into cc 88

What is Asterisk (*)? A private or enterprise grade exchange generally referred to as a private branch exchange (PBX)‏ Designed to interface telephony hardware or software with any telephony application seamlessly and consistently i.e. Asterisk can be moulded to fit any telephony application Asterisk can be used in any of these applications Heterogeneous Voice over IP gateway (MGCP, SIP, IAX, H.323)‏ Private Branch eXchange (PBX)‏ Custom Interactive Voice Response (IVR) server Conferencing server Softswitch? 89

What is Asterisk (*)? A private or enterprise grade exchange generally referred to as a private branch exchange (PBX)‏ Designed to interface telephony hardware or software with any telephony application seamlessly and consistently i.e. Asterisk can be moulded to fit any telephony application Asterisk can be used in any of these applications Heterogeneous Voice over IP gateway (MGCP, SIP, IAX, H.323)‏ Private Branch eXchange (PBX)‏ Custom Interactive Voice Response (IVR) server Conferencing server Softswitch? 90

What is Asterisk (*)? A private or enterprise grade exchange generally referred to as a private branch exchange (PBX)‏ Designed to interface telephony hardware or software with any telephony application seamlessly and consistently i.e. Asterisk can be moulded to fit any telephony application Asterisk can be used in any of these applications Heterogeneous Voice over IP gateway (MGCP, SIP, IAX, H.323)‏ Private Branch eXchange (PBX)‏ Custom Interactive Voice Response (IVR) server Conferencing server Softswitch? 91

Asterisk – Supported Communication Technologies Asterisk is designed to allow new interfaces and technologies to be added easily Asterisk’s goal is to support every kind of telephony technology possible Asterisk interfaces divided into 3: Zaptel hardware Non-Zaptel hardware Packet voice 92

Zaptel Hardware Check out http://www.zapatatelephony.org/ Provide integration with traditional and legacy analogue and digital telephone interfaces Zaptel interfaces available from Digium (www.digiumcards.com)‏ Zaptel interfaces available for a number of telephony interfaces ISDN Basic Rate Interface (BRI)‏ ISDN Primary Rate Interface (PRI)‏ Analog FXS interface – connect to a station i.e. analogue phone Analog FXO interface – connect to an office i.e. PBX 93

Zaptel Hardware Digium 4 x FXS card $342 USD Digium 2 x FXS, 2 x FXO card $360 USD Digium BRI card $469 USD Digium BRI card $1345 USD

Packet Voice Protocols Standard protocols for communication over packet networks Only interfaces that do not require specialised hardware E.g. SIP IAX H.323 MGCP 95

Asterisk’s Architecture 96

Modules and Applications Asterisk’s core contains several engines that play a critical role in the software’s operation At startup, Dynamic module loader loads various modules for: Channel drivers File formats Codecs Applications Custom applications launcher i.e. the iLanga Prepaid Application Asterisk’s switching core accepts calls from any of the various interfaces and routes them according to the dialplan Codec translator permits channels which are compressed with different codecs to talk to each other Scheduler and IO Manager which can be used by applications and drivers 97

Asterisk’s Architecture Modular API for Asterisk responsible for Asterisk’s success Channel API, File Format API, Codec API, Application API 98

Some Asterisk configurations (basic)‏ Asterisk box contains 1 analog interface for telephone (FXS interface)‏ 1 analog interface to PSTN (FXO interface)‏ Ethernet interface for VoIP 99

Some Asterisk configurations Asterisk box contains One E1 or (PRI) interface connected to a digital to analog converter or channel bank 15 phones connected channel bank 15 lines to PSTN (i.e. Telkom)‏ 100

Some Asterisk configurations In this example we illustrate the possibility of distributing a number of Asterisk boxes Each Asterisk box can be interconnected using TDM technology e.g. BRI or PRI Data technology/VoIP e.g. Inter Asterisk Exchange (IAX)‏ 101

Asterisk Filesystem Organisation /etc/asterisk Contains Asterisk configuration files – NB directory /usr/sbin Contains Asterisk binaries /usr/lib/asterisk/modules Contains runtime modules for channel drivers, codecs, file formats, applications /usr/include/asterisk Contains Asterisk C header files for the building the software /var/lib/asterisk/agi-bin Location of Asterisk Gateway Interface (AGI) for use in dialplan 102

Asterisk Filesystem Organisation /var/lib/asterisk/astdb Asterisk internal database Roughly equivalent to Windows registry /var/lib/asterisk/mohmp3 Storage directory mp3s – used for music on hold /var/lib/asterisk/sounds Storage directory for Asterisk audio files e.g. voice prompts to be used in IVR menus /var/spool/asterisk/outgoing Spooling directory for making outgoing calls Can be used for callback function /var/spool/asterisk/voicemail Storage directory for Asterisk voicemail boxes, announcements, etc 103

Asterisk Channels Channel naming convention in Asterisk is standard Outgoing channel names (used in Dial application) named in format: <technology>/<dialstring> <technology> represents type of interface you want to address or use E.g. Zap, SIP, IAX2, etc <dialstring> is a driver-specific string representing destination desired 104

Asterisk Channels (Zap)‏ <technology>/<dialstring> Zap / [g] <identifier> <identifier> = number of the channel you are trying to address If <identifier> prefixed by ‘g’ then number is interpreted as a group instead of as a channel e.g. Zap/g1/0027466223458 (Any available line in group 1)‏ Zap/1/0027466223458 (TDM channel 1)‏ 105

Asterisk Channels (SIP)‏ Outgoing channels typical of the form SIP / [exten@] <domain> [:<portno>] E.g. SIP/mos SIP:3000@sip.ict.ru.ac.za SIP/3000@sip.ict.ru.ac.za:5060 106

Asterisk Channels (IAX)‏ IAX2 / [<user> [:<secret>] @] <domain> [:<portno>] [/<exten>[@<context>][/<options>]] Where <user> and <secret> are optional username and secret to connect to the host identified by <peer> and <portno> = optional port number, <exten> = specific extension at an optional context <context>, and optionally with <options> connection options E.g IAX2/authname:secretpass@voiptalk.org/442081234567@default Call to voiptalk.org using “authname” as username and “secretpass” as password, and requesting extension 442081234567 in default context 107

Running Asterisk and Environment Asterisk can be run in console mode or as a daemon process E.g. asterisk –vvvgc (console mode with verbose=3 debugging Asterisk (daemon) – started by typing asterisk Please always run asterisk as daemon and connect to daemon process using: asterisk –r asterisk -vvvvvr When connecting to daemon process you will be connected to the command line interface of Astrerisk (CLI)‏ vitalstatistix*CLI> 108

Asterisk CLI When connected to the Asterisk CLI there are a number of commands you can use Go and test them out, see what they do, familiarise yourself with the environment E.g. ‘help’ ‘show applications’ ‘show application x’ ‘show codecs' ‘show translation' ‘extensions reload’ ‘sip reload’ CLI include command completion via the tab key 109

sip.conf Please set your phones up to connect to your development box Create a sip.conf file in your home directory, you can use the reference http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf 110

Tomorrow’s Tutorial Create an account for your phone Play around with some of the settings in the sip.conf file 111

Alfredo Terzoli / Mosioua Tsietsi RTMMoIP Alfredo Terzoli / Mosioua Tsietsi

PLAN: tiding up… ENUM: a few more words B/W calculation for VoIP Plan for the rest of the week

PSTN to VoIP Call via SIP DNS-Server Query 1.3.1.9.5.8.6.8.6.4.e164.arpa.? Response sip:paf@cisco.com “Call setup” Dial +4686859131 Sip sip:paf@cisco.com Gateway Sip server (slide by Steven D. Lind,AT&T)

VoIP via SIP to VoIP SIP-Server DNS-Server “ENUM” SIP-Server Gateway

ENUM ‘strange’ format… My telephone at home in ENUM format: 5.3.6.3.2.2.6.6.4.7.2.e164.arpa Why not (it seems more logical!): 6223635.46.27.e164.arpa

ENUM ‘strange’ format The second way of representing makes explicit in the DNS search the current format of e.164, which might change in future Using the first one (fully dotted), we isolate ENUM from changes in the e.164 format by the ITU. The only assumption is that e.164 will be numbers, which is safe

A conversation becomes DATA

And it is tranported…

Another view!

VoIP bandwith calculation Let’s get more specific on B/W usage, for AUDIO transmission Two families of CODECS: wave coding unrestricted, any sound (sound engineering) vocoding good for voice, can reach very low bitrates kbps: kilo bits per second (here kilo=1000, not 1024!)

‘Vocoders’ for Videos?

Voice Synthesisers & Vocoders A voice synthesiser includes a vocoder of some type, naturally In fact, using a voice synthesiser one can substantially reduce the bandwidth needed for the transmission of voice. HOW? (BTW, who knows how MIDI works?)

B/W consumption of a few codecs

VoIP bandwith calculation

VoIP bandwith calculation

Bandwidth calculators at: http://www.newport-networks.com/pages/voip-bandwidth-calculator.html (btw, the white paper distributed to you on b/w calculation comes from newport-networks) http://www.packetizer.com/voip/diagnostics/bandcalc.html

Reducing overhead cRTP compact RTP (RFC 2508): From 40 to 2 to 4 bytes, substantial Trunking: same packet transport more than one conversation (of course, can be used only if on a trunk)

Main Prac Building a service in Asterisk Possible dates: WEDNESDA 16s: presentation of your idea TUESDAY 29: demo of the implemented service

A few URLs to follow (by Friday) http://www.start.com.my/blog/?q=google_talk_vs_skype (blog with comparison of skype and googletalk) http://gadgets.engadget.com/entry/1234000100055725/ (broadband providers VoIP dilemma) http://voxilla.com/modules.php?op=modload&name=News&file=article&sid=170&newlang=eng (P2P SIP)

Questions?

Real-time multimedia and communication in packet networks Asterisk AGI and Manager Interface

Last Practical Create a calculator application using the Asterisk dialplan E.g. phone an extension * answers and provide an IVR menu saying press 1 to go to the calculator, 2 to go somewhere else, and 3 to go somewhere further If I press 1 – must be routed to calculator where I am prompted to choose to go to multiplication menu, division menu, add menu or subtraction menu 1,2,3,4 Within each menu – prompt user for expression separated by star (*)‏ So in addition menu, pressing 100*20 should return 120 While in multiplication menu pressing 100*20 will return 2000 Results can be played using Festival After each result should have option of another operation or going to one of the other menus (+-/*)‏ Remember to check out http://www.voip-info.org/ - Check out the Cut function!

Controlling Asterisk Number of ways Asterisk can be controlled Dialplan Asterisk scheduling (call me)‏ Asterisk Gateway Interface (AGI)‏ Manager Interface

AGI AGI allows us to add functionality to Asterisk with many different programming languages Java, Perl, PHP, C, Pascal – Anything! Provides a standard interface through which programs may control asterisk Used for advanced logic or to communicate with resources such as relational databases and external devices Allows asterisk to perform tasks that would be otherwise difficult or impossible

AGI – How it works The AGI script is called from the dialplan‏ Asterisk and your program communicate via the STDIN, STDOUT and STDERR communications channels (file handles in programming)‏ Your AGI scripts reads input via its STDIN file handle Your AGI script writes back to asterisk via its STDOUT file handle Your AGI program writes error message back to asterisk via its STDERR file handle

Starting your AGI program Syntax: exten => extennumber,priority,application,arguments The application is “AGI” The argument is the filename of your program The script must be: executable (chmod +x filename)‏ located in /var/lib/asterisk/agi-bin in source versions of asterisk Located in /usr/share/asterisk/agi-bin in binary vesions of asterisk Example: Run a perl script agi-test.agi exten => 1,2,AGI, agi-test.agi

Passing args exten 1,2,AGI,agi-test.agi|${ARG1}|${ARG2} AGI programs always receive two args 1 – path to the AGI script 2 – Arguments passed from the dialplan Notes about arguments: If no arg is given – the arg is empty. Consists of everything on the line following the verticle bar after the file name, up until the final vertical bar‏ Quotes are taken as being part of the argument

Communicating with * Use 'show agi' at the CLI will give you a list of commands At script startup time, * sends a group of variables to your script which you have to read in Each item is sent on a line terminated with a newline. The last item is followed by an empty line agi_request: agi-test.agi agi_channel: SIP/1000-bcgd162 agi_language: en agi_context: mtsietsi agi_extention: 105 agi_priority: 2 Commands sent to * must be terminated with newline

AGI examples‏ Perl - /usr/share/asterisk/agi-bin/agi-test.agi Java - /usr/share/asterisk/agi-bin/mosJava.java /usr/share/asterisk/agi-bin/mosJava.agi

Manager API A client/server module that allows us to interact with * via TCP/IP Similar to SMTP and HTTP Communicates using tags “header:value” terminated with a newline First tag must be one of the following Action: an action requested by the client. Response: A response to an action from Asterisk Event: An event reported by Asterisk to the client

Manager interface (login)‏ telnet into 146.231.121.88 on port 5038 Login Action: Login Username: voipuser Secret: voipuser Events: off /r/n

Manager interface (Originate)‏ Action: Originate Channel: SIP/1000 Exten: s Context: mtsietsi Priority: 1 Timeout: 10000

Manager interface (Monitor)‏ Action: Monitor Channel: SIP/ab5s51182s File: monitor Mix: 1

Today's Practical 1) Extend your calculator to incorporate an AGI program Do the calculation Parse the numbers Take a number to a power Solve complex problems i.e. y = ax4 + ax3 = ax2 + ax + a

Real-time multimedia and communication in packet networks iLanga

The Big Idea The flexibility of Asterisk what we have learnt Working in the software domain bridge between software and hardware closing open environment; more flexible to change Allows us to create something very functional yet simple - iLanga

SIP Express Router Focuses only on SIP messaging Performs forking properly Is able to handle high volumes of SIP traffic Has forked into two separate open source projects: OpenSER Kamailio

Registration with SER REGISTER 401 UNAUTHORISED (nonce,realm)‏ REGISTER (with MD5Hash(user+nonce+pwd))‏ 200 OK

User Devices

Example Call Set-up Asterisk 3001 Hangup OK Hangup 3000 3021 INVITE:3000@sip.ict.ru.ac.za INVITE:7521@sip.ict.ru.ac.za Asterisk INVITE:1013000@sip.ict.ru.ac.za INVITE:1013021@sip.ict.ru.ac.za INVITE:0786346926@sip.ict.ru.ac.za 3001 Hangup OK Hangup 3000 3021 0786346926

Asterisk The core of iLanga Speaks RTP IAX2 Zap (1 QUADBRI)‏ 4 channels to markreader premium line 2 to Telkom and 2 to Rhodes PBX

Asterisk Uses AGI Prepaid application Mark reader application Extensive use of the Dialplan Routing to Telkom and Rhodes Routing to applications Conferencing Directory Voicemail etc;

MySQL Database We have been configuring asterisk via files in /etc/asterisk You can also provide configuration via a Database using /etc/asterisk/extconfig.conf IAX registrations SIP registrations (SER talks to the database)‏ Voicemail Extensions still configured in extensions.conf! We added “usercontext.conf”

Web Frontend Provides a second way of accessing iLanga Accessing your PBX from anything other than a telephone is a new concept – Made easy by soft switches. Update your details Edit ring-able devices Listen to and control voice mail Add prepaid credit View call log View the directory – click to dial Everything you can do on the site – you should be able to do on a phone

Web Frontend Hosted by an Apache web server Written in Flash Also allows us to make the web site dynamic! Talks to Perl (CGI)‏ PHP Java Proxy (used to be Python)

iLanga Proxy Many entities talking to the manager interface caused problems A Proxy was built First in Python, now in Java Passes messages from the web interface to Asterisk Passes messages from Asterisk to the MySQL DB Some actions Icon information Extension state information Dynamic content on the front end

Short tutorial on Services Develop (in your head / on paper) a brief action plan for how you would develop one of the following services: SPIT (Spam over Internet Telephony) generator Application to curb SPIT in telephony applications Asterisk-based markreader that integrates with ROSS to deliver marks to calling students over a phone Audio database for storing and replaying all the telephone conversations that you make Meeting scheduler for setting up meetings with other iLanga users A ‘Hangman’ game that is played over the phone between two players Present your ideas to the rest of the class

Real-time multimedia and communication in packet networks Mobicents Service Delivery Platform

Our Background Apache Flash C, Perl and PHP scripts Rhodes VOIP Platform: Asterisk IP PBX SIP Express Router Web front end Apache Flash C, Perl and PHP scripts Java Proxy

Asterisk Architecture

Analysing the System Service Creation Dial plan (Apache-like configuration)‏ AGI (programming scripts) i.e. bash, Java, C, etc .. SER configuration (combo of prog lang and UNIX-like config file format)‏ Asterisk Application API (C only)‏ Tight coupling of services and control layer

Next Generation Networks Definition: “A Next Generation Networks (NGN) is a packet-based network able to provide Telecommunication Services to users and able to make use of multiple broadband, QoS-enabled transport technologies and in which service-related functions are independent of the underlying transport-related technologies. It enables unfettered access for users to networks and to competing service providers and services of their choice. It supports generalised mobility which will allow consistent and ubiquitous provision of services to users”. [ITU-T Recommendation Y.2001 (12/2004) - General overview of NGN]

Service Delivery Platform

JAIN SLEE and JAIN APIs

JAIN SIP Applet Phone: An example JAIN System Origins: Born out of JAIN SIP Initiative Developed by NIST labs Open source Java softphone based on JAIN SIP 1.2 API Planned Extensions: Video services Interop testing Customisation for inhouse projects

JAIN SLEE and JAIN APIs JAIN Service Logic and Execution Environment Defines component model for structuring applications through reusable OO components

JAIN SLEE Component Architecture

JAIN SLEE Service Instantiation

JAIN SLEE Service Instantiation

JAIN SLEE Service Example: Call Controller

JAIN SLEE Service Example: Call Controller Profile Name Called User Blocked Addresses Backup Address Voicemail State torosvi sip:torosvi sip:mobicents sip:hugo null true mobicents false victor sip:victor vhros2 sip:vhros2 vmail sip:vmail

JAIN SLEE Service Example: Call Controller