Freeswitch Technical Application Notes
Total Page:16
File Type:pdf, Size:1020Kb
FreeSWITCH Technical Application Notes Table of Contents About FreeSWITCH ...................................................................................................... 1 Purpose, Scope and Audience ................................................................................... 3 FreeSWITCH Deployment Information ....................................................................... 4 FreeSWITCH External IP Address ............................................................................. 4 Sending Calls to Broadvox ......................................................................................... 5 SRV Records ............................................................................................................. 7 Testing SRV Records ................................................................................................. 7 Preferred and Alternate Codecs ................................................................................. 9 Is FreeSWITCH NATd ................................................................................................ 9 Is FreeSWITCH Behind a Firewall ............................................................................. 9 Is There a Local Firewall ............................................................................................ 9 Configuring FreeSWITCH .......................................................................................... 13 Confidential and Proprietary i Confidential and Proprietary ii About FreeSWITCH FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat driven products scaling from a soft-phone up to a soft-switch. It can be used as a simple switching engine, a PBX, a media gateway or a media server to host IVR applications using simple scripts or XML to control the call flow. FreeSWITCH supports various communication technologies such as Skype, SIP, H.323, IAX2 and GoogleTalk making it easy to interface with other open source PBX systems such as sipXecs, Call Weaver, Bayonne, YATE or Asterisk. FreeSWITCH supports many advanced SIP features such as presence/BLF/SLA as well as TCP, TLS, and sRTP. It can also be used as a transparent proxy with and without media in the path to act as a SBC (session border controller) and proxy T.38 and other end to end protocols. FreeSWITCH supports both wide and narrow band codecs making it an ideal solution to bridge legacy devices to the future. The voice channels and the conference bridge module all can operate at 8, 16, 32 or 48 kilohertz and can bridge channels of different rates. FreeSWITCH builds natively and runs standalone on several operating systems including Windows, Max OS X, Linux, BSD and Solaris on both 32 and 64 bit platforms. The FreeSWITCH developers are heavily involved in open source and have donated code and other resources to other telephony projects including openSER, sipXecs, The Asterisk Open Source PBX and Call Weaver. A Spec Sheet is available on the FreeSWITCH Wiki. For more information about FreeSWITCH, visit www.freeswitch.org. Confidential and Proprietary 1 Confidential and Proprietary 2 Purpose, Scope and Audience This technical application note describes the configuration of FreeSWITCH for the Broadvox GO! SIP Trunking service on the Fusion platform. This document is suitable for use by anyone deploying the Broadvox GO! SIP Trunking service in conjunction with FreeSWITCH. This document has a technical audience in mind – specifically IT professionals skilled in Linux with some experience in PBX administration and familiarity with VoIP technologies. This document is not for business administrators or people in other non-technical careers. In order to successfully use this document to deploy Broadvox GO! SIP Trunking service, you will need to possess the following skills, or have access to professionals or consultants with the following skills: • Understanding of UNIX or Linux operating systems, including: ° Understanding of file and directory structure on target OS ° Understanding of firewall configuration on target OS ° Understanding of network configuration on target OS ° Understanding of service configuration on target OS • Familiarity with network troubleshooting tools, including: ° Wireshark/Ethereal ° dig/nslookup ° ping ° traceroute • Familiarity with PBX systems, including: ° Trunk configuration ° Calling plan configuration ° Extension configuration ° Mailbox configuration • Familiarity with Session Initiation Protocol (SIP) • An understanding of all seven layers of the Open System Interconnection (OSI) model • A complete understanding of your internal network structure, Network Address Translation (NAT) setup, and firewall setup • A complete understanding of your public Internet connectivity Broadvox can only provide support for FreeSWITCH to the extent covered in this Technical Application Note and the included reference configuration, so if your level of technical expertise does not include the above skills, it is recommended that you obtain the services of an FreeSWITCH professional. Confidential and Proprietary 3 FreeSWITCH Deployment Information Before you begin deploying FreeSWITCH, please locate the following information. If you have questions about any item, refer to the descriptions and additional details provided on the pages that follow. External IP Address or DNS: ________________________ Preferred Codec: PCMU g729 Alternate Codec: PCMU g729 none Is FreeSWITCH NATd: Yes No Is FreeSWITCH Behind a Firewall: Yes No Is There a Local Firewall: Yes No FreeSWITCH External IP Address Your FreeSWITCH server will either use a public IP address or a private IP address. If the IP address on your FreeSWITCH server is of the form 192.168.x.x, 172.16.x.x – 172.31.x.x, or 10.x.x.x, then your FreeSWITCH server uses an internal, private IP address. This internal address is not routable on the public Internet. In order for your FreeSWITCH server to connect to the Broadvox Session Border Controller, you must either have a public IP address on your FreeSWITCH server or you must translate your private IP address into a public IP address using a Network Address Translator (NAT). If your FreeSWITCH server is behind a NAT, your public IP address will typically be the public IP address of your NAT. You may also have a static, one-to-one mapping of a public IP address to your private IP address. In this case, your public IP address will not match the IP address of your NAT, but you can look up the correct public IP address in your NAT configuration. If in doubt, you can perform a network packet capture using Wireshark (previously called Ethereal) on the public side of your NAT while simultaneously issuing some form of Internet request on your FreeSWITCH server. Confidential and Proprietary 4 Sending Calls to Broadvox In your Welcome letter, Broadvox provides DNS records to which you may send calls, and from which you should be prepared to receive calls. FreeSWITCH supports DNS A records, DNS SRV records, and IP addresses. At the top of your technical welcome letter, you will see a table like this one which shows your account number, turn-up ticket number, and trunk number. This information should be provided to Broadvox when you call for assistance to expedite support. Figure 1: Welcome Letter Account Information The third page of the welcome letter contains a table of the IP addresses and ports you need to allow through your firewall. Note that the table included here is an example and may be out of date. Please consult your actual welcome letter. Your firewall should be configured to accept signaling and media from these IP address and port combinations. Figure 2: Firewall Configuration Information The third page also contains the IP address and DNS information you should use for configuring your trunk. Broadvox recommends you utilize the DNS A record entries for FreeSWITCH unless you have specific reasons not to. Confidential and Proprietary 5 Figure 3: Trunk Destination Information Also on the third page, you will find a section containing information about how your trunk is configured on the Broadvox side. You should carefully review this information to ensure it is configured properly. Figure 4: Configuration of Broadvox Side The 'Admin E-mail ' lists the E-mail address which will receive alerts from the Broadvox SIP Trunking (Fusion) platform when various recognizable events occur. These events include things such as calls being blocked because they would cause you to exceed the simultaneous call sessions you purchased. FreeSWITCH has been tested to support TLS and SRTP with some more technically advanced configuration changes. Finally, on the fourth page, you will find two sections that specify how Broadvox is configured to send calls to your FreeSWITCH box and how Broadvox is configured to receive calls from your FreeSWITCH box. These two sections are only utilized if you provided static IP address information or DNS information. Broadvox can send calls to entirely separate systems from the ones it is configured to receive calls from. This allows you to split your inbound and outbound traffic for any reason you may have, including but not limited to load distribution over several systems or multiple Internet connections. In addition, Broadvox can randomly load-balance calls across several systems using an identical priority for the Send-To records. These options should allow you to engineer your traffic flow to suite your particular needs. Confidential and Proprietary 6 Figure 5: Signaling Configuration