Running Asterisk in a Corporate Environment: a Beginner s Tale Stephen Uhler Sun Microsystems Laboratories 2005, Sun Microsystems Stephen Uhler Astricon 2005 Sun Labs (1/19)
How I Got into the Phone Business Stephen Uhler Astricon 2005 Sun Labs (2/19)
Early Asterisk Development Stephen Uhler Astricon 2005 Sun Labs (3/19)
The Problem Corporate LAN? firewall Internet POTS VOIP Stephen Uhler Astricon 2005 Sun Labs (4/19)
CNI Q.931 E1 STUN SDP ISDN/PRI VOIP Related Protocols G.711u ADPCM OSP RPT SCCP SIP RTP T1 G.729 E.164 GSM ENUM VOFR DHCP H.323 ADSI NTP SPEEX MGCP SIA SMS TFTP ILBC TDMOE POTS CLASS IAX DTMF Stephen Uhler Astricon 2005 Sun Labs (5/19)
Zap/T1/ ISDN/PRI The Solution * IAX Sparc / Solaris * Sun / Linux SIP Stephen Uhler Astricon 2005 Sun Labs (6/19)
Phone-y Expectations Can you hear me now? The good-old days, when hanging-up on someone actually meant something Stephen Uhler Astricon 2005 Sun Labs (7/19)
DHCP in a Corporate Environment The POTS equivalent of connecting the wires You don t own it It s broken It s easy to spoof The phones won t work without it Stephen Uhler Astricon 2005 Sun Labs (8/19)
The Pieces (from the config file perspective) sip.conf To connect to commercial VOIP phones iax.conf To traverse the corporate firewall zapata.conf To connect to the existing telephony infrastructure extensions.conf To tie everything together Stephen Uhler Astricon 2005 Sun Labs (9/19)
SIP: Take 1 sip.conf [xlite] type=friend username=stephen secret=a_secret callerid= Stephen" <18888> authorization?? Sep 23 17:37:58 NOTICE[29805]: chan_sip.c:9530 handle_request_register: Registration from 'stephen <sip:stephen@sip>' failed for '129.150.27.47' Stephen Uhler Astricon 2005 Sun Labs (10/19)
SIP: Take 2 sip.conf [stephen] type=friend username=stephen secret=a_secret callerid= Stephen" <18888> authorization?? must match for * REGISTER sip:sip SIP/2.0 From: stephen <sip:stephen@sip>;tag=211106824 To: stephen <sip:stephen@sip> Contact: "stephen" <sip:stephen@129.150.27.47:5060> Call-ID: 2678041C0DAD46D08CC6E6913B6CCD04@sip Authorization: Digest username= sauhler",realm="asterisk", Stephen Uhler Astricon 2005 Sun Labs (11/19)
Connecting * s with IAX: Making a VOIP null modem cable Master Slave register=>slave: secret@master.com [slave] username=master host=dynamic secret=secret type=friend auth=md5 context=from_slave peercontext=from_master [master] username=slave host=master.com secret=secret type=friend auth=md5 context=from_master peercontext=from_slave Stephen Uhler Astricon 2005 Sun Labs (12/19)
Getting Zapped How (not) to connect to the Company PBX Learn Telco Speak Connect the TE110P to the G3R through the 120A2 CSU module with a TN464 circuit pack configured for ISDN-PRI protocol version B with mulaw companding over a T1 cross-cable. Stephen Uhler Astricon 2005 Sun Labs (13/19)
Putting Contexts in Context Calls enter a context from a channel SIP, IAX, Zap... Specify context name with: context=name iax.conf, sip.conf [name] extensions.conf Name context based on capability, not technology Put capabilities that connect channels in their own contexts Stephen Uhler Astricon 2005 Sun Labs (14/19)
More Context [poly_63b] type=friend context=office 911 [office] include=>tests include=>local include=>pstn [tests] exten=>911,1,macro(emergency... exten=>600,1,echo... [local] exten=>101,1,dial(sip/poly_123... exten=>102,1,dial(sip/grand_a47... [pstn] exten=>_91x.,1,dial(zap/g1/${exten}) Stephen Uhler Astricon 2005 Sun Labs (15/19)
Contexts Call Flow extensions.conf iax.conf Master Dial(IAX2/slave/${EXTEN}) [from_slave] exten [slave] username=master context=from_slave peercontext=from_master Slave [from_master] exten [master] username=slave context=from_master peercontext=from_slave Stephen Uhler Astricon 2005 Sun Labs (16/19)
Contexts Call Flow extensions.conf [from_slave] exten Master Slave Dial(IAX2/master/${EXTEN}) [from_master] exten iax.conf [slave] username=master context=from_slave peercontext=from_master [master] username=slave context=from_master peercontext=from_slave Stephen Uhler Astricon 2005 Sun Labs (17/19)
A Caller-Id Example ; Send 5-digit caller-id to local extensions, 10-digit callerid otherwise [macro-t1] exten => s,1,set(callerid(num)=${if(${math(${len(${macro_exten})}>5,i)} exten => s,2,dial(zap/g1/${macro_exten})?${ext_prefix}${callerid(num):-2} ${CALLERID(NUM)})}) : Stephen Uhler Astricon 2005 Sun Labs (18/19)
Sunlabs Setup Conference Server Legacy PBX * * Main PBX Sparc Solaris * DMZ Gateway NAT Firewall Mercury Remote PBX * SIP IAX ISDN/PRI Asterisk * X18888 Home Office Satellite Office Stephen Uhler Astricon 2005 Sun Labs (19/19)