zoukankan      html  css  js  c++  java
  • Cisco VoIP配置中translation-rule命令的用法

    Cisco VoIP配置中translation-rule命令的用法
    一、概述
    Translation-rule用于增加、移除和替换VoIP中dial-peer拨号对等体inbound和outbound号码。它有以下几种应用:
    1、  应用于所有inbound call legs。
    2、  应用于特定voice-port的所有inbound call legs。
    3、  应用于特定dial-peer的所有outbound call legs。

    二、命令格式
    Translation-rule在全局模式侠有以下两种命令配置方式:
    1、    (config)translation-rule rule_tag
    (config-rule)rule <0-10> match pattern  replacement pattern
    应用translation-rule:
    1)       所有inbound call legs
    (config) voip-incoming translation-rule rule_tag {called/calling}
    2)       特定voice-port的所有inbound call legs
         (config)voice-port 0/0/0
         (config-voiceport)translate {called/calling} rule_tag
    3)       特定dial-peer的所有outbound call legs
         (config)dial-peer voice 10 pots
         (config-dial-peer)translate-outgoing {called/calling} rule_tag

    2、    (config)voice translation-rule rule_tag
    (config-rule)rule <1-15> /match pattern/  /replacement pattern/
    应用voice translation-rule:
    1)      创建voice translation-profile
    (config) voice translation−profile profile_name
    (cfg-translation-profile) translate {called/calling} rule_tag
    2)      特定的dial-peer所有incoming和outgoing call legs
          (config)dial-peer voice 10 pots
         (config-dial-peer)translation-profile {incoming/outgoing} profile_name


    三、通配符
    1、  数字通配符    


      2、其他符号:


    四、用法示例

    1、将40开头的5位号码替换为号码"6666000":
    voice translation−rule 1
    rule 1 /^40.../ /6666000/
    router#test voice translation−rule 1 40123
    Matched with rule 1
    Original number: 40123 Translated number: 6666000

    2、将所有号码替换为 "5554000":
    voice translation−rule 2
    rule 1 /.*/ /5554000/
    router#test voice translation−rule 2 123
    Matched with rule 1
    Original number: 123 Translated number: 5554000
    router#test voice translation−rule 2 86573
    Matched with rule 1
    Original number: 86573 Translated number: 5554000
    router#test voice translation−rule 2 ""
    Matched with rule 1
    Original number: Translated number: 5554000

    3、将所有非空号码替换为 "5554000".
    voice translation−rule 2
    rule 1 /.+/ /5554000/
    router#test voice translation−rule 2 123
    Matched with rule 1
    Original number: 123 Translated number: 5554000
    router#test voice translation−rule 2 ""
    Didn't match with any of rules

    4、保留最后3位号码至5554开头的后3位:
    voice translation−rule 2
    rule 1 /^....(...)/ /55541/
    router#test voice translation−rule 2 1234567
    Matched with rule 1
    Original number: 1234567 Translated number: 5554567
    router#test voice translation−rule 2 123456
    Didn't match with any of rules

  • 相关阅读:
    Matlab曲面拟合和插值
    插值(scipy.interpolate)
    坐标系旋转后的点坐标、坐标点旋转后的点坐标
    halcon相机标定及图像矫正
    别再问我们用什么画图的了!问就是excalidraw
    Windows下如何玩转火热的go-zero
    我用go-zero开发了第一个线上项目
    Java基础差,需要怎么补
    2019-给你六个建议
    简说Java线程的那几个启动方式
  • 原文地址:https://www.cnblogs.com/cyrusxx/p/12824279.html
Copyright © 2011-2022 走看看