Asterisk beginning to advanced part 1

  • Upload
    m-gh

  • View
    106

  • Download
    2

Embed Size (px)

Citation preview

  1. 1. Asterisk from beginning to advanced (part 1) Part 1 Used: Debian 8 libreoffice Email: [email protected] License: GPLV3 Get latest version of this slides and see Other projects and tutorials: https://github.com/m-gh/
  2. 2. What is Asterisk?What is Asterisk? Asterisk is an open source framework for building communications applications. Asterisk turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and other custom solutions. It is used by small businesses, large businesses, call enters, carriers and government agencies, worldwide. Asterisk is free and open source
  3. 3. written in the C Programming Language running on Linux (or other types of Unix ) powering Business Telephone Systems connecting many different Telephony protocols a toolkit for building many things: an IP PBX with many powerful features and applications VoIP Gateways Conferencing systems supporting VoIP Phones as well as PSTN and POTS speaking SIP , the most common VoIP protocol, among others What is Asterisk?What is Asterisk?
  4. 4. What Can You Do With Asterisk?What Can You Do With Asterisk? Asterisk is a framework for building multi-protocol, real- time communications applications and solutions. Asterisk is to realtime voice and video applications as what Apache is to web applications: the underlying platform.
  5. 5. You can use Asterisk to build communications applications, things like business phone systems (also known as PBXs) and: call distributors VoIP gateways and conference bridges. Voicemail Call Recording Audio and Video Conferencing What Can You Do With Asterisk?What Can You Do With Asterisk?
  6. 6. What Do I Need To Know To Use Asterisk?What Do I Need To Know To Use Asterisk? The Asterisk framework itself is built by developers for developers. If you want to create applications and solutions with Asterisk you will need a working knowledge of Linux, script programming, networking and telephony.
  7. 7. TelephonyTelephony Telephony is the field of technology involving the development, application, and deployment of telecommunication services for the purpose of electronic transmission of voice, fax, or data, between distant parties. The term is also used frequently to refer to computer hardware, software, and computer network systems, that perform functions traditionally performed by telephone equipment. In this context the technology is specifically referred to as Internet telephony, or voice over Internet Protocol (VoIP)
  8. 8. What Is A PBX?What Is A PBX? A PBX (Private Branch Exchange) is a system that connects telephone extensions to the Public Switched Telephone Network and provides internal communication for a business
  9. 9. Key PBX FeaturesKey PBX Features VoIP Ready: The world is moving away from legacy PSTN lines and towards VoIP. Voice Messaging: Once upon a time, voicemail was an optional add-on. Mobility. Conferencing: One of the best ways to cut down on travel costs is teleconferencing. Reporting: If you cant measure it, you cant manage it.
  10. 10. What Is A IP PBX?What Is A IP PBX? An IP PBX is a PBX with Internet Protocol connectivity and may provide additional audio, video, or instant messaging communication utilizing the TCP/IP protocol stack
  11. 11. Key IP PBX FeaturesKey IP PBX Features The features of an IP PBX are similar to the features of a normal PBX but are typically enhanced with features taking advantage of Internet/intranet connectivity, such as: Unified communications/unified messaging Voicemail transcription (speech to text) Find me/follow me Call recording Least-cost routing/MPLS call routing Extension mobility VoIP phone/soft phone connectivity
  12. 12. Plain old telephone servicePlain old telephone service Plain old telephone service (POTS) is voice-grade telephone service employing analog signal transmission over copper loops
  13. 13. Public switched telephone networkPublic switched telephone network The public switched telephone network (PSTN) is the aggregate of the world's circuit-switched telephone networks that are operated by national, regional, or local telephony operators, providing infrastructure and services for public telecommunication
  14. 14. Voice over IPVoice over IP Voice over IP (VoIP) is a methodology and group of technologies for the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet
  15. 15. Session Initiation ProtocolSession Initiation Protocol The Session Initiation Protocol (SIP) is a communications protocol for signaling and controlling multimedia communication sessions The most common applications of SIP are in Internet telephony for voice and video calls, as well as instant messaging all over Internet Protocol (IP) networks.
  16. 16. VoIP gatewayVoIP gateway A VoIP gateway is a gateway device that uses InternetProtocols to transmit and receive voice communications (VoIP) A VoIP gateway is used to build a bridge between the worlds of legacy telephony and the VoIP. Gateways are typically used to connect legacy phone systems (PBXs or ACDs) with VoIP resources, or to connect modern VoIP phone systems with legacy phone lines.
  17. 17. Key VoIP Gateway Facts & FeaturesKey VoIP Gateway Facts & Features Gateways come in several formats. Analog gateways convert between VoIP protocols and traditional analog phone lines and/or phones. Digital gateways convert between VoIP and various kinds of digital phone services: T1, E1, PRI and/or BRI, depending on the gateway. Gateways can typically connect to multiple VoIP endpoints (devices or services), which allows PSTN resources to be shared between multiple IP communications systems.
  18. 18. Conference BridgeConference Bridge A conference bridge allows a group of people to participate in phone call. The most common form of bridge allows participants dial into a virtual meeting room from their own phone. Meeting rooms can hold dozens or even hundreds of participants
  19. 19. Asterisk OS Asterisk can run on multiple base architectures including embedded systems and there are no strict requirements on CPU speed or memory size. Asterisk can run on a number of Operating Systems. Linux is the only officially supported OS, and it is recommended to use a 2.6.25 or higher kernel A current and supported release of distributions such as CentOS or Debian is recommended.
  20. 20. Asterisk & Linux distributionAsterisk & Linux distribution freepbx-distro Streamlined and Secure We've watched the FreePBX space develop with many different flavors of distros that each add their varying personalities and extras. At FreePBX we've focused on Security and a Streamlined System that is supported by the same team who brings you the core application.
  21. 21. Asterisk & Linux distributionAsterisk & Linux distribution AstLinux AstLinux is a "Communications and Network Appliance" open source software distribution. Unified communications including voice, presence and messaging, provided by Asterisk
  22. 22. Asterisk & Linux distributionAsterisk & Linux distribution Elastix Elastix is an Open Source Software to establish Unified Communications. About this concept, Elastix goal is to incorporate all the communication alternatives, available at an enterprise level, into a unique solution.
  23. 23. Elastix Features Some of the basic Features of Elastix include: Voicemail Fax-to-email Support for softphones Web Interface Configuration Virtual conference rooms Call recording Least Cost Routing Extension Roaming PBX Interconnection Caller ID CRM Advance Reports
  24. 24. Asterisk & Linux distributionAsterisk & Linux distribution AsteriskNOW What is AsteriskNOW? Install Asterisk and start building custom telephony applications with AsteriskNOW. AsteriskNOW makes it easy to create custom telephony solutions by automatically installing the "plumbing." It's a complete Linux distribution with Asterisk, the DAHDI driver framework, and, the FreePBX administrative GUI. Much of the complexity of Asterisk and Linux is handled by the installer, the yum package management utility and the administrative GUI. With AsteriskNOW, application developers and integrators can concentrate on building solutions, not maintaining the plumbing.
  25. 25. LicensingLicensing Asterisk Asterisk is distributed under the GNU General Public License version 2 and is also available under alternative licenses negotiated directly with Digium, Inc. Elastix Elastix is an open source entrepreneur tool released under the license GPLv2. You are free to use it for commercial of personal purposes subject to the conditions as described under its License.
  26. 26. Download asteriskDownload asterisk Site: http://www.asterisk.org/downloads Latest Version 13.3.2 (when these slides creates) Download source and extract it. Dependences: 'glibc-devel', 'ncurses-devel', 'openssl-devel' and 'zlib-devel' or similar. svn (client cli)must be installed in your system http://subversion.apache.org Instructions: go to contrib/scripts folder and run install_prereq script (with root) to automatic install dependences contrib/scripts ./install_prereq install contrib/scripts ./install_prereq install-unpackaged
  27. 27. Install asterisk from sourceInstall asterisk from source debian8@localhost:/usr/src/asterisk-13.3.2#sudo ./configure debian8@localhost:/usr/src/asterisk-13.3.2# sudo make debian8@localhost:/usr/src/asterisk-13.3.2# sudo make menuselect [optional] debian8@localhost:/usr/src/asterisk-13.3.2# sudo make install debian8@localhost:/usr/src/asterisk-13.3.2# sudo make samples The previous command make samples created sample configuration in: /etc/asterisk/
  28. 28. File StructureFile Structure The table below contains the default installation paths for Asterisk component files and libraries. Default Installation Paths Path Description /etc/asterisk Configuration files /usr/sbin Location of binary executable /var/log/asterisk message(error) logs and CDR usr/lib/asterisk/modules Component module libraries
  29. 29. Default PortsDefault Ports Protocol Port number Transport SIP 5060/5061 TCP/UDP IAX2 4569 UDP MGCP 2727 UDP SCCP 2000 TCP RTP 10,00 20,000 UDP Manager 5038 TCP H323 1720 TCP Dundi 4520 UDP Unistim 5000 UDP
  30. 30. backupsbackups Asterisk configure file location is /etc/asterisk Backup useful files in this locations: mv modules.conf modules.conf.sample mv extensions.conf extensions.conf.sample mv sip.conf sip.conf.sample mv iax.conf iax.conf.sample
  31. 31. Useful commandsUseful commands launch Asterisk in the foreground mode (not a daemon) asterisk -vvvc V : very very verbose C : get a command line console core show help To start the PBX using your sound card, you can type "console dial" to dial the PBX Then you can use "console answer", "console hangup", and "console dial" to simulate the actions of a telephone man asterisk
  32. 32. Best practiceBest practice he purpose of this document is to define best practices when working with Asterisk in order to minimize possible security breaches and to provide tried examples in field deployments. This is a living document and is subject to change over time as best practices are defined.
  33. 33. SectionsSections * Filtering Data: How to protect yourself from redial attacks * Proper Device Naming: Why to not use numbered extensions for devices * Secure Passwords: Secure passwords limit your risk to brute force attacks * Reducing Pattern Match Typos: Using the 'same' prefix, or using Goto() * Manager Class Authorizations: Recognizing potential issues with certain classes of authorization * Avoid Privilege Escalations: Disable the ability to execute functions that may escalate privileges
  34. 34. Additional Links links that contain useful information about best practices or security are listed below. * Seven Steps to Better SIP Security: http://blogs.digium.com/2009/03/28/sip-security/ * Asterisk VoIP Security (webinar): http://www.asterisk.org/security/webinar/
  35. 35. aboutabout Email : [email protected] License : GPLV3 Other project and tutorials: https://github.com/m-gh/ Get latest version of this slides form: https://github.com/m-gh/