Asterisk PBXPSTN to VoIP and never back again
Tomas Florian
IntroIT Consulting: florien.caLinux / Windows interoperationApplication developmentHigh availability hostingWorking 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.
SummaryVoIP (the big picture)Asterisk ArchitectureChannelsExampleDialplansGetting StartedQuestions
The Big PictureGood old internet Some Telco stuff ??
PSTN and the InternetAsterisk
PSTN and the Internet
PSTN vs. VoIPHard wiredExpensiveProprietaryLocalPlain Old ReliabilityCell phone service911 compatibilityFlexible Cost effectiveOpenWorld wideBleeding edgeNot yetHello Calgary Im in Tokyo and I need help
FlexibilityBranch offices / Virtual OfficesTelecommutingAutomated agentsCustom applicationsPress 1 to have your new emails read to youTodays weather forecastGames just another interface to the web (audio)
SummaryVoIP (the big picture)Asterisk Architecture
AsteriskOpen SourceCreated by Mark Spencer (1.0 in 2004)Sponsored by Digium (Hardware)Minimum requirements Linux / FreeBSDPentium 300 MHz128 MB RAM600 MB Disk
Asterisk * good name choiceConnector between all kinds of audio protocols and technologiesPSTNSIP/RTPIAXH323 (Netmeeting)
Architecture*
Architecture*
SummaryVoIP (the big picture)Asterisk ArchitectureChannels
ChannelsAsteriskSIP, IAX, H323ZAP
SIP: Session Initiation ProtocolVoIP favoriteWide hardware and software phone supportHardware phonesExample: BT100Hardware adaptersPAP2Software phonesX-Lite
SIP : IntroductionUA - CallerUA - CalleePort 5060 UDPHuman Readable Text (similar to HTTP)
SIP : IntroductionCallerCallee
SIP Proxy and Registrar
SIP Proxy and Registrar
SIP Proxy and RegistrarRTP
Other VoIP ChannelsIAX (Inter Asterisk eXchange)H323 (Netmeeting)
ChannelsAsteriskSIP, IAX, H323ZAP
ZAP: Interface to the PSTNReuse existing PSTN infrastructureDownstream from Telcolines from Telco terminating at AsteriskFXOBe the Telcolines from Asterisk going to existing phone setsFXSDigium TDM400, X100P (fancy voice modem)
SummaryVoIP (the big picture)Asterisk ArchitectureChannelsExample
Office PBX Example
The OfficeSIP interfaceEthernet (LAN): IP 192.168.0.10VoIP phones on a switchEach phone needs IP (assigned by DHCP)
PSTNZAP interface1 Line: 222-1234FXO interface card X100PPlug in the physical lineOne conversation per lineMore lines needed for real-life scenario
The InternetWAN interface instead of LANServer - Routable IP 139.142.2.2The phones (clients) may be behind their own firewall or NAT but as long as they can contact the server
Office PBX Example
Variation
SummaryVoIP (the big picture)Asterisk ArchitectureChannelsExampleDialplans
DialplansThe glue that holds everything togetherScripting languageMatches extension and launches a certain applicationExample
1234,1,Dial(SIP/1234)
ExtensionApplicationArgumentsPriority
DialplansPriorities1234,1,Dial(ZAP/2|15)1234,2,Voicemail(u1234)
Patterns_9XXXXXXX,1,Dial(Zap/2)
Variables_123XXXX,1,Dial(SIP/{$EXTEN})
DialplansContextsSecurity mechanism ChannelTime of dayExample[from-local]_9XXXXXXX,1,Dial(Zap/1)[from-untrusted]_91234444,1,Dial(Zap/2)Logical code blocks include, etc.
DialplansArithmeticIf,Else,GotoTime of dayMacros
ApplicationsAnswerDBget / DBputFestivalMP3PlayerQueueRecordMeetmeSystem
Digging Deeper/etc/asterisksip.confextensions.confzapata.confAsterisk CLIetherealngrep
SummaryVoIP (the big picture)Asterisk ArchitectureChannelsExampleDialplansGetting Started
Getting startedAsterisk@HomeAsteriskAMPMeetmeMusic on holdFlash panelCall logsSugar CRMHome automationWipes your HD!
Resourcesasterisk.org (home)voip-info.org (wiki)[email protected] (mailing list)digium.com (asterisk creators hardware)E-bay (hardware)BooksVoIP Telephony with Asterisk (Paul Mahler)Asterisk: The Future of Telephony (online)florien.ca (paid support)
Questions?
NAT : SIP/RTPOpening ports (ugly)5060 UDP10000 20000 UDPHard code external IPSTUN (elegant but not 100% reliable)Detects external IPDetects external port Keep aliveMedia ProxySend all voice through Asterisk
NAT: IAX2NAT problems? What NAT problems?Single UDP portHigh performance, low overhead
Lack of hardware supportDIAXDigium Iaxy
CodecsG.711 (ulaw/alaw)64 KbpsG.726 (half rate G.711)32 KbpsGSM (Cell phone codec)12 KbpsG.723.1 (also in Netmeeting)6.3 or 5.3 KbpsMany others
Other Platforms
SipXpbxSER (SIP Express Router)Vocal
Top Related