Introduction
This describes concept of dial-peer and steps to debug dial-peer.
Cisco IOS uses two types of dial-peers. They are defined as:-
- Plain old telephone systems (POTS) dial peer—These define the characteristics of a traditional Telephony network connection. The POTS dial peer maps a dial string to a specific voice port on the local router/gateway. Normally, the voice port connects the router/gateway to the local public switched telephone network (PSTN), private automatic branch exchange (PBX), or telephone.
- Voice-Network dial peers—These define the attributes of a packet voice network connection. Voice-Network dial peers map a dial string to a remote network device.
Different technologies used by dial peers are explained here:-
- Voice over IP (VoIP) - The dial peer is mapped to the IP address, Domain Name System (DNS) name, or server-type of the destination VoIP device that terminates the call. This applies to all VoIP protocols such as H.323, SIP, and Media Gateway Control Protocol (MGCP).
- Voice over Frame Relay (VoFR) - The dial peer is mapped to the data-link connection identifier (DLCI) of the interface from which the call exits the router.
- Voice over ATM (VoATM) - The dial peer is mapped to the ATM virtual circuit for the interface from which the call exits the router.
- Multimedia Mail over IP (MMoIP) - The dial peer is mapped to the e-mail address of the Simple Mail Transfer Protocol (SMTP) server. This type of dial peer is used for Store and Forward Fax (on-ramp and off-ramp faxing).
Syntax of a pots dial-peer
dial-peer voice <tag> pots
destination-pattern <number>
port <port #>
<other configurable options>
- tag is a numeric value that has locally significant only.
- destination-pattern <number> - number needed to route a call (valid characters are 0-9, A-D, *, #, . , T).
- port <port#> - voice-port where the call is sent once a destination-pattern is matched.
- <Other configurable options>
application <ivr application>
Note - Pots peers strip the pattern that is match and forwards the rest.
Example
dial-peer voice 123 pots dial-peer voice 123 pots
destination-pattern 2.. ===> destination-pattern 2
port 1/1/0 port 1/1/0
prefix 2 prefix 2
Note:- the above 2 peers are functionally equivalent.
Wild-cards - A dot (.) is used to represent any single digit to be collected ex. 2…. Would match any extension in RTP.
T - used for variable length dialing - Gateway will continue to collect digits until the inter-digit timeout expires - can incorporate a terminating character with:‘dial-peer terminator x’ globally, where x is any DTMF tone.
Matching rules for Outbound dial-peer
For call routing, dial-peers are matched solely on destination-pattern using the following rules:-
1. Most exact longest match.
2. Preference is used as tie breaker.
Note: If variable length dialing is *NOT* used!
Example 1:
dialpeer destpat preference session-target
1 4085271048 0 (highest) voip1
2 408527.... 0 voip2
3 408527.... 1 (lower) pots 1 (interface)
4 .......... 1 0:D (interface)
5 .......... 0 voip3
So, if the called number is 4085271048, the order of attempts will be 1,2,3,5,4.
Example 2:
dial-peer destpat preference
1 408527.... 0
2 4085271048 1
3 4085271... 0
And the number dialed is 4085271048, the order will be 2, 3, 1.
Note that digits matched supercedes precedence.
If variable length dialing is used, then dial-peer matching changes slightly for calls where the DNIS is received one digit at a time (i.e. not PRI):
• The first match is taken regardless of the number of digits explicitly matched if “digit T” is not used.
• Longest match is still followed if all destination-patterns have “digit T”
Example - Variable length dial string
Example 1:
dialpeer destpat preference session-target
1 4085271048 0 voip1
2 408… 1 voip2
3 408… 0 voip3
So, if the called number is 4085271048, the order of attempts will be 3 then 2. and only 408527 will be collected by the router. Peer 1 will never be
used. If the call is an inbound ISDN call with called party=4085271048, then peer 1 will be matched.
Example 2:
dialpeer destpat preference session-target
1 408527104.T 1 voip1
2 408…T 0 voip2
So, if the called number is 4085271048, the order of attempts will be 1 then 2.
Matching rules for inbound VoIP peers
For peers where the call leg (VoIP) matches the dial-peer type (VoIP):
1. if the type is matched, associate the called number with the ”incoming called-number <string>”
2. else if the type is matched, associate calling-number with
”answer-address <string>”
3. else if the type is matched, associate calling-number with
”destination-pattern <string>”
4. else match PID=0
Answer-address: config option under a dial-peer that is used to match the ANI of the call to the <string> in the config command.
Incoming called-number: config option under a dial-peer that is used to match the DNIS of the call to the <string> in the config command.
Peer ID 0 (PID=0)
Peer ID 0 is an un-configured dial-peer used for inbound matching only. The matched inbound peer defaults to PID=0 if no other inbound peer is found based on matching criteria.PID=0 has a default configuration that cannot be changed.
Example for inbound voip peer
Output of “debug voip ccapi inout”:
Example 1 - No voip peers:
*Mar 2 01:19:50.561: cc_api_call_setup_ind (vdbPtr=0x815CAA28, callInfo={called=200, calling=100, fdest=1 peer_tag=0}, callID=0x816AAEC0)
Example 2: - dest-pat only
dial-peer voice 1234 voip
destination-pattern 1..
session target ipv4:10.1.1.1
*Mar 2 01:22:14.089: cc_api_call_setup_ind (vdbPtr=0x815CAA28, callInfo={called=200, calling=100, fdest=1 peer_tag=1234}, callID=0x816AAEC0)
Example 3: - overriding with answer-address
dial-peer voice 1234 voip
destination-pattern 1..
session target ipv4:10.1.1.1
!
dial-peer voice 9876 voip
answer-address 100
*Mar 2 01:28:03.173: cc_api_call_setup_ind (vdbPtr=0x815CAA28, callInfo={called=200, calling=100, fdest=1 peer_tag=9876}, callID=0x816AAEC0)
Example 4: - overriding answer-address with incoming called number
dial-peer voice 1234 voip
destination-pattern 1..
session target ipv4:10.1.1.1
!
dial-peer voice 9876 voip
answer-address 100
!
dial-peer voice 5678 voip
incoming called-number 200
*Mar 2 01:29:11.089: cc_api_call_setup_ind (vdbPtr=0x815CAA28, callInfo={called=200, calling=100, fdest=1 peer_tag=5678}, callID=0x816AAEC0)
PID 0 for inbound voip peers has the following configuration:
- any codec
- ip precedence 0
- vad enabled
- no rsvp support
- fax-rate voice
PID 0 for inbound pots peers has the following configuration:
no ivr application
Related Links
https://supportforums.cisco.com/thread/2188482