Thursday, December 16, 2010

Internet Telephony Service Providers ccsp course training in new delhi

Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192

As VoIP technology matured and stabilized, telephone service providers began extending VoIP connectivity to their
customers, allowing for simple, flexible connection alternatives to traditional TDM links. Internet Telephony Service
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
Consider the following configuration:
d i a l - p e e r voice 10 voip
d e s t i n a t i o n - p a t t e r n .T
session target ipv4:10.10.10.1
i
d i a l peer voice 20 voip
d e s t i n a t i o n - p a t t e r n 8 6 7 [ 2 - 3 ] . ..
session target ipv4:10.10.20.1
!
d i a l - p e e r voice 30 voip
d e s t i n a t i o n - p a t t e r n 8674...
session t a r g e t ipv4: 10.10.30.1
i
d i a l - p e e r voice 40 voip
d e s t i n a t i o n - p a t t e r n 8675309
session t a r g e t i p v 4 : 1 0 . 1 0 . 4 0 .1
Given this configuration, the following example dialed numbers illustrate how the patterns match dialed digits:
• The dialed number 867-5309 will match dial peer 40 (exact 7-digit match)
• The dialed number 867-4309 will match dial peer 30 (first four digits match)
• The dialed number 867-3309 will match dial peer 20 (first four digits match)
• The dialed number 876-5309 will match dial peer 10 (no other exact match, so the ".T" pattern matches)
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
Providers (ITSP) connections are typically much less expensive, available in smaller bandwidth increments than Tl or
PRI links, and can route nonvoice data traffic concurrently. QoS configuration is supported (and in fact is required for
proper VoIP operation). Most ITSP links use SIP, but H.323 is an option. The gateway configuration is relatively simple,
with the creation of a VoIP dial peer pointing at the provider with the parameters they supply. PSTN calls are routed to
the provider, who then routes calls to their PSTN connection, usually with a toll-minimizing route that dramatically
reduces long-distance costs to the customer.
Understanding Call Setup and Digit Manipulation
Successfully completing a phone call requires that the correct digits are sent to the terminating device, whether on the
VoIP network or the PSTN. PSTN calls are typically more complex because of the varying local and international
requirements for the number of digits required to route the call. Over and above this basic requirement are the additional
complexities imposed by requirements of the business: we may want to change our ANI number, add or strip access
codes, compensate for undesirable default behavior, or build specialized functionality for our particular purposes. This
section deals with digit manipulation and troubleshooting.
Digit Consumption and Forwarding
Some strange things happen when an IOS gateway matches a dial peer for an outbound call leg and forwards the dialed
digits to the terminating device.
For POTS dial peers, the gateway consumes (meaning strips away) the left-justified digits that exactly match the dial-peer
destination pattern and forwards only the wildcard-matched digits to the terminating device. Clearly, this could cause
problems if the PSTN were to receive only 4 digits, as in this example:
d i a l - p e e r voice 20 pots
d e s t i n a t i o n - p a t t e r n 8 6 7 . . ..
port 1/0:1
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
With this configuration, if the dialed number was 867-5309, the gateway would forward only 5309 (the wildcard
matches), and the PSTN would be unable to route the call. Adding the command no digit-strip in the dial-peer configuration
will change this behavior and cause the gateway to forward all dialed digits.
For VoIP dial peers, the default behavior is to forward all collected digits.
Digit Collection
The router will collect digits one at a time and attempt to match a destination pattern. As soon as it has an exact match,
the call is immediately placed, and no more digits are collected. If there are destination patterns that have overlapping
digits, this can cause calls to be misrouted, as in the following example:
D i a l - p e e r voice 1 voip
D e s t i n a t i o n p a t t e r n 555
Session target i p v 4 : 1 0 . 1 . 1 .1
!
D i a l - p e e r voice 2 voip
D e s t i n a t i o n - p a t t e r n 5552112
Session t a r g e t i p v 4 : 1 0 . 2 . 2 .2
If the user dials 555-2112, dial peer 1 will exactly match at the third digit, the call will be immediately routed using dial
peer 1, and only the collected digits of 555 will be forwarded. We solve the problem by changing the configuration as
shown next:
D i a l - p e e r voice 1 voip
D e s t i n a t i o n p a t t e r n 5 5 5 . . ..
Session target i p v 4 : 1 0 . 1 . 1 .1
!
D i a l - p e e r voice 2 voip
D e s t i n a t i o n - p a t t e r n 5552112
Session t a r g e t i p v 4 : 1 0 . 2 . 2 .2
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
Now, when the third digit is entered, the router cannot make an exact match because both dial peers are possible matches;
when the last digit is dialed, the router determines that dial peer 2 is an exact match and immediately places the call. Dial
peer 1 is also a match, but because of the wildcards, the destination pattern matches 10,000 possible numbers (0000
through 9999); it is not as close a match as dial peer 2.
Digit Manipulation
Sometimes we need to add, change, or remove digits before the call is placed. We do this to avoid inconveniencing users
or to match the dialed digit requirements of a gateway or the PSTN. We have several methods of modifying the digit
string, as described in the following sections.
prefix
The prefix dial-peer command adds digits to the beginning of the string after the outbound dial peer is matched but
before passing digits to the destination. An example of its use is a POTS dial peer with 2 . . . as the destination pattern. If
the user dials 2112, the default behavior is for the POTS dial peer to forward only 112. Adding the command prefix
6045552 forces the router to prepend the additional digits required to route the call over the PSTN:
d i a l - p e e r voice 20 pots
d e s t i n a t i o n - p a t t e r n 2 . ..
p r e f i x 6045552
port 1/0/0
forward-digits
forward-digits: This dial-peer command forces the specified number of digits to be forwarded, whether the digits were
exact match or wildcard matches, overriding the default behavior of stripping the exact matches. You can specify a
number of digits to forward (as shown in the example that follows) or use forward-digits all to force all dialed digits to
be forwarded.
d i a l - p e e r voice 20 pots
d e s t i n a t i o n - p a t t e r n 5552...
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
forward-digits 7
port 1/0/0
Number Expansion
num-exp: The number expansion table is a global command that either expands an extension (perhaps a 4-digit extension
into a full 10-digit PSTN number) or completely replaces one number with another. This command is applied before the
outbound dial peer is matched, so there must be a configured dial peer that matches the expanded number for the call to
be forwarded.
num-exp 2 . . . 5552...
d i a l - p e e r voice 20 pots
d e s t i n a t i o n - p a t t e r n 5552...
port 1/0/0
Translation Rules
voice translation-rule: This global command configures number translation profiles to allow us to alter the ANI, DNIS,
or redirect number for a call. Using the command is a three-step process:
1. Define the translation rule globally:
voice t r a n s l a t i o n - r u l e 1
r u l e 1 /555/ /867/
The rule command defines a pattern to match (in this case 555) and a pattern to change the matched digits to (in this
case 867). The match and replace patterns are identified and separated by the "/" characters that begin and end the
patterns.
Cisco Regular Expression Characters for Voice Translation Rules
Character Description
Matches any single character.
\ (match) In the match phrase: Escape the special meaning of the next character.
\(replace) In the replace phrase: Reference a set number from the match phrase.
A Match the expression at the beginning of the digit string.
$ Match the expression at the end of the digit string.
/ Identifies the start and end of both the match and replace phrases.
[0-9] Match a single character in a list.
[A0-9] Do not match a single character specified in the list.
continues
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
2. Create the voice translation profile containing the translate instruction (the options are [calledlcallingl
redirect-calledlredirect-target], and reference the rule we just defined by number. In this example we are translating
the called number:
voice t r a n s l a t i o n - p r o f i l e JENNY
t r a n s l a t e c a l l e d 1
3. Apply the profile to one or more dial peers, either inbound or outbound:
d i a l - p e e r voice 20 pots
d e s c r i p t i o n t r a n s l a t e d to Jenny
t r a n s l a t i o n - p r o f i l e outgoing JENNY
d e s t i n a t i o n - p a t t e r n 5552...
port 1/0/0
Translation rules use regular expression syntax, which can be quite complex. The following table defines the characters
used, and examples follow.
* Repeat the previous expression 0 or more times.
+ Repeat the previous expression 1 or more times.
? Repeat the previous expression 0 or 1 time.
() Identifies a set in the match expression.
Example 1:
r u l e 1 /123/ /456/
The first set of forward slashes defines the match phrase; the second set defines the replace phrase. This expression means
"match 123 and replace it with 456." Thus:
• 123 is replaced with 456
• 6123 is replaced with 6456
• 1234 is replaced with 4564
• 1234123 is replaced with 4564123 (only the first instance of the match is replaced)
Example 2:
voice t r a n s l a t i o n ? r u l e 1
r u l e 1 / A 4 0 . . . / /66660B0/
This example replaces any five-digit number that begins with "40" with the number "6666000".
Example 3:
voice t r a n s l a t i o n ? r u l e 1
/ A \ ( 8 6 7 \ ) \ ( . . . . \ ) / /555\2/
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
Cisco Regular Expression Characters for Voice Translation Rules continued
© 2008 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 147 for more details.
This example means: "If the number starts with 867 and is followed by any four other digits, change the 867 to 555 and
replace the other four digits with the digits in Set 2 of the match." Remember that the forward slashes define the match
and replace phrases; the backslashes mean "the next character is not part of what to match"; the round brackets indicate
which sets of characters in the matched number to keep in the replaced number. The sets are numbered starting with 1, so
the first set of round brackets is 1, and the second is 2 (as in this example).

No comments:

Post a Comment