PacktLib: Building Telephony Systems with OpenSER

Building Telephony Systems with OpenSER

Credits

About the Author

About the Reviewers

Preface

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

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

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

OpenSER Standard Configuration

Where Are We?

Analyzing the Standard Configuration

Using the Standard Configuration

Routing Basics

Summary

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

Building the User Portal with SerMyAdmin

SerMyAdmin

Basic Tasks

Summary

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

Call Forward and Voice Mail

Call Forwarding

Implementing Call Forward on Busy or nanswered

Inspecting the Configuration File

Lab—Testing the Call Forward Feature

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

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

Troubleshooting Tools

Objectives

Built-in Tools

Packet Capture and Trace Tools

Summary

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

Index