Discovery 16: Configure ISDN Circuits and POTS Dial Peers
Introduction
In this lab exercise, you will configure the ISDN circuit on a Cisco router.
The lab environment includes the HQ Cisco Unified Communications Manger set up with a SIP trunk to the Cisco
ISR router as you would have at a customer site. A second Cisco Unified Communications Manager and a second
ISR router are used to simulate the outside PSTN network. Your second Cisco IP Communicator phone will be
registered to this second Cisco Unified CM and behave just as POTS based phone would do.
Before calls can be sent out of the router to the PSTN network the PRI interface has to be configured. This lab will
guide you through the configuration of a PRI circuit.
This lab will take approximately 60 minutes to complete.
Topology
Command List
The table describes the commands that are used in this activity. The commands are listed in alphabetical order so
that you can easily locate the information that you need. Refer to this list if you need configuration command
assistance during the lab activity.
Command                        Description
bind all source-interface
                               Configures the interface bind feature for SIP signaling, in SIP mode.
interface-id
codec codec-name               Specifies which codec is to be used for calls matching this dial peer.
debug ccsip messages           Displays SIP signaling messages.
debug isdn q921                Displays Layer 2 access procedures that are taking place on the d-channel of the isdn circuit
                               Displays information about the Layer 3 call setup and teardown information being sent and received on
debug isdn q931
                               the d-channel of an ISDN circuit.
debug voip dialpeer inout      Monitors the dial peer matching process.
Command                              Description
dial-peer voice tag pots             Enters dial-peer configuration mode and specifies POTS.
no digit-strip                       Removes any explicitly listed digits in a POTS destination pattern
dial-peer voice tag voip             Enters dial-peer configuration mode and specifies VoIP.
forward-digits [all] [number of
                                     Indicates how many digits will be sent. The number of digits counts from the end of the pattern.
digits]
port                                 Directs the output to the desired voice port with POTS dial peers.
                                     Allows additional digits to be added to the front of a number after digit-strip or forward-digits has been
prefix
                                     applied.
session protocol sipv2               Configures the VoIP dial peer to use SIP signaling.
session target ipv4:destination-
                                     Specifies the destination IPv4 address for the gateway terminating a VoIP call.
address
show controllers t1 (e1)             Displays information about T1 or E1 links.
show isdn status                     Displays Layer 2 and 3 status information about ISDN circuits.
show voice call status               Displays the status of active voice calls.
sip                                  Enters SIP mode from the voice service voip configuration mode.
voice service voip                   Enters voice service voip configuration mode.
Job Aid
These job aids are available to help you complete the lab activity
IOS CLI Reminders
User Exec Mode                           hostname>                                View basic settings only
                                         hostname> enable
Privileged Exec Mode (enable mode)                                                View settings
                                         hostname
                                         hostname config t
Global Configuration Mode                                                         Full configuration mode
                                         hostname (config)
Specific configuration mode              hostname (config) interface fa0/1
                                                                                  Configures specific component, in this example the interface
Example – line configuration mode        hostname (config-if)
                                         End                                      Return to enable mode
                                         Exit                                     Return to previous mode
                                         ?                                        Help
Dial Plan
                                                      HQ CUCM                               HQ Router (CME)
Directory Number                                      11001                                 12001
Usernames and Passwords
Device                              IP address                           Username                                  Password
Cisco UCM                           10.1.5.5                             Administrator                             C0ll@B
PC-1                                10.1.5.200                           Student                                   C0ll@B
PC-3                                10.1.99.101                          Student                                   C0ll@B
Router 1                            10.1.5.252                           Administrator                             C0ll@B
Task 1: Configure the T1 PRI
Activity
Step 1
  On PC-1, double-click on the Putty icon. Choose router 1, click Load to see the destination settings, and click
  Open.
Step 2
  Notice that the router presents a certificate that is not trusted by the local PC. Click Yes to accept the certificate
  into PuTTY’s certificate store. If connection fail, wait for a white to allow Cisco router complete booting
  process.
Step 3
  Log in with username Administrator and password C0ll@B.
   login as: Administrator
   Using keyboard-interactive authentication.
   Password: C0ll@B
   Config of Course clbadv10, Lab clbadv10-03-05ng, Device ROUTER-1 on Glaslab
Step 4
  Issue the command show inventory to determine what type of digital interface card has been installed and
  where the card resides in the router.
  Note that VWIC2-2MFT-T1/E1 is installed in subslot 0/1. Also check to see that the DSP resources have been
  installed in the same subslot. The router require DSP resources on the T1/E1 cards. Earlier routerscould use
  the DSP resources of the motherboard. DSPs are used to convert traditional telephony voice streamsinto VoIP
  RTP streams and visa versa.
Most ISR devices use multi-function digital circuit cards such as the VWIC2-2MFT-T1/E1 module, which can
supporteither a T1 or E1 digital interface. Since these circuits function differently, you need to tell the router how
whichcircuit you will connect to the port. .
Step 5
  Enter the following commands to configure the VWIC2-2MFT-T1/E1 card as a T1
  interface.
    configure terminal
    card type t1 0 1
    isdn switch-type primary-ni
  The command card type determines if the card will connect to a T1 or E1 interface. The first number indicates
  the slot number of the card. The second number designates the sub-slot.
The result of the card type command is two T1 controllers, 0/1/0 and 0/1/1. The T1 for this exercise uses the first
port on the T1 card.
The isdn switch type can be configured globally as we have here or on each D-channel. The variable you
configure here will depend on your location and the configuration at the other end of your ISDN line - if you are not
sure, ask your ISDN provider. In this case primary-ni is used in North America and sets the ISDN standard required
for this particular connection.
Step 6
  Configure the T1 controller to utilize the T1 PRI
    controller T1 0/1/0
     cablelength short 110
     pri-group timeslots 1-24
An explanation of the commands:
   cablelength--is used to compensate for the cable running from the demarcation point (sometimes called a
   smart jack) to the T1 port. As the cable gets longer, the strength of the signal drops. The cablelength
   parameter adjusts the setting to compensate for this loss.
         The short keyword is used with cables shorter than 655 feet. The final variable is the length of the cable.
         110 is used when the cable is 0 to 110 feet long.
         A long keyword is used for cable lengths more than 655 feet. This mechanism uses a more complex
         method of signal loss compensation that involves a pulse equalizer. The db variable indicates the amount of
         signal gain to add to the circuit.
   Since the lab cable is about 1 foot long, you will use the shortest setting. If this setting does not match the
   physical environment, the T1 circuit will show errors such as slips in timing.
   pri-group timeslots 1-24--configures the T1 port as a Primary Rate Interface using all 24 channels. It is
   possible to configure a fractional T1, which uses less than the full T1’s channels. For example, a fractional T1
   using the first 12 channels would be configured pri-group timeslots 1 -12.
The configuration of the PRI on the controller creates the data channel for the T1. This D-channel uses the last
channel of the ISDN circuit, timeslot 24 on a T1 or channel 16 on an E1.
Step 7
  Configure the PRI D-channel using the following commands:
    interface Serial 0/1/0:23
     no ip address
     encapsulation hdlc
     isdn incoming-voice voice
     isdn bchan-number-order ascending
     no cdp enable
An explanation of the commands:
   The D-channel is created as a serial interface on the router. Since the T1 is port 0/1/0, the Serial interface for
   the D-channel is 0/1/0:23. The router counts ports starting with 0 so the 24th channel is 23. An E1 D-channel on
   the same port would be 0/1/0:15.
   Since the connection is a non-IP connection, there is no need for an IP address for this interface. The command
   no ip address removes this requirement.
   Cisco High-level Data Link Controller (HDLC) is the default protocol for sending data over synchronous serial
   links.
   isdn incoming-voice voice configures the port to treat incoming isdn calls as voice calls that are handled by
   either a modem or a voice dsp, as directed by the call-switching module. This setting is critical since the voice
   dsp is the component that converts the incoming voice to a real-time transport protocol (rtp) stream that can be
   sent over an IP network.
   Most of the default D-channel configuration works for standard T1 circuits. There are parameters that can be
   changes to suit the site’s needs. Parameters such as isdn bchan-number-order define whether the PRI uses
   channel 1 counting up to 23 for outgoing calls or if it will start at channel 23 and go to 1. The latter is called
   ascending. The default value is descending.
   no cdp enable turns off Cisco Discovery Protocol. This protocol allows Cisco networking devices to send
   identifying information at Layer 2. Since ISDN circuits do not use CDP, this default command should be
   disabled.
There are a couple of commands you can use to confirm your configuration and check the line is active.
Step 8
  Type exit to leave the interface configuration mode then exit again to leave configuration mode and enter the
  command show controller t1 0/1/0.
    #show controller t1 0/1/0
    T1 0/1/0 is up
      Applique type is Channelized T1
      Cablelength is short 110
      No alarms detected.
      alarm-trigger is not set
      Soaking time: 3, Clearance time: 10
      AIS State:Clear LOS State:Clear LOF State:Clear
      Framing is ESF, Line Code is B8ZS, Clock Source is Line.
      BER thresholds: SF = 10e-3 SD = 10e-6
      Data in current interval (213 seconds elapsed):
         0 Line Code Violations, 0 Path Code Violations
         5 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
         5 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
This command offers a lot of information in one output. The display shows that the T1 is up, the cable length,
framing, line coding, and clock source are shown. It is easy to compare this information with the requirements of
the circuit.
The second important information is the counter section at the end of the output. The counters for slip seconds and
errored seconds should be low. Ideally the number should be zero but low numbers are usually acceptable and will
not impact users. Other counters such as severely errored seconds, unavail seconds, and bursty errored seconds
are indications of a circuit or cabling issue.
The counters are logging in 15-minute increments. You can use the clear counters command to reset the T1
counters. When the counters are clear, you can easily observe whether the T1 Line experiences any errors.
However, remember that this command clears all other show interface counters as well.
Step 9
  Enter the command show isdn status.
 #show isdn status
 Global ISDN Switchtype = primary-ni
 ISDN Serial0/1/0:23 interface
 dsl 0, interface ISDN Switchtype = primary-ni
     Layer 1 Status:
 ACTIVE
     Layer 2 Status:
 TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
     Layer 3 Status:
 0 Active Layer 3 Call(s)
     Active dsl 0 CCBs = 0
     The Free Channel Mask: 0x807FFFFF
     Number of L2 Discards = 0, L2 Session ID = 5
     Total Allocated ISDN CCBs = 0
Complete these steps to check the status of the layers:
   Verify whether Layer 1 is in the ACTIVE state. The status of Layer 1 must always be ACTIVE unless the T1 is
   down. If the show isdn status command output indicates that Layer 1 is DEACTIVATED, there is a problem
   with the physical connectivity of the T1 line. If the line is administratively down, use the no shutdown command
   to restart the interface.
   Ensure that Layer 2 is in the MULTIPLE_FRAME_ESTABLISHED state, the required state for Layer 2. This
   state indicates that the router received an ISDN SABME (Set Asynchronous Balanced Mode Extended)
   message, and responded with a UA (Unnumbered Acknowledge) frame to synchronize with the Telco switch.
   Furthermore, there must be constant Layer 2 frames (Receiver Ready, RR) frames exchange between the two
   devices. When this situation occurs, the router and ISDN switch have fully initialized the ISDN Layer 2 protocol.
Task 2: Create Outbound POTS Dial-Peer
Each number range that needs to reach a remote destination must match an outbound dial peer. In this task, you
will create a set of POTS dial peers to allow North American Number Plan (NANP) calling from Cisco Unified CM to
the simulated PSTN.
Activity
Step 1
  From PC-1, open Cisco IP Communicator and configure the network preferences as follows:
     Device Name: HQ-CIPC-1
     TFTP server: 10.1.5.5
Step 2
  From PC-3, open Cisco IP Communicator and configure the network preferences as follows:
     Device Name: PSTN
     TFTP server: 10.1.99.252
Step 3
  If not already open on PC-1 use PuTTY to connect to Router-1 and log in with username Administrator and
  password C0ll@B.
Step 4
  Use the command terminal monitor to direct the debug output to your connection.
Step 5
  Turn on SIP debugging by typing debug ccsip messages.
Step 6
  Place a call from 408-555-1001 (PC-1) to 911 (PC-3). The call will fail. The phone will display “Reorder” in the
  lower left side of the phone’s display. Hang up the phone.
Step 7
  Enter no debug all to stop the debug
Step 8
  Examine the debug output to see the cause of the call failure.
  Inbound message from Cisco Unified Communications Manager to router:
   Received:
   INVITE sip:911@10.1.5.252:5060 SIP/2.0 Via: SIP/2.0/TCP 10.1.5.5:5060;branch=z9hG4bK2c133136c
   From: <sip:4085551001@10.1.5.5>;tag=826~7a76e81e-03c1-416e-9828-ca73550e2e9c-30982264
   To: <sip:911@10.1.5.252>
   Date: Fri, 17 Aug 2018 14:02:28 GMT
   Call-ID: 2ba5f780-b761d574-2c0-505010a@10.1.5.5
   Supported: timer,resource-priority,replaces
   Min-SE: 1800
   User-Agent: Cisco-CUCM12.0
   Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE,
   NOTIFY
   CSeq: 101 INVITE
   Expires: 180
   Allow-Events: presence, kpml
 Supported: X-cisco-srtp-fallback,X-cisco-original-called
 Call-Info: <sip:10.1.5.5:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
 Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=DESKTOP
 Session-ID: 5f2894cf38f75fb3c1619c1b1f6aa822;remote=00000000000000000000000000000000
 Cisco-Guid: 0732297088-0000065536-0000000002-0084214026
 Session-Expires: 1800
 P-Asserted-Identity: <sip:4085551001@10.1.5.5>
 Remote-Party-ID: <sip:4085551001@10.1.5.5>;party=calling;screen=yes;privacy=off
 Contact: <sip:4085551001@10.1.5.5:5060;transport=tcp>
 Max-Forwards: 69
 Content-Length: 0
Response to Cisco Unified Communications Manager saying, “hang on while I try to make that happen.”:
 Aug 17 10:02:28: //961/2BA5F7800000/SIP/Msg/ccsipDisplayMsg:
 Sent:
 SIP/2.0 100 Trying
 Via: SIP/2.0/TCP 10.1.5.5:5060;branch=z9hG4bK2c133136c
 From: <sip:4085551001@10.1.5.5>;tag=826~7a76e81e-03c1-416e-9828-ca73550e2e9c-30982264
 To: <sip:9911@10.1.5.252>
 Date: Fri, 17 Aug 2018 10:02:28 EST
 Call-ID: 2ba5f780-b761d574-2c0-505010a@10.1.5.5
 CSeq: 101 INVITE
 Allow-Events: telephone-event
 Server: Cisco-SIPGateway/IOS-16.6.2
 Session-ID: 00000000000000000000000000000000;remote=5f2894cf38f75fb3c1619c1b1f6aa822
 Content-Length: 0
Message to Cisco Unified Communications Manager saying that the destination was not found:
 Aug 17 10:02:28: //961/2BA5F7800000/SIP/Msg/ccsipDisplayMsg:
 Sent:
 SIP/2.0 404 Not Found
 Via: SIP/2.0/TCP 10.1.5.5:5060;branch=z9hG4bK2c133136c
 From: <sip:4085551001@10.1.5.5>;tag=826~7a76e81e-03c1-416e-9828-ca73550e2e9c-30982264
 To: <sip:9911@10.1.5.252>;tag=3D0E846-1DF5
 Date: Fri, 17 Aug 2018 10:02:28 EST
 Call-ID: 2ba5f780-b761d574-2c0-505010a@10.1.5.5
 CSeq: 101 INVITE
 Allow-Events: telephone-event
 Warning: 399 10.1.5.252 "No matching outgoing dial-peer"
 Server: Cisco-SIPGateway/IOS-16.6.2
 Reason: Q.850;cause=1
 Session-ID: 5f2894cf38f75fb3c1619c1b1f6aa822;remote=99f92b41e3d4545ab2f4553575e82d3a
 Content-Length: 0
Response from Cisco Unified Communications Manager acknowledging the 404 message:
 Aug 17 10:02:28: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
 Received:
 ACK sip:911@10.1.5.252:5060 SIP/2.0
 Via: SIP/2.0/TCP 10.1.5.5:5060;branch=z9hG4bK2c133136c
 From: <sip:4085551001@10.1.5.5>;tag=826~7a76e81e-03c1-416e-9828-ca73550e2e9c-30982264
 To: <sip:911@10.1.5.252>;tag=3D0E846-1DF5
 Date: Fri, 17 Aug 2018 14:02:28 GMT
 Call-ID: 2ba5f780-b761d574-2c0-505010a@10.1.5.5
 User-Agent: Cisco-CUCM12.0
 Max-Forwards: 70
 CSeq: 101 ACK
 Allow-Events: presence, kpml
   Content-Length: 0
Step 9
  The call fails because there are no configured dial peers that match the requested digits of 9911. Notice that
  Cisco Unifed CM is transforming 911 into 9911 before sending the call to the gateway. Create a new dial peer
  that will send 9911 calls to the pre-configured T1 PRI and transform the number back to 911.
   configure terminal
    dial-peer voice 911 pots
    destination-pattern 9911
    forward-digits 3
    port 0/1/0:23
  A POTS dial peer is used to create the outbound dial plan, provides manipulation of the called and calling
  numbers and sends the call to the right voice port. The entered dial peer uses the following commands:
     destination-pattern--This command uses various digits and wildcards to match the outbound (called)
     numbers. This particular dial peer is matching the specific digit for emergency calling in the North American
     Numbering Plan.
     forward-digits –-The default behavior of a POTS dial peer deletes any specifically listed digits in the
     destination pattern. The intent of this digit-strip function is to remove the access code before sending the call
     to the voice port. In our example we want to send the last 3 digits. When sending a call to the next hop, the
     router needs to match the dial plan of that device. There are several digit manipulation methods that can be
     used in a POTS dial peer to change the incoming called number into a format needed by the destination
     device.
          digit-strip–-The default configuration of a dial peer is digit strip. Any specific numbers at the beginning of
          the destination pattern will be deleted or dropped. In the 911 dial peer just entered, the dial peer would
          send the call to the voice port but would not send any called number in the setup to the next device. Most
          likely, the call would fail. In this particular dial peer, this default behavior can be negated by entering no
          digit-strip. That command would result in all numbers in the destination pattern are sent to the port.
          forward-digits-–Since digit-strip command is either on or off, it may not give the correct result. Forward
          digits allow you to define more specific results. Forward digits can send a specific number of digits or all
          the digits. If forward-digits 3 is applied, the last three digits of the destination pattern would be sent to the
          voice port. For this particular dial peer, no digit-strip, forward digits all, and forward-digits 3 would all give
          the same results.
          prefix-–This command allows the addition of digits to the front of the result of the digit-strip or forward-
          digits command.
          translation rules–-Translation rules are powerful digit manipulation commands that use regular
          expressions to change any number into any other number.
     port 0/1/0:23 - This is the port that the PRI is connected to and where the call should be sent. :23 refers to
     the D channel within a T1 PRI connection.
Step 10
  Place a test call from the HW phone (4085551001) to 911. The call should succeed. The call will ring in on the
  third button of the PSTN phone on PC-3
Step 11
  Create additional dial-peers to support the following numbers:
     digit 9 access code and 10 digit local numbers
     digit 9 access code and 11 digit long distance numbers
     digit 9 access code and unknown length international numbers
   dial-peer voice 910 pots
    destination-pattern 9[2-9]..[2-9]......
    port 0/1/0:23
  This dial peer works very well with the default digit-strip command. The "9" will be stripped and the remaining
  10 digits will be sent to the voice port. The range [2-9] used for the first digit of the area code and office code are
  considered wildcards, not specific digits.
   dial-peer voice 9110 pots
    destination-pattern 91[2-9]..[2-9]......
    forward-digits 11
    port 0/1/0:23
  The digit manipulation for this dial peer could be accomplished in a couple ways. The default digit-strip
  command would strip the 91, which might be correct depending on the destination PSTN provider. In the case
  where the PSTN needs the 1 to indicate long distance, the command forward-digits 11 would work. Another
  option would be to allow digit-strip to drop the 91 and use the prefix 1 command to add the 1 back onto the
  number.
   dial-peer voice 9011 pots
    destination-pattern 9011T
    prefix 011
    port 0/1/0:23
  digit-strip would remove 9011 from the called number. It would not be possible to use forward-digits because
  the T wildcard allows a variable length number. Since forward-digits works from the end of the number, the
  command is not beneficial. The prefix command allows you to add the 011 back in front of the outgoing number.
  Some service providers do not want the 011 for an international number. In that case, use the default digit-strip
  command.
Step 12
  Place test calls to the following numbers. All calls should succeed.
   911                                                            Emergency Services
   9-911                                                          Emergency Services
   9-408-971-7272                                                 Local 10-digit
   9-1-202-555-0123                                               Long Distance
   9-011-44-207-001-1901                                          International
           The PSTN phone does not accept all NANP numbers. It is simulating a portion of the NANP dial plan.
           You can also dial the international number without the but you will need to wait 15 seconds for the
           interdigit timeout before the call goes through.
Task 3: Create Inbound POTS Dial Peer
In older versions of IOS, the default behavior of a POTS port is to answer the call and play dialtone to the caller.
The theory is that this behavior would allow the caller to dial a valid number and the call would proceed. This
dialing method is called two stage dialing. Most reasonably modern communications systems use one stage dialing
where the call signaling is accepted and the incoming digits are used to match the destination.
One stage dialing is the default action of current IOS XE versions. In that case, it is possible to call inbound via a
T1 / E1 PRI without creating an inbound dial peer.
Older versions of IOS require an inbound dial peer that applies a command called direct-inward-dialing. Many
people still consider it good practice to create a specific inbound dial peer with DID for POTS ports.
Activity
Step 1
  Create a POTS dial peer that will be matched to all incoming POTS calls that applies the DID command.
   dial-peer voice 2 pots
    incoming called-number .
    direct-inward-dial
Step 2
  Place a test call from the PSTN IP Communicator on PC-3 to 1408-555-1001. Do not dial a 9 before the
  numberas you are emulating a call from your home phone. The call should succeed.
Alternate POTS Dial Peer Alternative
The dial peers in the previous tasks will work if you are using the ISR Router as a PSTN gateway, Cisco Unified
CME, or SRST router. The dial peers that you created are specific to the North American Numbering Plan, which is
a fixed-length dial plan.
If the gateway is never going to be used as CME or SRST, you can create a single dial peer that handles all
outgoing and incoming duties. This approach would also work well in a variable length dial plan used in some parts
of the world.
Example Dial Peer
  dial-peer voice 9 pots
   incoming called-number .
   destination-pattern 9T
   direct-inward-dialing
   port 0/1/0:23
This dial peer will work for any number sent from Cisco Unified Communications Manager that has 9 as an access
code and would require prefixing 9 to the 911 route pattern. No digit manipulation is required since the default
digit-strip functionality drops the 9 and all the remaining digit that match the "T" will be sent to the PRI at port
0/1/0:23.
Activity Verification
You have completed this discovery when you have the following results:
   You can successfully call PSTN numbers and answer them on the PSTN phone.
   You can successfully call inbound to the HQ IP phone from the PSTN phone.
 Which three of the following POTS dial-peer commands are used for digit manipulation? (Choose three)
           incoming called-number
no digit-strip
forward-digits
port strip
prefix