この製品のドキュメントセットは、偏向のない言語を使用するように配慮されています。このドキュメントセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブ ランゲージの取り組みの詳細は、こちらをご覧ください。
シスコは世界中のユーザにそれぞれの言語でサポート コンテンツを提供するために、機械と人による翻訳を組み合わせて、本ドキュメントを翻訳しています。ただし、最高度の機械翻訳であっても、専門家による翻訳のような正確性は確保されません。シスコは、これら翻訳の正確性について法的責任を負いません。原典である英語版(リンクからアクセス可能)もあわせて参照することを推奨します。
このドキュメントでは、ボイストランスレーションプロファイルを使用して番号変換を設定する方法について説明します。
このドキュメントに関する固有の要件はありません。
このドキュメントの情報は、Cisco IOS®ソフトウェアリリース12.2(11)T以降が稼働する音声ゲートウェイに基づくものです。
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
ドキュメント表記の詳細は、『シスコテクニカルティップスの表記法』を参照してください。
ボイス トランスレーション プロファイルにより、新しい番号変換方式が導入されます。以前のトランスレーション ルールは、システムから段階的に廃止される予定です。1 つのトランスレーション ルール方式だけを使用することが強く推奨されます。古い方式と新しい方式が混在する場合、予期しない結果が発生する可能性があります。新しい方式では、正規表現のマッチングを実行し、サブ ストリングを置き換える機能が中心となります。Stream EDitor(SED)ユーティリティを使用して、番号を変換します。SEDの詳細については、「関連情報」のセクションを参照してください。
このドキュメントでは、新しいボイス トランスレーション プロファイルと最も一般的なシナリオでの具体的な例のための、重要な機能と設定例が説明されています。
トランスレーション ルールでは、ルールに示された照合パターン、番号計画、およびタイプに番号が一致する場合、入力番号のサブ ストリングが置き換えられます。照合パターンに基づいた一致の確認には、SED ユーティリティが使用されます。トランスレーション ルールのもう 1 つの機能として、特定の番号のコールをブロックする機能があります。これらのルールは、「reject」という特殊なキーワードで指定されます。
機能
新しいトランスレーションルールは、SEDと同様の方法で一致する正規表現の後に続きます。
バックスラッシュによる UNIX に類似するエスケープ シーケンスがサポートされています。
新しいトランスレーションルールではキーワードNULLとANYはサポートされていませんが、これらのキーワードはSEDに類似した正規表現で置き換えることができます。
トランスレーション ルール テーブルごとに、トランスレーション ルールを 15 まで定義できます。
トランスレーション プロファイルは 1000 まで定義できます。トランスレーション ルールは 128 まで定義できます。
このセクションでは、このドキュメントで説明されている機能を設定するために使用する情報を提供しています。
注:このドキュメントで使用されているコマンドの詳細を調べるには、Command Lookup Tool(登録ユーザ専用)を使用してください。シスコの内部ツールおよび情報にアクセスできるのは、登録ユーザのみです。
新しいトランスレーション ルールは、トランスレーション プロファイルで使用できます。トランスレーション プロファイルには、下記のタイプのコール番号を定義できます。
Called
Calling
リダイレクト着信
プロファイル内の各タイプのコール番号には、異なるトランスレーション ルールを持たせることができます。
トランスレーション プロファイルが定義されると、次のもので使用できます。
トランク グループ:着信と発信の POTS コールの番号変換を行うために、1 つのトランク グループに 2 つの異なるトランスレーション プロファイルを定義できます。トランク グループに発信トランスレーション プロファイルが定義されていると、発信コールのセットアップ中に番号変換が行われます。
ソース IP グループ:着信 VoIP コールの番号変換を行うために、ソース IP グループにトランスレーション プロファイルを定義できます。
ダイヤル ピア:着信と発信のコールの番号変換を行うために、1 つのダイヤル ピアに 2 つの異なるトランスレーション プロファイルを定義できます。
音声ポート:着信と発信の POTS コールの番号変換を行うために、音声ポートにトランスレーション プロファイルを定義できます。音声ポートがトランク グループのメンバでもある場合、音声ポートの着信トランスレーション プロファイルによりトランク グループのトランスレーション プロファイルが無効にされます。
Non-Facility Associated Signaling(NFAS)インターフェイス:着信と発信のNFASコールの番号変換を行うために、globalvoice serviceポート設定のtranslation-profilecommand行を使用してNFASインターフェイスのトランスレーションプロファイルを定義できます。チャネルがトランスレーション プロファイルが定義された音声ポートやトランク グループにも属している場合、このトランスレーション プロファイルには音声ポートとトランク グループのトランスレーション プロファイルよりも高い優先順位が与えられます。
VoIP 着信:番号変換を行うために、すべての着信 VoIP(h323/sip)コールに対してグローバルにトランスレーション プロファイルを定義できます。トランスレーション プロファイルが定義されたソース IP グループに着信 H.323/SIP コールが関連付けられている場合、着信 VoIP コールのグローバルトランスレーション プロファイルはソース IP グループのトランスレーション プロファイルにより無効にされます。
音声コールのトランスレーションルールを定義するには、グローバルコンフィギュレーションモードで voice translation-ruleコマンドを発行します。トランスレーションルールを削除するには、このコマンドのenoformを使用します。
-
voice translation-rule number
-
no voice translation-rule number
注:番号パラメータは、トランスレーションルールの固有識別子です。範囲は 1 ~ 2147483647 です。デフォルトはありませ ん。
rule(voice translation-rule)
トランスレーションルールを定義するには、ボイストランスレーションルールコンフィギュレーションモードでrule コマンドを使用します。トランスレーションルールを削除するには、このコマンドのenoformを使用します。
-
照合と置換規則
rule precedence /match-pattern/ /replace-pattern/
[type {match-type replace-type} [plan {match-type replace-type}]]
no rule precedence
-
リジェクト規則
rule precedence reject /match-pattern/ [type match-type [plan match-type]]
no rule precedence
シンタックスの説明
構文
説明
優先度
トランスレーション ルールの優先順位。範囲は 1 ~ 15 です。
/match-pattern/
着信コール情報の照合に使用される Stream EDitor(SED)の表現。スラッシュ「/」は、パターンの区切りです。
/replace-pattern/
コール情報の照合パターンと置き換えるために使用される SED の表現。スラッシュ「/」は、パターンの区切りです。
type match-type replace-type
(オプション)番号種別の照合には次のものがあります。
- abbreviated
- 任意
- international
- national
- network
- 予約済み
- subscriber
- unknown
番号種別の置き換えには次のものがあります。
- abbreviated
- international
- national
- network
- 予約済み
- subscriber
- unknown
plan match-type replace-type
(オプション)番号計画の照合には次のものがあります。
- 任意
- data
- エルメス
- isdn
- national
- プライベート
- 予約済み
- テレックス
- unknown
番号計画の置き換えには次のものがあります。
- data
- エルメス
- isdn
- national
- プライベート
- 予約済み
- テレックス
- unknown
reject
トランスレーション ルールの照合パターンは、コール拒否の目的に使用されます。
例
この例では、トランスレーションルール150を開始します。これには、次の2つのルールが含まれます。
Router(config)#voice translation-rule 150
Router(cfg-translation-rule)#rule 1 reject /^919\(.(\)/
Router(cfg-translation-rule)#rule 2 /\(^...\)853\(...\)/ /\1525\2/
ボイス トランスレーション ルールでは、正規表現構文(regexp)に類似した文字が使用されます。しかし、マイナーな相違点と制限がいくつかあります。行われるのは番号操作だけなので、これらの制限のほとんどは懸念する必要はありません。
ボイス トランスレーション ルールの文字
説明
^
行の最初のストリングが照合されます。
$
行の最後のストリングが照合されます。
/
対応する文字列と置換文字列の両方の開始と終了を示す区切り記号。
\
直後の特殊文字が通常の文字として扱われます。
-
範囲が示されます(文字列の最初・最後ではない場合)。「[」と「]」を伴って使用されます。
[list]
リストの単一の文字と照合されます。
[^list]
リストで指定された文字以外と照合されます。
.
任意の単一の文字と照合されます。
*
前回の 正規表現が 0 回以上繰り返されます。
+
前回の正規表現が 1 回以上繰り返されます。
?
直前の正規表現を0回または1回繰り返します(Cisco IOSで入力するには、CTRL+Vを使用します)。
()
正規表現がグループ化されます。
照合ストリング
置換ストリング
ダイヤルされたストリング
置き換えられたストリング
注釈
/^$/
/ /
NULL
NULL
単純なヌルからヌルへの変換。
/^.*/
/ /
9195551212
NULL
任意のストリングからヌルへの変換。
//
//
9195551212
9195551212
任意のストリングが照合されますが、置き換えは行われません。これは、番号計画や番号種別の操作に使用します。
/^392\(.*\)/
/555\1/
3921212
5551212
可変長ストリングの先頭が照合されます。
/^\(555\)\(....\)/
/444\2/
5551212
4441212
ストリングの先頭が照合されます。2番目のかっこの構造が新しい文字列にプルされます。
/^555\(....\)/
/444\1/
5551212
4441212
ストリングの先頭が照合されます。\1 により最初の正規表現の 1 番目グループと置き換えられることに注意してください。
/\(^...\)555\(....\)/
/\1444\2/
9195551212
9194441212
ストリングの中間部分が照合されます。
/\(^...\)\(555\)\(....\)/
/\1444\3/
9195551212
9194441212
ストリングの中間部分が照合されます。
/\(.*\)1212$/
/\13434/
9195551212 555121212
9195553434 555123434
ストリングの最後が照合されます。
/\(.*\)1212/
/\13434/
9195551212 555121212
9195553434 555123434
ストリングの最後が照合されます。この特定の例では、最後に暗黙の $ は不要です。
/444/
/555/
4441212 44441212 44414441212
5551212 55541212 55514441212
サブストリングが照合されます。
/^[135]/
/9/
12345 22345 32345
92345 22345 93245
特定の番号が照合されます。
/^[1-35]/
/9/
1234 2345 4567 8456
9234 9345 4567 8456
範囲が照合されます。
/^[^1-35]/
/9/
1234 2345 4567 8456
1234 2345 9567 9456
リストの ^ は、これらの項目以外が照合されることを意味します。
/^1#/
//
1#456
456
まず、1# が照合され、ヌルに置き換えられます。
/^1\#\(.*\)/
/\1/
1#456
456
前の表現と同じですが、構成が異なります。
/^1\*/
//
1*456
456
パターンの 1* が照合され、ヌルに置き換えられます。
/^1\*\(.*\)/
/\1/
1*456
456
前の表現と同じですが、構成が若干異なります。
/^5+/
/9/
5888 55888 555888 5588855
9888 9888 9888 988855
これは「+」オプションの使用例です。
/^\(555\)+\(.*\)/
/444\2/
5551212 555551212 5555551212 5551212555
4441212 444551212 4441212 4441212555
これは「+」オプションの別の例です。まず、555 パターンが繰り返し検索されます。
/^9?1?\(919\)/
/\1/
9195551212 19195551212 919195551212 99195551212
9195551212 9195551212 9195551212 9195551212
「?」ストリングを使用する方法は次のとおりです。たとえば、存在する、または存在しない以前の数字を削除する場合です。この場合、プレフィックス9または1または9と1を一緒に削除します。
/1234/
/00&00/
5551234
55500123400
サブストリングが照合されます。
/1234/
/00\000/
5551234
55500123400
サブストリングが照合されます(& と同じ)。
トランスレーション プロファイルの設定
voice translation-profile <name>
translate called <translation-rule num>
translate calling <translation-rule num>
translate redirect-called <translation-rule num>
no
Attribute
説明
voice translation-profile <name>
トランスレーション プロファイル名のサイズは 31 文字です。
translate called <translation rule #>
着番号のトランスレーション プロファイル ルールが定義されます。
translate calling <translation rule #>
発番号のトランスレーション プロファイル ルールが定義されます。
translate redirect-called <translation rule #>
リダイレクト着番号のトランスレーション プロファイル ルールが定義されます。
着信コールのシグナル タイプにより、発番号は Automatic Number Identifier(ANI; 自動番号識別)または発呼回線 ID になります。リダイレクト着番号はリダイレクト Dialed Number Identification Service(DNIS; 着信番号識別サービス)または元の着番号になります。
VoIP の着信設定
voip-incoming translation-profile <name>
Attribute
説明
voip-incoming translation-profile
すべての着信 VoIP コールの番号トランスレーション プロファイルが定義されます。このCLIコマンドは、旧来のトランスレーションルールからのvoip-incoming translation-ruleコマンドとは相互排他的です。
この VoIP 着信トランスレーション プロファイルの設定例では、すべての着信 VoIP コールに「global-definition」という名前のトランスレーション プロファイルが適用されます。
Router(config)#voip-incoming translation-profile global-definition
ダイヤル ピア設定
着信ダイヤル ピア
dial-peer voice <num> [pots|voip|vofr|voatm]
translation-profile [incoming | outgoing] <name>
コールをブロックするには
dial-peer voice <num> [pots|voip]
call-block translation-profile incoming <name>
call-block disconnect-cause incoming <cause>
carrier-id source <name>
Attribute
説明
call-block translation-profile incoming <name>
着信コールへのコール ブロッキング トランスレーション プロファイルが定義されます。コール ブロッキング トランスレーション プロファイルのサイズは 31 文字です。
call-block disconnect-cause incoming <cause>
着信コールがブロックされると、このコマンドの値が発信元に返されます。ユーザは、次の切断理由を選択できます。
- 無効な番号
- 未割り当て番号
- ユーザビジー
- コール拒否
この属性のデフォルト値はNo-Serviceです。
carrier-id source <name>
着信ダイヤルピアの同等のキーとして使用される、着信ダイヤルピアの発信元キャリアIDを定義します。このコマンドがサポートされているのは、POTS または VoIP ダイヤル ピアの設定のみです。ソース キャリア ID のサイズは 127 文字です。
translation-profile incoming <name>
着信コールのコール番号トランスレーション プロファイルが定義されます。トランスレーション プロファイルのサイズは 31 文字です。
発信ダイヤル ピア
dial-peer voice <num> pots
carrier-id target <name>
trunkgroup <num> [preference_num]
trunkgroup <num> [preference_num]
translation-profile outgoing <name>
Attribute
説明
carrier-id target <name>
発信ダイヤルピアのターゲットキャリアIDを定義します。これは、発信ダイヤルピアの同等キーとして使用されます。このコマンドがサポートされているのは、POTS または VoIP ダイヤル ピアの設定のみです。ターゲット キャリア ID のサイズは 127 文字です。
translation-profile outgoing <name>
発信コールのコール番号トランスレーション プロファイルが定義されます。
trunkgroup <number> [preference_num]
発信ダイヤル ピアのターゲットとして、単一か複数のトランク グループを設定できます。ダイヤル ピアで 64 までのトランク グループを定義できます。このコマンドは、「port」コマンドとは相互排他的です。優先度の範囲は 1 ~ 64 です。
音声ポートの設定
voice-port <number>
translation-profile [incoming | outgoing] <name>
trunk-group <name> [preference]
Attribute
説明
translation-profile incoming
着信 POTS コールのコール番号トランスレーション プロファイルが定義されます。このCLIコマンドは、旧来のルールからのtranslate calledコマンドおよび translate callingコマンドとは相互排他的です。
trunk-group
トランク グループ メンバとして、アナログ音声ポートが定義されます。コントローラ設定のCASユーザCLIで、CAS音声ポートをトランクグループに割り当てます。PRI に関しては、D チャネルのシリアル インターフェイスの下でトランク グループを割り当てます。BRI では、BRI インターフェイスの下でトランク グループを設定します。
コントローラ トランスレーション プロファイル
コントローラ トランスレーション プロファイルは、トランク グループ経由でルーティングされる着信 NFAS コールまたは発信 NFAS コールに使用されます。
voice service pots
translation-profile [incoming | outgoing] controller [T1 | E1] <unit#> <name>
Attribute
説明
translation-profile
コントローラのトランスレーション プロファイルが定義されます。
[incoming | outgoing]
着信または発信コールの番号変換。
controller
Controller キーワード。
[T1 | E1] <unit#>
T1 または E1 コントローラ ユニット。
<name>
トランスレーション プロファイル名の名前。トランスレーション プロファイル名のサイズは 64 文字です。
トランク グループの設定例
trunk group <name>
carrier-id <name>
hunt-scheme { [least-idle [even|odd] [up|down] |
least-used [even|odd] [up|down] |
longest-idle [even|odd] [up|down |
random
round-robin [even|odd] [up|down] |
sequential [even|odd] [up|down]
translation-profile incoming <name>
translation-profile outgoing <name>
Attribute
説明
trunk group <name> [<preference>]
トランク グループ メンバは、PRI、BRI、または CAS インターフェイス、あるいは FXS、FX0、または E&M 音声ポートの場合があります。preference 番号は、トランク グループ メンバを順番に分類するのに使用されるオプションのパラメータです。preference 番号が定義されない場合、新しいトランク グループ メンバはトランク グループの最後のメンバになります。プリファレンス番号の範囲は0 ~ 63です。トランクグループには、最大64のメンバ(インターフェイスまたは音声ポート)を定義できます。trunk groupundervoice-portは、アナログ音声ポートのトランクグループメンバを設定するために使用します。interface serialまたはinterface briコマンドを使用したISDN PRIおよびBRIトランクのトランクグループメンバのCLI設定は変更されません。トランク グループ名のサイズは 32 文字です。
carrier-id <name>
トランク グループを所有するキャリアの ID。キャリア ID のサイズは 64 文字です。
hunt-scheme
発信コールでトランク グループからメンバやチャネルを選択するために使用する方式を指定します。
-
最小アイドル[偶数 | 奇数] [上 | ダウン]
-
最も使用率の低い[偶数 | 奇数] [上 | ダウン]
-
最長アイドル[偶数 | 奇数] [上 | ダウン]
-
ランダム
-
ラウンドロビン[偶数 | 奇数] [上 | ダウン]
-
シーケンシャル[偶数 | 奇数] [上 | ダウン]
ハントスキームのデフォルト値はleast-usedです。
description
トランク グループについての文字による説明のサイズは 64 文字です。
translation-profile
着信コールと発信コールのコール番号トランスレーション プロファイルが定義されます。
トランク グループ メンバの設定例
interface serial <slot/port>:<num>
trunk-group <name> [<preference>]
interface bri <number>
trunk-group <name> [<preference>]
voice-port <number>
trunk-group <name> [<preference>]
/* ds0-group trunk group configuration example */
controller T1 1/0
ds0-group 1 timeslots 1-10 type e&m-fgd
ds0-group 2 timeslots 12-20 type e&m-fgd
cas-custom 1
trunk-group 11
cas-custom 2
trunk-group 22
ソース IP グループの設定例
voice source-group <name>
access-list <num>
carrier-id source <name>
carrier-id target <name>
description <text>
disconnect-cause <user-selected-reason>
translation-profile incoming <name>
h323zone-id <text>
Attribute
説明
voice source-group <name>
ソース IP グループ名のサイズは 32 文字です。
access-list
Cisco IOSアクセスリストIDは、着信VoIPコールの発信元を識別するために使用されます。
carrier-id source <name>
ソース キャリア ID は、着信 VoIP コールに関連付けられます。キャリア ID のサイズは 64 文字です。キャリア ID のサイズは 64 文字です。
carrier-id target <name>
発信ダイヤルの照合に使用できる、デフォルトのターゲット キャリア ID です。
description
VoIP ソース グループについての文字による説明のサイズは 64 文字です。
disconnect-cause
アクセスリストの制限でコールがブロックされると、このコマンドの値が発信元に返されます。ユーザは、次の切断理由を選択できます。
- 無効な番号
- 未割り当て番号
- ユーザビジー
- コール拒否
この属性のデフォルト値はNo-serviceです。
translation-profile incoming
着信 VoIP コールに適用される番号のトランスレーション ルールが指定されます。
h323zone-id
着信 H.323 コールのソース ゾーン ID と照合するゾーン ID が指定されます。h323 ゾーン ID のサイズは 64 文字です。
CallManagerフォールバックの設定
また、Cisco CallManager フォールバック設定のトランスレーション プロファイルも適用できます。all-manager-fallbackmodeの下で適用されると、IP PhoneがSRSTモードにフォールバックする場合にだけ、コールが変換されます。通常の環境では(電話が Cisco CallManager サーバに登録されている場合)、IP 電話によって行われるコールは変換されません。のtranslation-profileは、IP電話からルータへの着信コールと発信コールに影call-manager-fallback響を与えます。これは、translation-profile をdial-peer で適用した場合とは異なる動作です。incoming コマンドとoutgoing コマンドは、IP電話に関連しています。incoming コマンドは、IP電話から到達するコールのパラメータを変更します。outgoing コマンドは、ルータからIP電話へのコールの値を変更します。
voice translation-rule 1
rule 1 /^.*/ /5551234/
!
!
voice translation-profile srst-in
translate calling 1
!
call-manager-fallback
translation-profile incoming srst-in
!
IP 電話からコールが発信されると、発番号が変更されてからルータで処理されます。ルータはその発信者番号を使用してコールをルーティングします。この例では、IP Phoneからルータへのすべてのコールは、発信者番号が5551234と表示されます。これには、IP電話間のコールも含まれます。ルータからPSTNに転送されるコールのみに対して発信者番号を変更するには、dial-peer potsのtranslation-profile を適用して、IPフォン間のコールに影響を与えないようにします。
all-manager-fallbackcommandコマンドについての詳細は、『Cisco IOS音声コマンド』のリファレンスを参照してください。
コール ブロッキングの設定例
ダイヤル ピア上のすべてのコールのコール ブロッキング
番号に照合するボイス トランスレーション ルールを設定します。
!
voice translation-rule 1
rule 1 reject /^.*/
!--- Matches any number string and rejects the call.
!
!--- Apply the rule to a translation profile for called,
!--- calling, or redirect-called numbers.
!
voice translation profile call_block
translate calling 1
!--- Invokes voice translation rule 1 in order to determine which calls
!--- to reject based on the calling number.
!
!--- Include the translation profile within a dial peer definition.
!--- You can use incoming called-number to only match this dial peer at certain times.
!
dial-peer voice 100 pots
!--- This can be any dial peer that matches the desired inbound call.
incoming called-number 3927393
!--- Matches this dial peer for inbound POTS calls
!--- that go to the number string listed.
call-block translation-profile incoming call_block
!--- Invokes the voice translation profile “call_block”
!--- on inbound POTS calls that match this peer in order to
!--- determine which calls to reject.
call-block disconnect-cause incoming call-reject
!--- Sets the cause code to “call-reject” for blocked calls.
特定の発番号のコール ブロッキング
ブロッキング対象の発番号をブロックするボイス トランスレーション ルールを設定します。この例では、9193927393 が使用されています。
voice translation-rule 1
rule 1 reject /9193927393/
!--- Matches the defined number string and rejects the call.
!
!--- Apply the rule to a translation profile for the calling number.
!--- You could also reject based on called or redirect-called numbers.
!
voice translation-profile call_block
translate calling 1
!--- Invokes voice translation rule 1 in order to determine
!--- which calls to reject based on the calling number.
!
!--- Include the translation profile within a dial peer definition.
!
dial-peer voice 100 pots
call-block translation-profile incoming call_block
!--- Invokes the voice translation profile “call_block” on
!--- inbound POTS calls that match this peer
!--- in order to determine which calls to reject.
call-block disconnect-cause incoming call-reject
incoming called-number
!--- Matches this peer for all inbound POTS calls.
port 1/1:23
特定の着番号のコール ブロッキング
ブロックキング対象の着番号を照合するボイス トランスレーション ルールを設定します。この例では、3927393 を使用しています。
!
voice translation-rule 1
rule 1 reject /3927393/
!--- Matches the defined number string and rejects the call.
!
!--- Apply the rule to a translation profile for the called number.
!--- You could also reject based on calling or redirect-called numbers.
!
voice translation-profile call_block
translate called 1
!--- Invokes voice translation rule 1 in order to determine which
!--- calls to reject based on the called number.
!
!--- Include the translation profile within a dial peer definition.
!
dial-peer voice 100 voip
call-block translation-profile incoming call_block
!--- Invokes the voice translation profile “call_block” on
!--- inbound POTS calls that match this peer
!--- in order to determine which calls to reject.
call-block disconnect-cause incoming call-reject
incoming called-number
任意の番号の特定の番号への変換
voice translation-rule 1
rule 1 /\(.*\)/ /300/
!--- Matches any number string and replaces it with 300.
!
voice translation-profile my_profile
translate called 1
!--- Invokes voice translation rule 1 in order to translate the called number.
!
dial-peer voice 1000 pots
!--- This can be any dial peer that matches the inbound call.
translation-profile incoming my_profile
!--- Invokes voice translation profile “my_profile” for incoming calls.
direct-inward-dial
incoming called-number .
port 1/0:23
Router#
Router#test voice translation-rule 1 5551234
Matched with rule 1
Original number: 5551234 Translated number: 300
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
着信する 7 桁の数字の 4 桁への変換
voice translation-rule 1
!--- Matches any number string that begins with 498 and
!--- changes those three digits to null (removes them).
rule 1 /^498/ //
!
!
voice translation-profile Voice
!--- Invokes voice translation rule 1 to translate the called number.
translate called 1
!
dial-peer voice 225 pots
translation-profile incoming Voice
!--- Invokes voice translation profile “Voice” for incoming calls.
direct-inward-dial
port 1/0:23
Router#test voice translation-rule 1 4985555
Matched with rule 1
Original number: 4985555 Translated number: 5555
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
着番号のプレフィクス付与
voice translation-rule 1
!--- Matches any number string and places 555 in front of the original number.
rule 1 // /555/
!
voice translation-profile prefix
!--- Invokes voice translation rule 1 in order to translate the called number.
translate called 1
!
dial-peer voice 1 pots
translation-profile incoming prefix
!--- Invokes voice translation profile “prefix” for incoming calls.
Router#test voice translation-rule 1 1234
Matched with rule 1
Original number: 1234 Translated number: 5551234
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
発信コールの番号計画と番号種別を Unknown から ISDN と National へ変更
voice translation-rule 1
rule 1 // // type unknown national plan unknown isdn
!--- Matches any number string with a plan and type of
!--- unknown. Also changes the type to national and the plan to isdn.
!
voice translation-profile isdn_map
translate called 1
!--- Invokes voice translation rule 1 in order to translate the called number.
!
dial-peer voice 1 pots
translation-profile outgoing isdn_map
!--- Invokes voice translation profile “isdn_map” for outgoing calls.
kearly01#test voice translation-rule 1 5551234 type unknown plan unknown
Matched with rule 1
Original number: 5551234 Translated number: 5551234
Original number type: unknown Translated number type: national
Original number plan: unknown Translated number plan: isdn
発番号のプレフィクス付与
voice translation-rule 1
!--- Matches number strings that start with 4
!--- and places 9059514 in the beginning 4 place.
!--- It serves the same type of function for the number 0.
rule 1 /^4/ /9059514/
rule 2 /^0/ /9059510/
!
voice translation-profile Prefix
!--- Invokes voice translation rule 1 in order to translate the calling number.
translate calling 1
!
dial-peer voice 100 pots
translation-profile outgoing Prefix
!--- Invokes voice translation profile “Prefix” for outgoing calls.
電話の特定ポートからの発信
voice translation-rule 29
!--- Matches anything that starts with a 9 and replaces the 9 with 29.
rule 1 /^9/ /29/
!
voice translation-rule 39
!--- Matches anything that starts with a 9 and replaces the 9 with 39.
rule 1 /^9/ /39/
!
voice translation-profile FXS29
!--- Invokes voice translation profile “FXS29” in order to translate the called number.
translate called 29
!
voice translation-profile FXS39
!--- Invokes voice translation profile “FXS39” in order to translate the called number.
translate called 39
!
voice-port 1/1/0
connection plar 8005
!--- Sends inbound calls directly to the IP phone with 8005 DN.
!
voice-port 1/1/1
connection plar 8006
!--- Sends inbound calls directly to the IP phone with 8006 DN.
!
dial-peer voice 110 pots
!--- Since calls from 8005 that begin with a 9 are changed
!--- to begin with 29, all these calls match this dial peer
!--- and go out port 1/1/0 (when not in SRST mode).
destination-pattern 29T
port 1/1/0
!
dial-peer voice 111 pots
!--- Since calls from 8006 that begin with a 9 are changed
!--- to begin with 39, all these calls match this dial peer
!--- and go out port 1/1/1 (when not in SRST mode).
destination-pattern 39T
port 1/1/1
!
dial-peer voice 1000 voip
!--- To Cisco CallManager.
preference 1
destination-pattern .T
voice-class h323 1
session target ipv4:10.1.0.13
dtmf-relay h245-alphanumeric
ip qos dscp cs5 media
!
dial-peer voice 29 voip
translation-profile incoming FXS29
!--- Matches calls from the IP phone with a DN of 8005, and invokes
!--- voice translation profile FXS29 in order to change numbers that start
!--- with a 9 to begin with 29.
answer-address 8005
!
dial-peer voice 39 voip
translation-profile incoming FXS39
!--- Matches calls from the IP phone with a DN of 8006,
!--- and invokes voice translation profile FXS39 in order to change
!--- numbers that start with a 9 to begin with 39.
answer-address 8006
特定のポートからのコールの目的の VoIP ピアへの同じ着番号での発信
voice translation-rule 27
!--- Matches anything that starts with a 7 and replaces the 7 with 27.
rule 1 /^7/ /27/
!
voice translation-rule 37
!--- Matches anything that starts with a 7 and replaces the 7 with 37.
rule 1 /^7/ /37/
!
voice translation-profile FXS27
!--- Invokes voice translation profile “FXS27” in order to translate the called number.
translate called 27
!
voice translation-profile FXS37
!--- Invokes voice translation profile “FXS37” in order to translate the called number.
translate called 37
!
dial-peer voice 270 voip
!--- Matches the called number of 27 which is
!--- translated from port 2/0. You can use a translation
!--- profile in order to change the number back to 7 here if needed.
destination-pattern 27
session target ipv4:10.1.1.2
!
dial-peer voice 370 voip
!--- Matches the called number of 37 which is translated
!--- from port 2/1. You can use a translation profile in order to
!--- change the number back to 7 here if needed.
destination-pattern 37
session target ipv4:10.1.1.3
!
dial-peer voice 27 pots
translation-profile incoming FXS27
!--- Matches calls from port 2/0, and invokes voice translation
!--- profile FXS27 in order to change numbers that start with a 7 to begin with 27.
port 2/0
!
dial-peer voice 37 pots
translation-profile incoming FXS37
!--- Matches calls from port 2/1, and invokes voice translation
!--- profile FXS37 in order to change numbers that start with a 7 to begin with 37.
port 2/1
確認
特定のshowコマンドは、アウトプットインタープリタツールでサポートされています。このツールを使用すると、show コマンドの出力を分析できます。
注:シスコの内部ツールおよび情報にアクセスできるのは、シスコの登録ユーザーのみです。
ルールの動作をテストするには、test voice translation-ruleコマンドを使用します。
トランスレーションルールの機能をテストするには、特権EXECモードでtest voice translation-ruleコマンドを使用します。
test voice translation-rule number input-test-string [type match-type [plan match-type]]
構文
説明
番号
テスト対象のトランスレーション ルールの番号が指定されます。範囲は 1 ~ 2147483647 です。
input-test-string
トランスレーション ルールによってテストされるストリング。
typematchタイプ
(オプション)コールの番号種別。match-type 引数の有効値は、次のものです。
- abbreviated:このネットワークでサポートされる、完全な番号の短縮表現。
- any:任意の着番号のタイプ。
- international:国外の加入者へ到達する呼出し番号。
- national:国内でローカル ネットワークの外部にいる加入者へ到達する呼出し番号。
- network:対象のネットワークに固有の管理またはサービス番号。
- reserved:拡張用に予約済み。
- subscriber:同じローカル ネットワークにいる加入者へ到達する呼出し番号。
- unknown:ネットワークで認識されないタイプの番号。
プランマッチタイプ
(オプション)コールの番号計画。match-type 引数の有効値は、次のものです。
- any:任意の着番号のタイプ。
- data:データ コールで呼び出される番号。
- ermes:欧州の無線メッセージ標準番号計画。
- isdn:ISDN ネットワークの着番号。
- national:国内でローカル ネットワークの外部にいる加入者へ到達する呼出し番号。
- private:プライベート ネットワークで呼び出される番号。
- reserved:拡張用に予約済み。
- telex:テレックス装置の番号計画。
- unknown:ネットワークで認識されないタイプの番号。
以下に例を挙げます。
voice translation-rule 1
rule 1 /^555\(....\)/ /444\1/
rule 2 /777/ /888/ type national unknown plan any isdn
kearly01#test voice translation-rule 1 5551234
Matched with rule 1
Original number: 5551234 Translated number: 4441234
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
kearly01#test voice translation-rule 1 7771234
7771234 Didn't match with any of rules
kearly01#test voice translation-rule 1 7771234 type national plan isdn
Matched with rule 2
Original number: 7771234 Translated number: 8881234
Original number type: national Translated number type: unknown
Original number plan: isdn Translated number plan: isdn
このテストでは、次のトランスレーション ルールが使用されます。
注:show voice translation-ruleコマンドとshow voice translation-profileコマンドも有効です。
kearly01#show voice translation-rule 1
Translation-rule tag: 1
Rule 1:
Match pattern: ^555\(....\)
Replace pattern: 444\1
Match type: none Replace type: none
Match plan: none Replace plan: none
Rule 2:
Match pattern: 777
Replace pattern: 888
Match type: national Replace type: unknown
Match plan: any Replace plan: isdn
kearly01#show voice translation-profile
Translation Profile: mytranslation
Rule for Calling number:
Rule for Called number: 1
Rule for Redirect number:
トラブルシュート
このセクションでは、設定のトラブルシューティングに役立つ情報を紹介します。
同じトランスレーションルールで、debug voice translationを使用し、次にtest voice translation-rulecommandを再度実行します。
kearly01#test voice translation-rule 1 7771234
7771234 Didn't match with any of rules
*Apr 4 14:44:31.665: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
No match; number=7771234 rule precedence=1
*Apr 4 14:44:31.665: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
Error: type didn't match; in.type=0x9 rule.type = 0x2
*Apr 4 14:44:31.665: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
No match; number=7771234 rule precedence=1
*Apr 4 14:44:31.665: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
Error: type didn't match; in.type=0x9 rule.type = 0x2test voice trans
デバッグには、ルールが一致しないことが示されています。番号種別と番号計画を変更すれば、一致します。
kearly01#test voice translation-rule 1 7771234 type national plan isdn
Matched with rule 2
Original number: 7771234 Translated number: 8881234
Original number type: national Translated number type: unknown
Original number plan: isdn Translated number plan: isdn
*Apr 4 14:44:51.665: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
No match; number=7771234 rule precedence=1
*Apr 4 14:44:51.665: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
No match; number=7771234 rule precedence=1
*Apr 4 14:44:51.669: //-1/xxxxxxxxxxxx/RXRULE/regxrule_match:
No match; number=7771234 rule precedence=1
*Apr 4 14:44:51.669: //-1/xxxxxxxxxxxx/RXRULE/sed_subst:
Successful substitution; pattern=7771234 matchPattern=777
replacePattern=888 replaced pattern=8881234
*Apr 4 14:44:51.669: //-1/xxxxxxxxxxxx/RXRULE/regxrule_subst_num_type:
Match Type = national, Replace Type = unknown Input Type = national
*Apr 4 14:44:51.669: //-1/xxxxxxxxxxxx/RXRULE/regxrule_subst_num_plan:
Match Plan = any, Replace Plan = isdn Input Plan = isdn
関連情報
改定 | 発行日 | コメント |
---|---|---|
2.0 |
07-Apr-2023 |
フォーマットの更新、修正。再認定 |
1.0 |
15-Feb-2005 |
初版 |