Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
FreeSWITCH 1.2

You're reading from   FreeSWITCH 1.2 Whether you're an IT pro or an enthusiast, setting up your own fully-featured telephony system is an exciting challenge, made all the more realistic for beginners by this brilliant book on FreeSWITCH. A 100% practical tutorial.

Arrow left icon
Product type Paperback
Published in May 2013
Publisher Packt
ISBN-13 9781782161004
Length 428 pages
Edition 2nd Edition
Concepts
Arrow right icon
Toc

Table of Contents (24) Chapters Close

FreeSWITCH 1.2
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Architecture of FreeSWITCH 2. Building and Installation FREE CHAPTER 3. Test Driving the Example Configuration 4. SIP and the User Directory 5. Understanding the XML Dialplan 6. Using XML IVRs and Phrase Macros 7. Dialplan Scripting with Lua 8. Advanced Dialplan Concepts 9. Moving Beyond the Static XML Configuration 10. Controlling FreeSWITCH Externally 11. Web-based Call Control with mod_httapi 12. Handling NAT 13. VoIP Security 14. Advanced Features and Further Reading The FreeSWITCH Online Community Migrating from Asterisk to FreeSWITCH The History of FreeSWITCH Index

Getting started


For this documentation we run an Asterisk and a FreeSWITCH on a Debian Linux system that has the IP address 10.0.0.10. We could run both services simultaneously, but for the sake of easier configuration examples we manually stop Asterisk or FreeSWITCH before starting the other. We use the latest versions of both software but actually the version number of either is not that important to understand the difference in architecture. The SIP phones use the IP addresses 10.0.0.20 and 10.0.0.21. See Chapter 4, SIP and the User Directory for tips on configuring different SIP phones.

Tip

You can have Asterisk and FreeSWITCH installed on the same server. However, you cannot run them simultaneously unless they each bind to a different IP and/or port number. For example, in /etc/asterisk/sip.conf you can change the SIP port for Asterisk. As long as they both don't try to use port 5060 on the same interface then you will be able to run them simultaneously if you so choose.

Starting and stopping Asterisk or FreeSWITCH

On a default installation of Asterisk you can start Asterisk with the command asterisk. That will start Asterisk and backgrounds the process. To stop Asterisk you can use the command-line interface with asterisk -r and type core stop now. A typical session might look like this:

debian*CLI> core stop now
debian*CLI> 
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
root@debian:#

On a typical FreeSWITCH installation you can start FreeSWITCH in the background with the following command:

/usr/local/freeswitch/bin/freeswitch –nc

To stop FreeSWITCH execute the same command but with the –stop argument:

/usr/local/freeswitch/bin/freeswitch –stop

Basic debugging

During the following examples you might want to see what is going on. Preferences vary but in general you will want to see more verbose debugging. We recommend that you try different verbosity levels to find one that suits your needs.

Asterisk

If you have an already running Asterisk you can use asterisk -r to open a command-line interface to it. With the command core set verbose 3 you set the log level to 3. Do not use core set debug 3 because that will overwhelm you with debugging information for Asterisk programmers (those guys who program Asterisk itself). Type core set debug 0 to reset the level to 0. A typical session might look like this:

debian*CLI> core set verbose 3
Set remote console verbosity to 3
debian*CLI>

FreeSWITCH

If you have an already running FreeSWITCH, you can use the aforementioned fs_cli command to open the command-line interface. With the command /log info you can set the log level to 6. You can do the same with /log info as seen in this example session:

freeswitch@internal> /log info
+OK log level info [6]

Now that we have debugging available let's take a brief look at the example configurations that come with Asterisk and FreeSWITCH.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image