Enterprise VoIP Solutions With Alpine Linux - Slashroots 2011

Download as pdf or txt
Download as pdf or txt
You are on page 1of 47
At a glance
Powered by AI
The document discusses research related to systems theory, communications, controls, and their integration. It also describes VoIP solutions using Alpine Linux.

The main research activities discussed are mathematical systems theory, integration of systems theory and communications research, robust control, and communications networks.

The two main VoIP solutions described are replacing a PBX with Asterisk or FreeSwitch, and using intelligent IP phones with a simple SIP router and SIP accessory like Kamailio and FreeSwitch.

Enterprise VoIP

Solutions
- with Alpine Linux
Haniph A. Latchman and Nathan Angelacos and Natanael Copa

Laboratory for Information Systems & Telecommunications


ECE Department University of Florida
Gainesville FL 32611
[email protected]
http://www.list.ufl.edu

./roots
(February 25, 2011)
Laboratory for Information
Systems and
Telecommunicaitons

Haniph A. Latchman
Professor and Director
Systems & Control and Communications
Electrical and Computer Engineering
LIST Research
Activities
Mathematical Systems Theory
Integration of Systems Theory and
Communications Research
Robust Control
Communications Networks
Interactive Online Teaching and
Learning
From Communications to
Controls...
The Classical Period
Nyquist & Black - 1930‟s - Frequency Doman,
SISO
Bode, Evans, Nichols
“Modern” Control
Optimal Control - Time Domain - MIMO
Mathematical Optimization - LQR, LQG, LTR
The Neo-classical (Post-modern) Era
MIMO Frequency Domain
H-infinity
...and from Controls back to Communications

Rich Mathematical Rigor


Stability, Performance, Robustness
Signals, Systems
inputs, processing, outputs
Computer Communications Networks
Congestion Control, Flow Control, Stability
Packet (VoIP) Channels and Protocols
Wireless and Powerline Communications
FDMA,TDMA, CDMA (OFDM and Wavelets)
Wireless and Powerline Channels,
Interference suppression
Enterprise VoIP
Solutions
- with Alpine Linux
Haniph A. Latchman and Nathan Angelacos and Natanael Copa

Laboratory for Information Systems & Telecommunications


ECE Department University of Florida
Gainesville FL 32611
[email protected]
http://www.list.ufl.edu

./roots
(February 25, 2011)
Enterprise VoIP
Solutions
- with Alpine Linux
Haniph A. Latchman and Nathan Angelacos and Natanael Copa

Laboratory for Information Systems & Telecommunications


ECE Department University of Florida
Gainesville FL 32611
[email protected]
http://www.list.ufl.edu

./roots
(February 25, 2011)
Open Source
Enterprise IT Solutions
‣Office Suite (M$ Office vs Open Office)
‣Accounting
‣Customer Relationship Management
‣Mail Services with Global Directory
‣Spam/Virus Filtering
‣Web Proxy and Monitoring
‣Firewalls and Security Services
‣Others
‣…and Telecommunications and Telephony

8
Enterprise Telecoms and
Telephony
‣Local PBX or Key System with extensions to local offices FEX Lines to
Remote Offices
‣Interconnections to Telco Services
- PSTN and Cellular Providers (LIME, Digicel, Claro,etc.)
‣Least Cost Routing (LCR) for long distance and international calls
‣ VoIP Solution
‣ Option 1 – PBX Replacement (Asterisk or FreeSwtich)
- Intelligence in the VoIP PBX – POTS (or almost) phones
‣Option 2 – Internet Inspired Intelligence at the edge VoIP Solution
- SIP-based Intelligent IP phones + Simple SIP Router and SIP
Accessory (Kamailio (SIP Router) + FreeSwitch as SIP Accessory)
‣Using Alpine Linux
9
Alpine Linux
‣Alpine Linux goals: A Linux based
operating system that is
‣Secure
‣Small and efficient
‣Simple
‣Fast

1
www.AlpineLinux.org
‣Secure
‣Alpine Linux uses a grsecurity/PaX patched
kernel. This brings some of the nice features
in OpenBSD to Linux. The patch prevents
security holes to be exploited and tries to
make it hard/impossible to install rootkits. It
even protects against bugs in the kernel itself.
We also compile all packages with -fstack-
protector by default (more recently the trend
anyway)

1
www.AlpineLinux.org
‣Small
‣Alpine Linux was originally designed to run
from RAM/tmpfs. Therefore we used
uclibc/busybox instead of the traditional GNU
tools and we compile with -Os. Nowdays both
uclibc and busybox have most of POSIX
implemented so most apps compiles/runs just
fine. (We have everything from
kamailio/asterisk/freeswitch to XFCE, Gnome
and firefox running - a desktop system will
naturally enough require a disk

1
www.AlpineLinux.org
‣Small
‣The base system is around 4MB excluding
kernel (compare with debian which uses
around 110MB for the about the same thing).
Base system includes bootscripts, package
manager, C library, core utils (mv, ls, cp,
wget, syslogd, netcat, a http server, etc).
Since it can run from tmpfs you don't need a
disk (with moving parts that sooner or later
*will* break), and you dont need to worry that
your CF/SSD gets worn out by too many
writes.

1
www.AlpineLinux.org
‣Simple
‣Alpine Linux does not try to be
unnecessarily smart. It assumes the user
knows what he is going and tries to get out
the way if possible. Package build scripts are
plain posix shell scripts similar to those found
in Arch Linux.

1
www.AlpineLinux.org
‣Fast (tested on x86,x86_64,arm,ppc) mips next
‣= Fast =
When running from tmpfs we reinstall the
entire system each reboot. This means the
package manager needs to be fast - very fast.
None out there was good enough so we wrote
one ourselves: apk-tools. Quite likely the
fastest package manager there is (while
supporting dependencies and cryptographical
signing).
Since binaries are compiled with -Os and
linked to uclibc they tend to be smaller than in
a traditional GNU system. Smaller means less
RAM used, less swapping and less CPU
cache misses which leads1
to faster execution.
Alpine Linux
‣Alpine Linux goals: A Linux based
operating system that is
‣Secure
‣Small and efficient
‣Simple
‣Fast
‣http://www.alpinelinux.org/wiki/About

1
VoIP Solution No. 1
- Central PBX Replacement

‣MS Office Commuicator (M$)


‣Cisco Call Concentrator (Not Open Source)
‣Asterisk or FreeSwtich? (Open Source!)
-On alpinelinux.org
-apk add asterisk
-apk add freeswitch
‣Choose Freeswitch if you are worried about scalability
and code robustness for large number of users.
‣http://www.alpinelinux.org/wiki/FreePBX_V3

1
VoIP Solution I
- Central PBX Replacement

‣Analog Telephone Adapters – FXS/FX0


‣Low intelligence devices that interface
Asterisk/Freeswitch to analog devices
- FXS – subscriber devices - POTS phones, FAX machines,
analog modems, etc.
-FXO – Telco analog trunks.

‣Asterisk: /etc/asterisk/extensions.conf ./sip.conf and ./users.conf


‣Freeswitch /etc/freeswitch/ freeswtich.xml

1
SIP Router
‣ Internet Standard Protocol (RFC 3261)
SIP Router
Not just Voice

-Video
-Text (Instant Messaging)
-Presence Indication

‣ Kamai‟lio (formerly OpenSer)

-Used in the Telco Industry


-High Performance,
1
High Reliability
SIP
(Session Initiation Protocol)
‣ Internet Standard Protocol (RFC 3261)
SIP Router
-http-like protocol and structures

‣ Use for call setup and management

-UDP port 5060 (default) for SIP Messages

-UDP/RTP (high order ports) for multimedia


transport (Voice, Video, SMS (IM TXT)

-Connection Tracking (for NAT/Firewall Traversal)

2
SIP Router
‣ Not a Full PBX
SIP Router

-A SIP Message Router


-Simplifies Router Confguration
-Reduces Router Maintenance

Asterisk FreeSwtich
-Requires “smarter” phones or gateways

‣ Features Not provided by the Router

‣Voice Mail
‣Conferencing 2
SIP Router
‣ Core Implementation Includes
SIP Router

-Authenticated Phone Registration


-Time Conditions
-Call Detail Records
-PIN Checking / Recording for Billing
-Simplified Routing to PSTN (via gateway)
-“Zero Config” office-office „on-net‟ Calling
-Simple Setup for2 new installations
SIP Router
‣ Very Large Implementation
SIP Router

-Cluster of Dedicated Computers –SRV Records

-Segregated VLAN

‣ Typical Office Installation

-Installed on Alpine Linux as RAM-only from USB Boot

-http://5718wiki.gatorfone.com/wikka.php?wakka=VoipPhoneSystem

-Nano /etc/kamailio.conf ./kamctlrc

-Siremis – GUI Web Interface


2
Intelligent
Media Gateway
Media
Gateway ‣ Media Translator between
Digital and Analog signaling

‣ Interface with Local Public


Phone System
Asterisk
-Keep the core router config
simple 2
Media Gateway
Media
Gateway ‣ Example Intelligent Media
Gateways
-Quintum Tenor AFT400 4 port FXO

-Dlink DVG-3104 4 port Media Gateway

‣ Other Options
-Existing Asterisk Server with dedicated hardware

-GrandStream, Linksys
2
Intelligent
SIP Devices
SIP ‣ Digital Devices that speak SIP Protocol
SIP Router
Devices

‣ Traditional TDM Phone system

-PBX Brain of the network

-Phones Appendages of PBX

-New features required new PBX

‣ SIP Phone System

-Intelligence spread out over network

-SIP Router just routes


2 messages
SIP Devices
SIP
SIP Router
‣ Example SIP Telephones
Devices

-Polycom Soundpoint IP 330/550

-Snom 300 / 360 / 820

-Aastra 35i

-Mitel 5302

‣ Other Examples
-Microsoft Communicator Client

-X-Lite Soft Phone


2
DNS
‣ Internet Standard (eg RFCs 2915 3761 2168)

DNS

‣ Resolve SIP Routing Via DNS


• NAPTR and SRV records to
resolve router/gateway
location at the Domain level
• A and AAAA records to
resolve router/gateway at
host level 2
ENUM

Database
Internet Standard (eg RFCs 2915 3761 2168)
ENUM (E.164 Number to URI Mapping) is a DNS-based system that allows the
ENUM routing of telephone calls to the correct Uniform Resource Identifier (URI). In the
Database VoIP Phone System, a Global ENUM service is used to provide seamless inter-
office calling. (In alpine linux implementation we use tinydns – apk add tinydns)

‣ A local ENUM service may be used to control call flow in the local network

‣ Eg: Setting priority 90 for SIP Router and Priority 100 for SIP Accessory for voicemail on

no answer. Uses NAPTR - (Name Authority PoinTeR) and regular expression search and replace.

‣ Apk add bind-tools (sample queries and results below)

‣ host –t NAPTR 6.4.6.enum.qcslink.com

‣ 6.4.6.enum.qcslink.com has NAPTR record 10 100 "u" "E2U+sip" "!^\\+046(.*)$!sip:[email protected]!“

• host -t NAPTR *.6.4.6.enum.qcslink.com

• *.6.4.6.enum.qcslink.com has NAPTR record 10 100 "u" "E2U+sip" "!^\\+046(.*)$!sip:\\[email protected]!"


2
E.164-based VoIP Numbering Plan
Allow point-to-point dialing from any
telephony device on any VoIP
enabled network.
Each station is uniquely defined
Any device can reach that number
No numbering conflicts, world-
wide
Based on International E.164
Standard
3
What it is not
Not a dial plan. It does not specify:
how each office issues numbers
how each office makes local or
long-distance calls
what features are implemented
Only specifies how to uniquely
identify a device in a global network.
3
Anatomy of a PSTN
phone number
Let‟s call UWI‟s Main number:

9-1-876-927-1660

3
Anatomy of a phone
number
9-1-876-927-1600

Tell local PBX you are calling


9 Feature Code outside
Tell AT&T “This is a USA Region
1 Access Code call”

876 Country Code To Jamaica

927 NDC National Destination Code

1600 SN Subscriber Number

3
What Really
Happens....
AT&T
1-876-927-1660
(Feature Code consumed) 876-927-1660
(Access Code consumed)

927-1660
(Country Code consumed)

9-1-876-927-1660 UWI LIME Office

1660
(NDC consumed)
LIST SIP Router VoIP System

Subscriber 1660
phone rings

3
Number Plan -
Routing
9-1-876-927-1000

Tell local PBX you are calling


9 Feature Code outside
Tell AT&T “This is a USA Region
1 Access Code call”

876 Country Code To Jamaica

927 NDC National Destination Code

1660 SN Subscriber Number

3
ITU-T E.164

CC NDC SN
(Country Code) (National Destination Code) (Subscriber Number)

1-3 Digits 0-15 digits 15-NDC digits

National (Significant) Number

International E.164 Number

3
Global VoIP Number

OC NDC SN
(Office Code) (Network Destination Code) (Subscriber Number)

3 Digits 0-? digits ? digits

VoIP Office (Significant) Number

Global Network Number

3
Anatomy of a phone
number
3 Digit Branch Assigned by designer for
Office Code Number each office

Network (optional)
Routing Locator Code within
Destination Code an Office area

Subscriber Phone Extension As Before (e.g. 1660)


Number

3
Network Destination
Codes
Routes calls to organizationally
independent entities within an
organization
Departments
Work at home groups
Mobile users group
Allows reuse of SNs, variable length
SNs 3
Network Destination
Codes
Not needed for:
inter-station calls within an office
inter-department calls within a
given office
Are needed for:
Office-to-Office
Office-to-remote office group
4
Draft Recommendation

Insert a 2+ digit NDC in all numbers

5 digit dialing (25601) becomes 7 digit (70-25601)

Familiar to North America (702-5601)

Allows “transparent” NDC within a given territory

7-digit dialing” inter-department calls

5-digit dialing” intra-department calls

4
Example:

Office-1
70 25000 702-5000
Lobby-1
Office-1
70 43000 704-3000
Lobby-2
Office-1
710 3001 710-3001
Remote Wkr
Office-1
7201 123 720-1123
Mobile
Office-2
72 25000 722-5000
Lobby-1
4
SIP Accessory
(FreeSwitch)
SIP
SIP
Router
FreeSwitch
‣ Application Server
Devices

‣Voicemail
‣Music On Hold (Moh)
‣Automated Attendant
‣Conferencing

4
SIP Accessory
(FreeSwitch)
SIP
SIP
Router
FreeSwitch
‣ Serves as RTP Proxy for
Devices

‣RTP NAT Traversal


‣ Acts as Session Border Controller
‣Provides SIP connection behind NAT to
Internet Telephony Service Providers (ITSP)

‣Nano /etc/freeswitch/freeswitch.xml

4
SIP Accessory
(FreeSwitch)
SIP ‣ Run from RAM
SIP Router
FreeSwitch
Devices

‣More reliable

‣Optionally mounted HD to stored messages etc

‣ Can optionally (for small to medium size office) run


SIP Router and FreeSwitch on the same
alpinelinux box with boot from usb, RAM only

‣Need two IP addresses (Listen on each)

‣- nano /etc/network/interfaces
4
Core Functions
‣ Route Communication Signaling


SIP Router Media
Gateway Media Translation to Non-SIP Systems

SIP
DNS
Devices
‣ End-User Interface

‣ Dynamically Extend / Change Network


4
www.alpinelinux.org
Download and burn ISO and give it a spin

LIST student project pages


-http://5718wiki.gatorfone.com/wikka.php?wakka=VoipPhoneSystem

Contact Information
[email protected]
http://www.list.ufl.edu

Thank you!

You might also like