Setting Up Cisco IP PBX
This KB will explorer setting up a Cisco IP PBX for PRI traffic to Phones.
For the purpose of this document, you have a Cisco IP PBX that is separate from your primary router for any number of reasons. The Cisco IP PBX is not responsible for anything accept DHCP, routing calls, and Storing Voicemail.
You will need two separate VLANs established on your switch, one for DATA traffic (routable outside your local IP Scheme) and a separate VLAN for only voice traffic. For the sake of this, VLAN 1 is DATA, VLAN 10 is VOICE.
hostname R2-PBX ! boot-start-marker boot-end-marker ! card type t1 0 0 ! no aaa new-model clock timezone Detroit -5 0 network-clock-participate wic 0 network-clock-select 1 T1 0/0/0 ! ip cef ! ip dhcp excluded-address 10.1.1.1 10.1.1.100 ip dhcp excluded-address 10.1.10.1 10.1.10.100 ! ! (It does not matter where you assign your Computer IPs from. ! For the sake of comparison, I assigned them from here.) ip dhcp pool DATA-1 network 10.1.1.0 255.255.255.0 default-router 10.1.1.1 dns-server 10.1.10.21 ! ! (These IPs will only be assigned to Phones) ip dhcp pool PHONES-1 network 10.1.10.0 255.255.255.0 default-router 10.1.10.1 ! (Option 150 informs the Phone of the ! Cisco Call Manager's IP Address) option 150 ip 10.1.10.5 dns-server 10.1.1.30 ! no ipv6 cef multilink bundle-name authenticated ! isdn switch-type primary-ni ! voice-card 0 voice-service dsp-reservation 60 ! voice service pots ! ! (This specifies what kind of connections ! are allowed between devices) voice service voip allow-connections h323 to sip allow-connections sip to h323 allow-connections sip to sip fax proto t38 vers 0 ls-redund 0 hs-redund 0 fallback none sip ! ! (This is what initializes voice services) voice register global ! (This will initialize Cisco Call Manager Express) mode cme ! (This will set the maximum number of Directory numbers) max-dn 400 max-pool 10 mwi stutter mwi reg-e164 ! (This is what extension Voicemail will exist on) voicemail 9990 ! (This is the phone's profile serial number) create profile sync 0017990697531005 ! (This command establishes the QoS Tag ! for Voice Traffic) ip qos dscp cs1 service ! (If you plan on using video calling, ! you will need these commands) camera video ! license udi pid CISCO2921/K9 sn FTX1731AK84 license accept end user agreement license boot module c2900 technology-package uck9 hw-module ism 0 ! hw-module pvdm 0/0 ! redundancy ! controller T1 0/0/0 cablelength short 110 pri-group timeslots 1-18,24 ! interface Embedded-Service-Engine0/0 ip unnumbered GigabitEthernet0/0.1 ! ! (Because there are two VLANs, you will need to remove ! any IP Addresses from the Interface) interface GigabitEthernet0/0 no ip address duplex auto speed auto ! interface GigabitEthernet0/0.1 ! (Instantiation of VLAN 1) encapsulation dot1Q 1 native ip address 10.1.1.5 255.255.255.0 ! interface GigabitEthernet0/0.10 ! (Instantiation of VLAN 1) encapsulation dot1Q 10 ip address 10.1.10.5 255.255.255.0 ! ! (This creates the Cisco Unity Express Engine [Voicemail]) interface ISM0/0 ip unnumbered GigabitEthernet0/0.1 ! (This is the IP Address of the Voicemail Engine) service-module ip address 10.1.10.7 255.255.255.0 !Application: CUE Running on ISM service-module ip default-gateway 10.1.10.5 ! interface ISM0/1 description Internal switch interface connected to Internal Service Module no ip address ! ! (You will need to work with your PRI provider to ! set the specifics for your provider) interface Serial0/0/0:23 no ip address encapsulation hdlc isdn switch-type primary-ni isdn incoming-voice voice ! no ip forward-protocol nd ! ! (If you will have any SIP Running, you will need to ! allow piggybacking) ip nat piggyback-support sip all-messages router 1 ! ip route 0.0.0.0 0.0.0.0 10.1.10.1 ! (This creates your route to the Voicemail Engine) ip route 10.1.10.7 255.255.255.255 ISM0/0 ! voice-port 0/0/0:23 ! voice-port 0/1/0 ! voice-port 0/1/1 ! ! mgcp ! mgcp profile default ! ! (Creates the Dialing Plan for outgoing calls) dial-peer voice 2 pots description OUTGOING CALLS ! (this creates a dialing plan that calls out when 9 ! digits are dialed) destination-pattern .......... clid override rdnis ! (The port of your PRI) port 0/0/0:23 forward-digits all ! ! (Creates the Dialing Plan for incoming calls) dial-peer voice 1 pots description INCOMING CALLS ! (You will need to work with your PRI provider to ! established your "Digits Received". In this case, ! there are 7 digits received. The leading "248" is ! appended to the digits so it can route the call to ! the correct DN) incoming called-number 248....... direct-inward-dial ! (The port of your PRI) port 0/0/0:23 ! ! (Creates the Dialing Plan for voicemail) dial-peer voice 3 voip ! (The first three digits of your Voicemail Ext) destination-pattern 999. b2bua ! (Protocol for communications with your VM) session protocol sipv2 ! (IP Address of your VM System) session target ipv4:10.1.10.7 dtmf-relay sip-notify codec g711ulaw no vad ! ! (This line will allow for the notification light that ! you have a waiting Voicemail) sip-ua mwi-server ipv4:10.1.10.7 expires 3600 port 5060 transport udp ! gatekeeper shutdown ! ! (This will Create the Phone's Profiles on your Call Manager) telephony-service ! (Maximum number of phones allowed on your System) max-ephones 100 max-dn 200 ! (IP Address and Port of your Call Manager) ip source-address 10.10.10.5 port 2000 max-redirect 15 ! (If you will allow Auto Registration of Phones to your ! Call manager, here is were it is activated from. If ! you do not want Auto Registration, remove this) auto assign 1 to 10 auto assign 1 to 100 calling-number initiator ! (You will need to upload your phones Template to your ! Call manager and register it here) load 8941 11NOV15 ! (The extension of the Voicemail system) voicemail 9990 max-conferences 10 gain -6 ! (Creates a web portal for the Management of your phones) web admin system name *USERNAME* secret *PASSWORD* dn-webedit time-webedit transfer-system full-consult directory last-name-first create cnf-files version-stamp Jan 01 2002 00:00:00 ! ! (Creates the Directory Numbers for Phones) ephone-dn 1 dual-line ! (This is the Primary number to this Office and ! the operators Extension) number 2485551000 secondary 0 label Main Line name Main Line ! (If busy, forward to Voicemail) call-forward busy 9990 ! (If no one answers in 10 Seconds, forward to Voicemail) call-forward noan 9990 timeout 10 ! ephone-dn 2 dual-line ! (The number is the Primary Number, the Seconday is ! The user's internal Extension) number 2485551002 secondary 1002 label Operations name Operations call-forward busy 9990 call-forward noan 9990 timeout 10 ! ephone-dn 3 dual-line number 2485551003 secondary 1003 label Accounting name Accounting call-forward busy 9990 call-forward noan 9990 timeout 10 ! ephone-dn 4 dual-line number 3135551004 secondary 1004 label Mail Room name Mail Room call-forward busy 9990 call-forward noan 9990 timeout 10 ! ! (This is the DN for Voicemail) ephone-dn 90 mailbox-selection last-redirect-num number 9990 ! ! (Allows VM to inform Phones they have a VM waiting) ephone-dn 91 number 9991 mwi-type both mwi on-off ! ! (Allows VM to inform Phones they have NO VM waiting) ephone-dn 92 number 9992 mwi off ! ! (Allows Paging of Phones) ephone-dn 98 number 4499 no-reg primary name Page All ! (This is a random Broadcast IP that the phones ! will listen on for Paging) paging ip 22.214.171.124 port 2000 ! ! (This puts in place the Auto Attendant using the ! Voicemail system) ephone-dn 99 number 9999 name Auto Attendant ! ! (This creates the profile for a Phones) ephone 1 description Operations ! (This allows video calling on this Phone) video ! (MAC of Phone for authentication) mac-address 20BB.0000.0000 ! (The phones Paging group) paging-dn 98 ! (Type of Phone) type 8941 ! (Allows for VM Notifications) mwi-line 1 keep-conference local-only ! (Buttons: the first number tells the phone what line ! we will be specifying for, the second number is the DN ! of the Line) Example - Ext 1:DN 3, Ext 2:DN 1 ! (You can use ":" for normal ring, "s" for silent ring, etc) button 1:2 2:1 ! ephone 2 video mac-address 20BB.0000.0000 paging-dn 98 type 8941 keep-conference local-only button 1:3 2:1 ! ephone 3 video mac-address 20BB.0000.0000 paging-dn 98 type 8941 keep-conference local-only button 1:4 ! end
Questions? Leave a comment.