Want this title & more?

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847193735

Paperback324 pages

About This Book

Install, configure, and troubleshoot OpenSER

Use OpenSER to build next generation VOIP networks from scratch

Learn and understand SIP Protocol and its functionality

Integrate MySQL with OpenSER

Integrate OpenSER & Asterisk

Who This Book Is For

This book is for readers who want to understand how to build a SIP provider from scratch using OpenSER. Telephony and Linux experience will be helpful but is not essential. Readers need not have prior knowledge of OpenSER.

Table of Contents

Chapter 1: Introduction to SIP

SIP Basics

Server Operating as a SIP Proxy

Server Operating as a SIP Redirect

Basic Messages

SIP Transactions and Dialogs

The SIP Protocol and the OSI Model

The VoIP Provider "Big Picture"

Where You Can Find More Information

Summary

Chapter 2: The SIP Express Router

Where Are We?

What is the SIP Express Router?

What Software to Use, SER or OpenSER?

Usage Scenarios

OpenSER Architecture

SIP Proxy—Expected Behavior

Stateful Operation

Differences between Strict Routing and Loose Routing

Understanding SIP and RTP

Chapter 3: OpenSER Installation

Hardware Requirements

Software Requirements

Lab—Installing Linux for OpenSER

Downloading and Installing OpenSER v1.2

Lab—Running OpenSER at the Linux Boot

OpenSER v1.2 Directory Structure

Log Files

Startup Options

Summary

Chapter 4: OpenSER Standard Configuration

Where Are We?

Analyzing the Standard Configuration

Using the Standard Configuration

Routing Basics

Summary

Chapter 5: Adding Authentication with MySQL

Where Are We?

The AUTH_DB Module

The REGISTER Authentication Sequence

The Openserctl Shell Script

The Functions check_to() and check_from()

Using Aliases

Handling CANCEL requests and retransmissions

Full Script with All the Resources Above

Lab—Enhancing the Security

Lab—Using Aliases

Summary

Chapter 6: Building the User Portal with SerMyAdmin

SerMyAdmin

Basic Tasks

Summary

Chapter 7: Connectivity to the PSTN

Where Are We?

Lab—Using Asterisk as a PSTN Gateway

Using LCR (Least Cost Routes)

Securing re-INVITES

Blacklists and "473/Filtered Destination" messages

Summary

Chapter 8: Call Forward and Voice Mail

Call Forwarding

Implementing Call Forward on Busy or nanswered

Inspecting the Configuration File

Lab—Testing the Call Forward Feature

Chapter 9: SIP NAT Traversal

NAT Types

Solving the SIP NAT Traversal Challenge

Handling REGISTER Requests behind NAT

Handling INVITE Messages behind NAT

Handling the Responses

MediaProxy Installation and Configuration

openser.cfg Analysis

Invite Diagram

Lab Using MediaProxy for NAT Traversal

Chapter 10: OpenSER Accounting and Billing

Objectives

Where Are We?

Installation of FreeRADIUS and CDRTool

Using CDRTool for Rating

CDRTool Architecture

How CDRTool Rates a Call

Summary

Chapter 11: Troubleshooting Tools

Objectives

Built-in Tools

Packet Capture and Trace Tools

Summary

Chapter 12: After Words

What's New in Version 1.2.3

Migration from 1.2.2 to 1.2.3 and 1.3.1

Migrating the Script from Chapter 10 to openser 1.3.1

RTPProxy

Areas for Further Investigation

SIP Peering

TLS Transport Layer Security

Development

Common Mistakes

Forum and Training

Summary

What You Will Learn

An introduction to SIP

An overview of SIP Proxies

Compiling and installing OpenSER

SIP Proxy default configuration

Implementing MySQL support for authentication

Installing the user portal (SerWEB)

Connecting to the PSTN using a gateway

Sending a call to voicemail

NAT traversal using mediaproxy

Billing with Freeradius and CDRTool

Troubleshooting tips and tools.

In Detail

OpenSER is a flexible, free open-source VoIP server based on the Session Initiation Protocol (SIP), an application-layer control (or signaling) protocol for creating, modifying, and terminating sessions with one or more participants, including internet telephone calls, multimedia distribution, and multimedia conferences.

Engineered to power IP telephony infrastructures up to large scale, OpenSER is written in pure C for Linux/Unix-like systems with architecture-specific optimizations to offer high performance; it is able to handle 4 million users on a single processor server. The server keeps track of users, sets up VoIP sessions, relays instant messages, and creates space for new plug-in applications.

It can be used on systems with limited resources as well as on carrier-grade servers, scaling up to thousands of call setups per second. It is customizable, being able to feature as fast load balancer; SIP server flavors: registrar, location server, proxy server, redirect server; gateway to SMS/XMPP; or advanced VoIP application server.

Authors

Flavio E. Goncalves

Flavio E.Goncalves was born in 1966 in Brazil. Having always had a strong interest in computers, he got his first personal computer in 1983 and since then it has been almost an addiction.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.