1 / 46

Asterisk PBX

Asterisk PBX. PSTN to VoIP and never back again Tomas Florian. Intro. IT Consulting: florien.ca Linux / Windows interoperation Application development High availability hosting Working with Asterisk for the last year in small office environments

saad
Download Presentation

Asterisk PBX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Asterisk PBX PSTN to VoIP and never back again Tomas Florian

  2. Intro • IT Consulting: florien.ca • Linux / Windows interoperation • Application development • High availability hosting • Working with Asterisk for the last year in small office environments • Beta stage of Asterisk based solution for communication company launching service between Canada and India.

  3. Summary • VoIP (the big picture) • Asterisk • Architecture • Channels • Example • Dialplans • Getting Started • Questions

  4. The Big Picture Some Telco stuff ?? Good old internet 

  5. PSTN and the Internet Asterisk

  6. PSTN and the Internet

  7. “Hard wired” Expensive Proprietary Local Plain Old Reliability Cell phone service 911 compatibility Flexible Cost effective Open World wide Bleeding edge Not yet “Hello Calgary … I’m in Tokyo and I need help” PSTN vs. VoIP

  8. Flexibility • Branch offices / Virtual Offices • Telecommuting • Automated agents • Custom applications • Press 1 to have your new emails read to you • Today’s weather forecast • Games • … “just” another interface to the web (audio)

  9. Summary • VoIP (the big picture) • Asterisk • Architecture

  10. Asterisk • Open Source • Created by Mark Spencer (1.0 in 2004) • Sponsored by Digium (Hardware) • Minimum requirements • Linux / FreeBSD • Pentium 300 MHz • 128 MB RAM • 600 MB Disk

  11. Asterisk • * … good name choice • Connector between all kinds of audio protocols and technologies • PSTN • SIP/RTP • IAX • H323 (Netmeeting) • …

  12. Applications File formats Codecs Channels Architecture *

  13. Paging VM … … G.723.1 WAV GSM MP3 PSTN … SIP Architecture *

  14. Summary • VoIP (the big picture) • Asterisk • Architecture • Channels

  15. Channels ZAP Asterisk SIP, IAX, H323

  16. SIP: Session Initiation Protocol • VoIP favorite • Wide hardware and software phone support • Hardware phones • Example: BT100 • Hardware adapters • PAP2 • Software phones • X-Lite

  17. Invite OK ACK BYE OK SIP : Introduction UA - Caller UA - Callee • Port 5060 UDP • Human Readable Text (similar to HTTP)

  18. Invite OK ACK RTP • RTP (Real-time Transport Protocol) • Separate UDP stream (media path) • Sends voice data SIP : Introduction Caller Callee

  19. Register Register SIP Proxy and Registrar

  20. Invite Invite SIP Proxy and Registrar

  21. SIP Proxy and Registrar RTP

  22. Other VoIP Channels • IAX (Inter Asterisk eXchange) • H323 (Netmeeting)

  23. Channels ZAP Asterisk SIP, IAX, H323

  24. ZAP: Interface to the PSTN • Reuse existing PSTN infrastructure • Downstream from Telco • lines from Telco terminating at Asterisk • FXO • Be the Telco • lines from Asterisk going to existing phone sets • FXS • Digium TDM400, X100P (fancy voice modem)

  25. Summary • VoIP (the big picture) • Asterisk • Architecture • Channels • Example

  26. Office PBX Example

  27. The Office • SIP interface • Ethernet (LAN): IP 192.168.0.10 • VoIP phones on a switch • Each phone needs IP (assigned by DHCP)

  28. PSTN • ZAP interface • 1 Line: 222-1234 • FXO interface card X100P • Plug in the physical line • One conversation per line • More lines needed for real-life scenario

  29. The Internet • WAN interface instead of LAN • Server - Routable IP 139.142.2.2 • The phones (clients) may be behind their own firewall or NAT but as longas they can contact the server

  30. Office PBX Example

  31. Variation

  32. Summary • VoIP (the big picture) • Asterisk • Architecture • Channels • Example • Dialplans

  33. Dialplans • The glue that holds everything together • Scripting language • Matches extension and launches a certain application • Example 1234,1,Dial(SIP/1234) Application Arguments Extension Priority

  34. Dialplans • Priorities 1234,1,Dial(ZAP/2|15) 1234,2,Voicemail(u1234) • Patterns _9XXXXXXX,1,Dial(Zap/2) • Variables _123XXXX,1,Dial(SIP/{$EXTEN})

  35. Dialplans • Contexts • Security mechanism • Channel • Time of day • Example [from-local] _9XXXXXXX,1,Dial(Zap/1) [from-untrusted] _91234444,1,Dial(Zap/2) • Logical code blocks … include, etc.

  36. Dialplans • Arithmetic • If,Else,Goto • Time of day • Macros

  37. Applications • Answer • DBget / DBput • Festival • MP3Player • Queue • Record • Meetme • System

  38. Digging Deeper • /etc/asterisk • sip.conf • extensions.conf • zapata.conf • … • Asterisk CLI • ethereal • ngrep

  39. Summary • VoIP (the big picture) • Asterisk • Architecture • Channels • Example • Dialplans • Getting Started

  40. Getting startedAsterisk@Home • Asterisk • AMP • Meetme • Music on hold • Flash panel • Call logs • Sugar CRM • Home automation • Wipes your HD!

  41. Resources • asterisk.org (home) • voip-info.org (wiki) • asterisk-users@lists.digium.com (mailing list) • digium.com (asterisk creators – hardware) • E-bay (hardware) • Books • VoIP Telephony with Asterisk (Paul Mahler) • Asterisk: The Future of Telephony (online) • florien.ca (paid support)

  42. Questions?

  43. NAT : SIP/RTP • Opening ports (ugly) • 5060 UDP • 10000 – 20000 UDP • Hard code external IP • STUN (elegant but not 100% reliable) • Detects external IP • Detects external port • Keep alive • Media Proxy • Send all voice through Asterisk

  44. NAT: IAX2 • NAT problems? What NAT problems? • Single UDP port • High performance, low overhead • … • Lack of hardware support • DIAX • Digium Iaxy

  45. Codecs • G.711 (ulaw/alaw) • 64 Kbps • G.726 (half rate G.711) • 32 Kbps • GSM (Cell phone codec) • 12 Kbps • G.723.1 (also in Netmeeting) • 6.3 or 5.3 Kbps • Many others …

  46. Other Platforms • SipXpbx • SER (SIP Express Router) • Vocal

More Related