万本电子书0元读

万本电子书0元读

顶部广告

FreeSWITCH 1.2电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Anthony Minessale

出  版  社:Packt Publishing

出版时间:2013-05-24

字       数:598.1万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This book is full of practical code examples aimed at a beginner to ease his or her learning curve.This book is written for IT professionals and enthusiasts who are interested in quickly getting a powerful telephony system up and running using the free and open source application, FreeSWITCH.Telephony experience will be helpful, but not required.
目录展开

Table of Contents

FreeSWITCH 1.2

Second Edition

FreeSWITCH 1.2

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 Publishing account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Note

Tip

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

Chapter 1. Architecture of FreeSWITCH

A revolution has begun and secrets have been revealed

The FreeSWITCH design – modular, scalable, and stable

Important modules – Endpoint and Dialplan

Note

Complex applications made simple

Voicemail

Multi-party conferencing

The FreeSWITCH API (FSAPI)

The XML registry

Language modules

The demonstration configuration

Summary

Chapter 2. Building and Installation

Setting up the FreeSWITCH environment

Operating system

Note

Operating system prerequisites

Linux/Unix

Mac OS X

Tip

Windows

Note

Text editors and XML

Downloading the source

Building from the latest code

Compiling FreeSWITCH for Linux/Unix/Mac OS X

Compiling FreeSWITCH

Step 1 – edit modules.conf

Note

Note

Step 2 – run the configure script

Tip

Step 3 – run the make and make install utilities

Step 4 – edit modules.conf.xml

Note

Step 5 – install sound and music files

Compiling FreeSWITCH for Windows

Important considerations for Windows users

Building the solution with MSVC/MSVCEE

Note

Note

Starting FreeSWITCH

Running FreeSWITCH in the background

Summary

Chapter 3. Test Driving the Example Configuration

Important concepts to understand

Note

Putting FreeSWITCH to work

Controlling FreeSWITCH with the CLI

Tip

Configuring a SIP phone to work with FreeSWITCH

SIP settings

X-Lite soft phone

Note

Hard phones

Tip

Aastra phones

Polycom phones

Snom phones

Tip

Testing the example Dialplan

Test calls for a single phone

The Tetris extension

Echo test

Music on hold

Demonstration IVR

The information application

Test calls for two or more phones

Calling another telephone

Parking a call

Calling a conference

Example Dialplan quick reference

Summary

Chapter 4. SIP and the User Directory

Understanding the FreeSWITCH user directory

Tip

Tip

Working with the FreeSWITCH user directory

Note

User features

Adding a user

Tip

Tip

Testing voicemail

Tip

Tip

Groups of users

Tip

Connecting to the world with gateways

Setting up a new gateway

Tip

Tip

Making calls

Receiving calls

Making calls without a gateway

SIP profiles and user agents

Summary

Chapter 5. Understanding the XML Dialplan

FreeSWITCH XML Dialplan elements

Contexts

Default

Public

Features

Extensions

Conditions

Tip

Call legs and channel variables

Accessing channel variables

Tip

Regular expressions

Tip

Actions and anti-actions

How Dialplan processing works

Creating a new extension

Tip

Tip

Important Dialplan applications

bridge

playback

say

play_and_get_digits

ivr

sleep

answer

pre_answer

hangup

set

transfer

Dialstring formats

Tip

Summary

Chapter 6. Using XML IVRs and Phrase Macros

IVR engine overview

IVR XML configuration file

IVR engine overview

IVR menu definitions

greet-long

greet-short

invalid-sound

exit-sound

timeout

inter-digit-timeout

max-failures

max-timeouts

digit-len

tts-voice

tts-engine

confirm-key

confirm-macro

IVR menu destinations

menu-exec-app

menu-play-sound

menu-back

menu-top

Routing calls to your IVR

Note

Nesting IVRs

Using phrases with IVRs

Calling Phrase Macros

Phrase Macro examples – voicemail

Tip

Tip

Advanced routing

Summary

Chapter 7. Dialplan Scripting with Lua

Tip

Getting started with Lua

Running Lua scripts from the Dialplan

Basic Lua syntax

Building voice applications

Tip

Tip

Tip

Tip

A simple IVR – interacting with the caller

Conditions and looping

Tip

Note

Even more conditions and looping

Tip

Tip

Note

Advanced IVR concepts

Connecting to a database with LuaSQL

Tip

Note

Note

Making a web call with curl

Tip

Tip

Lua patterns versus regular expressions

Scripting tips

Summary

Chapter 8. Advanced Dialplan Concepts

Dialplan overview

General Diaplan concepts

Contexts

Conditions

Actions

Putting it all together

Tip

XML Dialplan module review

Extensions

Conditions

Special condition variables

Inline execution

Actions and anti-actions

The regex operator

Nested conditions

Pitfalls to avoid

XML Dialplan applications

mod_dptools

Tip

mod_sofia

mod_commands

Utilizing variables

Testing variables with regular expressions

Caller profile fields

Channel variables

Channel variables and call setup

Tip

Global variables

Dialplan functions

Note

Real-time condition evaluation

String conditioning

Database queries

SIP contact parameters

Tip

Set, export, and legs

Set versus export

Passing variables via call headers

Tip

XML Dialplan cookbook

Match by IP address and call a number

Match an IP address and Caller ID

Match a number and strip digits

Tip

Match a number, strip digits, and add a prefix

Call a registered device

Try party A, then party B

Route DIDs to extensions

Alternate outbound gateways

Multiple endpoints with enterprise originate

Summary

Chapter 9. Moving Beyond the Static XML Configuration

The mod_xml_curl basics

Note

The mod_xml_curl Dialplan

Tip

The mod_xml_curl folder

The mod_xml_curl configuration

The mod_xml_curl summary

Generating configurations dynamically with language bindings

Note

Note

Making calls from the command line interface

Using ESL to execute commands

Tip

Tip

Note

Summary

Chapter 10. Controlling FreeSWITCH Externally

General overview

Event system architecture

Event-based modules

mod_event_socket

Configuring event socket settings

Reading events

Minimum event information

Sending events

Events from the Dialplan

mod_event_multicast

FreeSWITCH event system commands

auth <password>

api

bgapi

event

noevents

divert_events

filter

filter delete

nixevents

sendevent

sendmsg <uuid>

execute

hangup

nomedia

log <level>

nolog

linger

nolinger

FreeSWITCH Console application

Event Socket Library

Supported libraries

ESLObject

eslSetLogLevel($loglevel)

ESLevent object

serialize([$format])

setPriority([$number])

getHeader($header_name)

getBody()

getType()

addBody($value)

addHeader($header_name, $value)

delHeader($header_name)

firstHeader()

nextHeader()

ESLconnection object

new($host, $port, $password)

new($fd)

socketDescriptor()

connected()

getInfo()

send($command)

sendRecv($command)

api($command[, $arguments])

bgapi($command[, $arguments])

sendEvent($send_me)

recvEvent()

recvEventTimed($milliseconds)

filter($header, $value)

events($event_type,$value)

execute($app[, $arg][, $uuid])

executeAsync($app[, $arg][, $uuid])

setAsyncExecute($value)

setEventLock($value)

disconnect()

Events in practice

Event Socket Library example – running a command

Examples of sending events to FreeSWITCH

Setting phone lights

Turn lights on

Turn lights off

Rebooting a phone

Requesting phone reconfiguration

Custom notify messages

Summary

Chapter 11. Web-based Call Control with mod_httapi

HTTAPI syntax

Work actions

playback

vmname

record

pause

speak

say

execute

sms

dial

recordCall

conference

hangup

break

log

continue

getVar

voicemail

mod_httapi configuration file

Permissions

Note

Exiting

Storing data across successive requests

Some parameters are missing from some requests

Making it easier

Note

The demo IVR – in HTTAPI

Note

Summary

Chapter 12. Handling NAT

A brief introduction to NAT

Tip

Understanding the evolution of NAT

Tip

The four pitfalls of NAT

Demystifying NAT settings in FreeSWITCH

Note

Making media flow

Advanced options and settings

Note

FreeSWITCH on the client side

Note

Other creative uses of FreeSWITCH in a NAT situation

Conclusion

Summary

Chapter 13. VoIP Security

Network level protection

Separating interfaces and restricting traffic

Sample setup – simple

Sample setup – complex

VLANs

Intrusion detection

Registration monitoring

Fail2Ban

Filter configurations

Jail configurations

Other considerations

Encryption

Protecting SIP signalling

Choosing between encryption options

Note

Encryption with SSL

Setting Up SSLv2/3

Encryption with TLS

Protecting audio

Encryption with SRTP

Enabling SRTP

Encryption with ZRTP

Tip

Protecting passwords

Registration passwords

Tip

Voicemail passwords

Summary

Chapter 14. Advanced Features and Further Reading

Multi-user conferencing

Configuration

Conference profiles

Caller controls

Tip

Advertise

Sending and receiving XMPP events

Connecting callers to the conference

Controlling active conferences

Note

Nibblebill

Use cases

Billing (pre-pay)

Billing (post-pay)

Pay-per-call service billing

Maximum credit and/or fraud prevention

Design goals

Installation and configuration

Note

Database tables

Creating the database table for PostgreSQL

Creating the database table for MySQL

Billing a call

The nibble method (default)

An alternative to nibble billings

Note

Examples

Different rates per user

Single rate for all users

Different rates per area code

Different rates per service delivery

Note

Hang up the call when the balance is depleted

Note

Application/CLI/API commands

Check

Flush

Pause

Resume

Reset

Note

Adding and deducting funds

Enabling session heartbeat

Bill based on B Leg only

Alternative endpoints

Skype and GSM endpoints

Skype with mod_skypopen

Note

GSM with mod_gsmopen

Note

TDM with FreeTDM

Note

Configuration tools and related projects

Web GUIs

FusionPBX

FreePyBX

blue.box

Kazoo

Supporting libraries

Liverpie (Ruby)

FreeSWITCHeR (Ruby)

Librevox (Ruby)

EventSocket (Python/Twisted)

FSSocket (Perl)

Vestec Automatic Speech Recognition

Summary

Appendix A. The FreeSWITCH Online Community

The FreeSWITCH mailing lists

Talking in real time via IRC

The FreeSWITCH main website and wiki

The main FreeSWITCH page – www.freeswitch.org

The FreeSWITCH wiki page – wiki.freeswitch.org

The annual ClueCon open source developer conference

Appendix B. Migrating from Asterisk to FreeSWITCH

Note

Getting started

Tip

Starting and stopping Asterisk or FreeSWITCH

Basic debugging

Asterisk

FreeSWITCH

Configuration files

Note

Two SIP phones

Asterisk configuration

FreeSWITCH configuration

Tip

Analysis

Tip

Voicemail

Asterisk

FreeSWITCH

Accessing voicemail

Asterisk

FreeSWITCH

Note

Summary

Appendix C. The History of FreeSWITCH

Taking things to the next level

New ideas and a new project

The first ClueCon

Introducing FreeSWITCH

Index

A

B

C

D

E

F

G

H

I

K

L

M

N

O

P

R

S

T

U

V

W

X

Z

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部