シスコは世界中のユーザにそれぞれの言語でサポート コンテンツを提供するために、機械と人による翻訳を組み合わせて、本ドキュメントを翻訳しています。 ただし、最高度の機械翻訳であっても、専門家による翻訳のような正確性は確保されません。 シスコは、これら翻訳の正確性について法的責任を負いません。原典である英語版(リンクからアクセス可能)もあわせて参照することを推奨します。
ボイス トランスレーション プロファイルにより、新しい番号変換方式が導入されます。 以前のトランスレーション ルールは、システムから段階的に廃止される予定です。 1 つのトランスレーション ルール方式だけを使用することが強く推奨されます。 古い方式と新しい方式が混在する場合、予期しない結果が発生する可能性があります。 新しい方式では、正規表現のマッチングを実行し、サブ ストリングを置き換える機能が中心となります。 Stream EDitor(SED)ユーティリティを使用して、番号を変換します。 SED に関する詳細については「関連情報」セクションを参照して下さい。
この資料は新しいボイス トランスレーション プロファイルのための強調表示された機能および設定およびほとんどの一般的なシナリオのための特定の例を記述したものです。
トランスレーション ルールは数がルールで現在の一致パターン、番号計画および型と一致する場合入力数の補助的な一連を置き換えます。 SED ユーティリティが一致パターンに基づいて一致があるように確認するのに使用されています。 トランスレーション ルールのもう一つの能力は特定の数のコールをブロックする機能です。 これらのルールは「リジェクト」と呼ばれる特別のキーワードと規定 されます。
機能:
新しいトランスレーション ルールは SED と同じような正規表現一致に続きます:
バックスラッシュによって UNIX と同じようなエスケープ シーケンスはサポートされます。
キーワードの NULL」および「ANY は」新しいトランスレーション ルールでサポートされません、これらのキーワードは SED と同じような正規表現と取替えることができます。
15 までのトランスレーション ルールは変換ルール表ごとに定義することができます。
1000 までのトランスレーション プロファイルは定義することができます。 128 までのトランスレーション ルールは定義することができます。
このドキュメントに関しては個別の要件はありません。
この資料に記載されている情報は Cisco IOS を実行する音声ゲートウェイに基づいていますか。 ソフトウェア リリース 12.2(11)T または それ 以降。
本書の情報は、特定のラボ環境にあるデバイスに基づいて作成されたものです。 このドキュメントで使用するすべてのデバイスは、初期(デフォルト)設定の状態から起動しています。 稼働中のネットワークで作業を行う場合、コマンドの影響について十分に理解したうえで作業してください。
ドキュメント表記の詳細は、『シスコ テクニカル ティップスの表記法』を参照してください。
このセクションはこの資料に説明がある機能を設定するのに使用される情報と示します。
注: このドキュメントで使用されているコマンドの詳細を調べるには、Command Lookup Tool(登録ユーザ専用)を使用してください。
新しいトランスレーション ルールはトランスレーション プロファイルによって参照することができます。 トランスレーション プロファイルの呼出 し 番号のこれらの型を定義できます:
called
calling
リダイレクト呼出される
プロファイルの呼出 し 番号の各型は異なるトランスレーション ルールがある場合があります。
トランスレーション プロファイルが定義されれば、下記によって参照することができます:
トランクグループ— 2 つの異なるトランスレーション プロファイルはトランクグループで着信および発信 POTS コールのための番号変換を行うために定義することができます。 発信 トランスレーション プロファイルがトランクグループで定義される場合、数変換は送信通話が設定される間、行われます。
出典 IP Group-a トランスレーション プロファイルは出典 IP グループで着信 VOIPコールのための番号変換を行うために定義することができます。
受信・発信コールのための番号変換を行うために dial peer — 2 つの異なるトランスレーション プロファイルはダイヤル ピアで定義することができます。
音声ポート—トランスレーション プロファイルは音声ポートで着信および発信 POTS コールのための番号変換を行うために定義することができます。 音声ポートがまたトランクグループ メンバーである場合、音声ポートの着信トランスレーション プロファイルはトランクグループのトランスレーション プロファイルを無効にします。
Non-facility Associated Signaling (NFAS)はグローバル な 音声 サービス POTS 設定からのトランスレーション プロファイル コマンド・ラインを通した NFAS インターフェイスのために着信および発信 NFAS コールのための番号変換を行うために interface — トランスレーション プロファイル定義することができます。 チャネルがまた定義されるトランスレーション プロファイルの音声ポートやトランクグループに属すればこのトランスレーション プロファイルに音声ポートおよびトランクグループのトランスレーション プロファイルより高い優先順位があります。
着信 VoIP —トランスレーション プロファイルはすべての着信 VoIP (h323/sip)コールのために数変換を行うためにグローバルに定義することができます。 着信 H.323/SIP コールが定義されるトランスレーション プロファイルの出典 IP グループと関連付けられる場合出典 IP グループのトランスレーション プロファイルは VOIPコールのためのグローバル な トランスレーション プロファイルを無効にします。
音声コールのための変換ルールを定義するためにグローバル な 設定 モードのボイス トランスレーション ルール コマンドを発行して下さい。 変換ルールを削除するためにこのコマンドの No 形式を使用して下さい。
ボイス トランスレーション ルール数
ボイス トランスレーション ルール数無し
注: 数パラメータは変換ルールのための固有の識別番号です。 範囲は 1 から 2147483647 からです。 デフォルトはありませ ん。
変換ルールを定義するために、ボイス トランスレーション ルール 設定 モードで rule コマンドを使用して下さい。 変換ルールを削除するために、このコマンドの No 形式を使用して下さい。
ルールを一致する、取り替えます
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/ | 着信呼び出し情報を一致するのに使用するストリーム・エディタ(SED)式。 スラッシュ「/」パターンのデリミタです。 |
/replace-pattern/ | 呼び出し情報の一致パターンを取り替えるのに使用する SED 式。 スラッシュ「/」パターンのデリミタです。 |
型一致型取り替え型 | (オプション)番号種別の照合には次のものがあります。
|
計画一致型取り替え型 | (オプション)番号計画の照合には次のものがあります。
|
リジェクト | 変換ルールの一致パターンはコール リジェクト目的で使用されます。 |
この例は変換ルール 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)と同じような文字を使用します。 しかし、いくつかのマイナーな違いおよび制限があります。 制限のほとんどは実質問題ディジット操作だけ実行されたのでではないです。
音声 変換ルール文字 | 説明 |
---|---|
^ | 行のはじめに式を一致する。 |
$ | 行の端に式を一致する。 |
/ | 一致および置換文字列の開始および終了を示すデリミタ。 |
\ | 次の文字の特別な意味をエスケープして下さい。 |
- | 最初の/最後の位置の範囲を時ない示します。 the と使用される[「および「]」。 |
[リスト] | リストの単一 文字を一致する。 |
[^list] | リストで規定 される 単一 文字を一致する。 |
を探します。 | 単一 文字を一致する。 |
* | 前の regexp ゼロを繰り返して下さいまたはより多くの回。 |
+ | 前の正規表現を 1つ以上の時間繰り返して下さい。 |
? | 前の正規表現を IOS で入るため)ゼロか 1 回(使用 CTRL-V 繰り返して下さい。 |
() () | 正規表現をグループ化します。 |
一致ストリング | ストリングを置き換えて下さい | ダイヤルされたストリング | 置き換えられたストリング | コメント |
---|---|---|---|---|
/^$/ |
/ / |
NULL | NULL | 変換を無効にする簡単なヌル。 |
/^.*/ |
/ / |
9195551212 | NULL | 変換を無効にする。 |
// |
// |
9195551212 | 9195551212 | ストリング 置換を一致する。 コール計画かコール タイプを処理するのにこれを使用して下さい。 |
/^392\(.*\)/ |
/555\1/ |
3921212 | 5551212 | 可変長ストリングの始まりを一致する。 |
/^\(555\)\(....\)/ |
/444\2/ |
5551212 | 4441212 | ストリングの始まりを一致する。 第 2 は新しい文字列に構造を引っ張られます paren。 |
/^555\(....\)/ |
/444\1/ |
5551212 | 4441212 | ストリングの始まりを一致する。 \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 #> |
リダイレクト呼出された数のためのトランスレーション プロファイル ルールを定義して下さい。 |
着信コールのシグナルタイプに基づいて、発信者番号は自動数識別(ANI)と同等です着信番号識別サービス(DNIS)かオリジナル呼出 し 番号をリダイレクトするためにまたはコーリングライン ID はリダイレクト呼出された数同等です。
voip 着信トランスレーション プロファイル <name>
Attribute | 説明 |
---|---|
voip-incoming translation-profile |
すべての着信 VOIPコールのための呼出 し 番号 トランスレーション プロファイルを定義して下さい。 この CLI はオールド スタイル トランスレーション ルールからの voip-incoming translation-rule コマンドで相互独立的です。 |
この VoIP 着信トランスレーション プロファイル 設定例はすべての着信 VOIPコールに「グローバル定義」と指名されるトランスレーション プロファイルを割り当てます。
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> |
コールがセッションか IVR アプリケーションによって扱われるときセッションか Interactive Voice Response (IVR) アプリケーションによって使用される着信コールのためのコール ブロッキング トランスレーション プロファイルを定義して下さい。 コール ブロック トランスレーション プロファイルのサイズは 31 文字です。 |
call-block disconnect-cause incoming <cause> |
このアトリビュートの値は出典にコールがセッションか IVR アプリケーションによってチェックする着信呼出 し 番号がブロックされた原因のとき戻ります。 ユーザは、次の切断理由を選択できます。
|
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 人までのトランクグループはダイヤル ピアで定義することができます。 このアトリビュートは「ポート」属性と相互独立的です。 プリファレンスの範囲は 1 〜 64 です。 |
voice-port <number> translation-profile [incoming | outgoing] <name> trunk-group <name> [preference]
Attribute | 説明 |
---|---|
translation-profile incoming |
着信 POTS コールのための呼出 し 番号 トランスレーション プロファイルを定義して下さい。 この CLI は相互独立的と変換し、呼出されて変換します古いスタイル ルールからのコマンドを呼出すことをです。 |
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 音声ポートの場合があります。 プリファレンス数は順序でトランクグループ メンバーをソートするのに使用されている省略可能なパラメーターです。 プリファレンス数が定義されない場合、新しいトランクグループ メンバーはトランクグループの最後のメンバーになります。 プリファレンス数範囲は 0 〜 63 です。 64 人までのメンバーはトランクグループに(インターフェイスか音声ポート)定義することができます。 音声ポートの下のトランクグループがアナログ音声ポート トランクグループ メンバーを設定するのに使用されています。 ISDN PRI および BRI のための存在がインターフェイス シリアルか interface bri コマンドによってトランキングするトランクグループ メンバー CLI は変更されません。 トランクグループ名前のサイズは 32 文字です。 |
carrier-id <name> |
トランクグループを所有するキャリアのための ID。 キャリア ID のサイズは 64 文字です。 |
hunt-scheme |
トランクグループからメンバー/チャネルを選択するために送信通話に使用する方式を規定 して下さい。
|
description |
リテラル説明のサイズは約トランクグループ六十四文字です。 |
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
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 |
IOS か。 アクセス リスト ID が着信 VOIPコールのもとを識別するのに使用されています。 |
carrier-id source <name> |
線源キャリヤ ID は終端ゲートウェイの CSR アプリケーションのための VOIPコールに発信 POTS コールをルーティングするターゲット キャリアを選択するために関連付けられます。 キャリア ID のサイズは六十四文字です。 |
carrier-id target <name> |
送信ダイヤルを調和させるのに使用することができる既定のターゲット キャリア ID。 |
description |
VoIP ソースグループについてのリテラル説明のサイズは六十四文字です。 |
disconnect-cause |
このアトリビュートの値は出典にコールが access-list 制限がブロックされた原因のとき戻ります。 ユーザは、次の切断理由を選択できます。
|
translation-profile incoming |
着信 VOIPコールに適用される数トランスレーション ルールを規定 して下さい。 |
h323zone-id |
H.323 着信コールのソース ゾーン ID と一致するゾーン ID を規定 して下さい。 h323zone-id のサイズは六十四文字です。 |
また Cisco CallManager フォールバック 設定のトランスレーション プロファイルを適用できます。 call-manager-fallback モードの下で適用されたとき、コールは時だけ SRST モードへの IP 電話 フォールバック変換されます。 通常の状況で(電話が Cisco CallManager サーバに登録されているとき)、電話によってなされるコールは変換されません。 call-manager-fallback 影響の下のトランスレーション プロファイル IP 電話からのルータへの受信・発信コール。 これはダイヤル ピアの下でトランスレーション プロファイルを適用するとき異なる動作よりです。 着信および発信コマンドは IP 電話と関連しています。 着信コマンドは IP 電話から来るコールのパラメータを変更します。 発信 コマンドは 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 電話からのルータへのすべてのコールは 5551234 として発信者番号を示します。 これには IP 電話間のコールが含まれています。 IP 電話への IP 電話が影響を受けていないように発信者番号を PSTN だけにルータを接続を終了するコールに変更するために、ダイヤル ピア POTS のトランスレーション プロファイルを適用して下さい。
call-manager-fallback コマンドの情報に関しては 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
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
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
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 コマンドは、Output Interpreter Tool(登録ユーザ専用)によってサポートされています。このツールを使用すると、show コマンド出力の分析を表示できます。
ルールの動作をテストするのにテスト ボイス トランスレーション ルール コマンドを使用できます。
変換ルールの機能性をテストするために、EXEC 特権モードでテスト ボイス トランスレーション ルール コマンドを使用して下さい。
test voice translation-rule number input-test-string [type match-type [plan match-type]]
構文 | 説明 |
---|---|
number | テストされる変換ルールの数を規定 します。 範囲は 1 〜 2147483647 です。 |
入力テスト ストリング | 変換ルールによってテストされるストリング。 |
型一致型 | (オプション)コールの番号種別。 一致型引数の有効値は次のとおりです:
|
計画一致型 | (オプション)コールの番号計画。 一致型引数の有効値は次のとおりです:
|
例:
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
変換ルールはこのテストと使用されます:
注: 提示ボイス トランスレーション ルールは音声がまたトランスレーション プロファイル コマンド役立ちますことを示し。
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 コマンドを使用する前に、『debug コマンドの重要な情報』を参照してください。
同じ変換ルールと、デバッグ音声 変換を使用し、次にテスト ボイス トランスレーション ルール コマンドを再度実行して下さい。
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