万本电子书0元读

万本电子书0元读

顶部广告

Building Telephony Systems with OpenSIPS - Second Edition电子书

售       价:¥

13人正在读 | 0人评论 6.2

作       者:Flavio E. Goncalves

出  版  社:Packt Publishing

出版时间:2016-01-30

字       数:240.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build high-speed and highly scalable telephony systems using OpenSIPSAbout This BookInstall and configure OpenSIPS to authenticate, route, bill, and monitor VoIP callsGain a competitive edge using the most scalable VoIP technologyDiscover the latest features of OpenSIPS with practical examples and case studiesWho This Book Is ForIf you want to understand how to build a SIP provider from scratch using OpenSIPS, then this book is ideal for you. It is beneficial for VoIP providers, large enterprises, and universities. This book will also help readers who were using OpenSER but are now confused with the new OpenSIPS.Telephony and Linux experience will be helpful to get the most out of this book but is not essential. Prior knowledge of OpenSIPS is not assumed.What You Will LearnLearn to prepare and configure a Linux system for OpenSIPSFamiliarise yourself with the installation and configuration of OpenSIPSUnderstand how to set a domain and create users/extensionsConfigure SIP endpoints and make calls between themMake calls to and from the PSTN and create access control lists to authorize callsInstall a graphical user interface to simplify the task of provisioning user and system informationImplement an effective billing system with OpenSIPSMonitor and troubleshoot OpenSIPS to keep it running smoothlyIn DetailOpenSIPS is a multifunctional, multipurpose signalling SIP server. SIP (Session Initiation Protocol) is nowadays the most important VoIP protocol and OpenSIPS is the open source leader in VoIP platforms based on SIP. OpenSIPS is used to set up SIP Proxy servers. The purpose of these servers is to receive, examine, and classify SIP requests. The whole telecommunication industry is changing to an IP environment, and telephony as we know it today will completely change in less than ten years. SIP is the protocol leading this disruptive revolution and it is one of the main protocols on next generation networks. While a VoIP provider is not the only kind of SIP infrastructure created using OpenSIPS, it is certainly one of the most difficult to implement.This book will give you a competitive edge by helping you to create a SIP infrastructure capable of handling tens of thousands of subscribers.Starting with an introduction to SIP and OpenSIPS, you will begin by installing and configuring OpenSIPS. You will be introduced to OpenSIPS Scripting language and OpenSIPS Routing concepts, followed by comprehensive coverage of Subscriber Management. Next, you will learn to install, configure, and customize the OpenSIPS control panel and explore dialplans and routing. You will discover how to manage the dialog module, accounting, NATTraversal, and other new SIP services. The final chapters of the book are dedicated to troubleshooting tools, SIP security, and advanced scenarios including TCP/TLS support, load balancing, asynchronous processing, and more.A fictional VoIP provider is used to explain OpenSIPS and by the end of the book, you will have a simple but complete system to run a VoIP provider.Style and approachThis book is a step-by-step guide based on the example of a VoIP provider. You will start with OpenSIPS installation and gradually, your knowledge depth will increase.
目录展开

Building Telephony Systems with OpenSIPS Second Edition

Table of Contents

Building Telephony Systems with OpenSIPS Second Edition

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Errata

Piracy

Questions

1. Introduction to SIP

Understanding the SIP architecture

The SIP registration process

Types of SIP servers

The proxy server

The redirect server

The B2BUA server

SIP request messages

The SIP dialog flow

SIP transactions and dialogs

Locating the SIP servers

SIP services

The SIP identity

The RTP protocol

Codecs

DTMF-relay

Session Description Protocol

The SIP protocol and OSI model

The VoIP provider's big picture

The SIP proxy

The user administration and provisioning portal

The PSTN gateway

The media server

The media proxy or RTP proxy for NAT traversal

Accounting and CDR generation

Monitoring tools

Additional references

Summary

2. Introducing OpenSIPS

Understanding OpenSIPS

OpenSIPS capabilities

An overview of the OpenSIPS project

OpenSIPS knowledge transfer and support

Usage scenarios for OpenSIPS

The ingress side

The core side

The egress side

Who's using OpenSIPS?

The OpenSIPS design

The OpenSIPS core

The OpenSIPS modules

Summary

3. Installing OpenSIPS

Hardware and software requirements

Installing Linux for OpenSIPS

Downloading and installing OpenSIPS v2.1.x

Generating OpenSIPS scripts

Running OpenSIPS at the Linux boot time

The OpenSIPS v2.1.x directory structure

The configuration files

Modules

Working with the log files

Startup options

Summary

4. OpenSIPS Language and Routing Concepts

An overview of OpenSIPS scripting

The OpenSIPS configuration file

Global parameters

The modules section

Scripting routes

The request route

The branch route

The failure route

The reply route

The local route

The start up route

The timer route

The event route

The error route

Scripting capabilities

The scripting functions

The scripting variables

The reference variables

The AVP variables

The script variables

Scripting transformations

Scripting flags

Scripting operators

Script statements

SIP routing in OpenSIPS

Mapping SIP traffic over the routing script

Stateless and stateful routing

In-dialog SIP routing

Summary

5. Subscriber Management

Modules

The AUTH_DB module

The REGISTER authentication sequence

The REGISTER sequence

The INVITE authentication sequence

The INVITE sequence packet capture

The INVITE code snippet

Digest authentication

The authorization request header

Quality of protection

Plaintext or prehashed passwords

Installing MySQL support

Analysis of the opensips.cfg file

The REGISTER requests

The non-REGISTER requests

The opensipsctl shell script

Configuring the opensipsctl utility

Using OpenSIPS with authentication

The registration process

Enhancing the opensips.cfg routing script

Managing multiple domains

Using aliases

Handling the CANCEL requests and retransmissions

Lab – multidomain support

Lab – using aliases

IP authentication

Summary

6. OpenSIPS Control Panel

The OpenSIPS control panel

Installation of OpenSIPS-CP

Configuring the OpenSIPS-CP

Installing Monit

Configuring administrators

Adding and removing domains

Manage the access control lists or groups

Managing aliases

Managing subscribers

Verifying the subscriber registration

Managing permissions and IP authentication

Sending commands to the management interface

A generic table viewer

Summary

7. Dialplan and Routing

The dialplan module

PSTN routing

Receiving calls from PSTN

Gateway authentication

The permissions module

Caller identification

Sending calls to PSTN

Identifying PSTN calls

Authorizing PSTN calls

The group module

Access Control Lists

Caller ID in PSTN calls

Routing to PSTN GWs

The dynamic routing module

Routing entities

The selection algorithm

Probing and disabling gateways

Advanced features

Script samples

Summary

8. Managing Dialogs

Enabling the dialog module

Creating a dialog

Dialog matching

Dialog states

Dialog timeout and call disconnection

Dialog variables and flags

Setting and reading the dialog variables

Setting and reading the dialog flags

Profiling a dialog

Counting calls from the MI interface

Disconnecting calls

Disconnecting a call using the MI interface

Topology hiding

Initial request before topology hiding

Initial request after topology hiding

Sequential request before topology hiding

Sequential request after topology hiding

Topology hiding limitations

Validating a dialog and fixing broken dialogs

Displaying the dialog statistics

Description of the statistics

SIP session timers

How the SIP session timer works

Summary

9. Accounting

Progress check

Selecting a backend

The accounting configuration

Automatic accounting

Manual accounting

Extra accounting

Multi-leg accounting

Lab - accounting using MySQL

Using the dialog module to obtain the duration

Call end reason

Generating CDRs

Lab – generating CDRs

CDRviewer and extra accounting

Accounting using RADIUS

Lab – accounting using a FreeRADIUS server

Package and dependencies

FreeRADIUS client and server configuration

Configuring the OpenSIPS server

Missing BYEs and CDRs

Summary

10. SIP NAT Traversal

Port address translation

Where does NAT break SIP?

Types of NAT

Full cone

Restricted cone

Port-restricted cone

Symmetric

The NAT firewall table

Solving the SIP NAT traversal challenge

A solution proposed for the NAT issue

The solution's topology

Building the solution

Installing STUN

Why STUN does not work with symmetric NAT devices

Solving SIP signaling

Implementing NAT detection

Solving the Via header using rport

Fixing the Contact header for requests and replies

Handling the REGISTER requests and pings

Handling the responses

Handling sequential requests

Using a media relay server

Solving the traversal of the RTP packets

Understanding the solution flow

(1) First INVITE

(2) INVITE relayed by the server

(3) Reply 200 OK with SDP

Acknowledgements (ACK packets)

Summary

11. Implementing SIP Services

Where to implement SIP services

Explaining RFC 5359 with SIP service examples

Playing announcements

Playing demo-thanks

Call forwarding

Implementing blind call forwarding

Loading the AVPops module and its parameters

Lab – implementing blind call forwarding

Implementing call forward on busy or unanswered

Debugging the routing script

Lab – testing the call forwarding feature

Implementing an integrated voicemail

User integration

Integrating Asterisk Realtime with OpenSIPS

Call transfer

An unattended transfer

Tips for call transfer

Summary

12. Monitoring Tools

Built-in tools

Trace tools

SIPTRACE

Configuring SIPTRACE

Script trace

Troubleshooting routing scripts

A system crash

Benchmarking segments of code

Stress testing tools

The sipsak tool

SIPp

Installing SIPp

Stress testing

Packet capturing tools

Ngrep

Sipgrep

Wireshark

Summary

13. OpenSIPS Security

Configuring a firewall for OpenSIPS

Blocking multiple unsuccessful authentication attempts

Preventing DOS using the PIKE module

PIKE in manual mode

PIKE in automatic mode

Preventing DNS and registration poisoning

Enabling Transport Layer Security

Generating a script for TLS

Creating the root certificate authority

Creating the server certificate

Installing the root certificate authority in your softphone

Enabling Secure Real-time Protocol

SRTP-SDES

DTLS-SRTP

ZRTP

Enabling SRTP

Enabling the anti-fraud module

Event generation

Script integration

Summary

14. Advanced Topics with OpenSIPS 2.1

Asynchronous operations

Asynchronous support in the OpenSIPS script

Available asynchronous functions

Binary replication

Dialog replication

The usrloc replication

TCP handling

Enabling TCP

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部