In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
1. TranslationRule: conversion rules
Used to convert inbound and outbound numbers, used in the egress of dial-peer, the entry of voice-port, and voip-incoming (global configuration), as shown in the figure:
Dial-peer export
R1 (config) # dial-peer voi 1000 voip
R1 (config-dial-peer) # translat?
Translate-outgoing translation-profile
Voip-incoming (global configuration)
R1 (config) # voip-incoming?
Translation-profile Translation profile
Translation-rule Global digit manipulation and translation
Translation-rule 1
Rule 1 ^ 87651 1 converts a number that begins with 87651 to 1
!
Voice-port 2AUO translation rule 23 calls translation rule at voice-port port
Translate called 1 Please note that this is called, that is, the entry direction.
Character interpretation of Voice Translation Rule:
Symbol
Use
.
Any number (0-9)
[0-9]
Any number in the range of 0-9 can also be used to denote discontinuity and continuity.
*
0 or more identical digits
+
One or more identical digits
?
0 or 1 same number of digits
. *
Any digit, which can be 0
. +
Non-zero any number
$
Terminator
^
Start after this symbol
^ $
Null, that is, no numbers
\
Escape character, which indicates in match pattern that before that, copy.
In replace pattern, it means paste after that.
()
Represents a collection that is used when copy numbers
For example:
1.1. Convert 5191xxx to 1xxx
At this point, you can do two things, that is, add each item one by one:
The content of Rule 1 / ^ 5191001 $/ / 1001 / rule is written in / /, the first / / is the converted number, and the second / / is after conversion. Obviously, this will not work, and it will greatly increase the equipment operation and IT maintenance work.
Unify the transformation with transformation variables:
Rule 1 / ^ 519\ (1...) $/ /\ 1 / Please note the escape character\ used here, which means to retain the contents of the first () in the converted / /, that is, 1.
The complete way of writing:
R1 (config) # voicetranslation-rule 1-create translation rule 1
R1 (cfg-translation-rule) # rule 1 / ^ 519\ (1...\) / /\ 1 /-- defines translation rule 1
R1 (config) # voice translation-profile OUT-CALL-create the translation file OUT-CALL. The reason for this profile is that both inbound and outgoing directions can be defined in a profile, which is easy to call.
R1 (cfg-translation-profile) # translate called 1-call rule 1
R1 (config) # dial-peer voic 1000 voip
R1 (config-dial-peer) # translation-profile outgoingOUT-CALL-call the translation file OUT-CALL in dial-peer and apply it to the outgoing direction
Use the test command to view the conversion:
R1#test voicetranslation-rule 1 5191001
Matched with rule 1
Original number:5191001 Translated number: 1001
1.2. Replace the 4-digit number starting with 10 with the number "58156000":
Voice translationrule 1
Rule 1 / ^ 10.. / / 58156000 /
Use test to view the transition status
Test voice translationrule 1 1001
Matched with rule 1
Original number: 1001 Translated number: 58156000
1.3. Replace all numbers with "86001000":
R1 (config) # voice translation-rule 3
R1 (cfg-translation-rule) # rule 1 / .$ / / 86110000 /
R1#test voice translation-rule 3 123
Matched with rule 1
Original number: 123 Translated number: 1286110000 Please pay attention to this and follow the rule above
R1 (config) # voice translation-rule 4
R1 (cfg-translation-rule) # rule 1 /. * $/ / 86001000 /
R1 (cfg-translation-rule) # end
R1#test voice translation-rule 4 123
Matched with rule 1
Original number: 123 Translated number:86001000 Please note the comparison with the above
R1#test voice translation-rule 4 5191000
Matched with rule 1
Original number: 5191000 Translated number: 86001000
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
R1#test voice translation-rule 4..
Matched with rule 1
Original number:.. Translated number: 86001000
The symbol of R1#test voice translation-rule 4 "" doesn't work.
^% Invalid input detected at'^ 'marker.
R1#test voice translation-rule 4. *
Matched with rule 1
Original number:. * Translated number: 86001000
R1#test voice translation-rule 4 / /
Matched with rule 1
Original number: / / Translated number: 86001000
1.4 convert non-empty numbers to 86001000
R1 (config) # voice translation-rule 5
R1 (cfg-translation-rule) # rule 1 /. + $/ / 86001000 /
R1 (cfg-translation-rule) # e
R1 (config) # end
R1#testvoice translation-rule 5 1
Matchedwith rule 1
Originalnumber: 1 Translated number:86001000
two。 Hit rule:
2.1Overview: any router has inbound and outbound when dealing with voice
There is match policy in in.
There is match dial-peer in out.
Any dialer-peer is bi-directional, both in and out.
2.2 hit rule of orientation
DNIS (incomingcalled-number monitors the dialed number.)
ANI (answer-address1001 Monitoring calling number)
Destination-pattern
Port (port 0Uniplet 0VER23)
The default dial-peer 0 is used
Taking the previous ISDN experiment as an example, when doing DID, we wrote the following command:
Dial-peer voice 1 pots
Incoming called-number.
Direct-inward-dial / / in this way, according to the incoming hit rule for incoming voice calls, check DNIS first, and configure the corresponding command here (matching all numbers) to look up the first route.
If you don't write DNIS here, use the following command:
Dial-peervoice 1 pots
Answer-address
Direct-inward-dial / / does not match the DNIS in the incoming direction, then match the ANI immediately, as configured above, but note that destination-pattern is used for the generation of incoming calling numbers (see "calling number generation" below):
Dial-peervoice 1 pots
Destination-pattern
Direct-inward-dial / / if there is no match to ANI in the incoming direction, then match destination-pattern immediately, and configure port as above
There is a dial-peer 0 by default
The hit rule of the direction
1. Match dial-peer, find a match
two。 If there are multiple matches, it depends on the configuration of the priority.
3. Recycle multiple dial-peer if you have the same priority
Note: the preset outbound dial-peer matching rule can be modified according to the "dial-peer hunt" command.
The generation of calling number
1. If the S port is connected to the phone, you can enter it manually: station-id numner 1001
two。 Achieved by hitting the incoming "destination-pattern":
For example, on R1: Dial-peer
Destion-patt1001
Port2/0 / / actually hits the fourth condition, and then uses destion-pat as a strategy. Note: the calling number must be generated with details, and a non-detailed number cannot be used as the calling number.
The dialed number is generated through TDMF
Debug View
Deb voip dial-peer can see the detailed route hit method.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.