此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档旨在说明IOS和IOS-XE呼叫路由,以及与普通老式电话服务(POTS)和IP语音(VoIP)网络呼叫段匹配的入站和出站拨号对等体背后的机制。
除拨号对等体信息外,本文档还介绍与呼叫路由相关的重要主题。这些功能包括数字处理、会话初始协议(SIP)消息处理的快速概述、限制呼叫功能的几种方法、快速媒体和信令绑定概述,以及最后的一些故障排除。
本文档将配置示例以及debug和show命令输出用作参考点。本文档中的许多功能都明确标有IOS和IOS-XE中引入的功能的版本。通过选中“命令和功能路线图”部分,还可以快速参考此信息。如果存在非常明显的缺陷,则会在文本中链接,以便读者了解。
作者:Kyzer Davis,编辑者:Ramiro Amaya,Cisco TAC工程师
虽然阅读本文档不需要正式的必备条件,但在编写本文档时,读者希望已经掌握了一些用于建立和连接电话呼叫的底层语音信令协议的工作知识。这些协议在书中被多次引用。
信令协议:会话发起协议(SIP)、H323(h225 / h245)、媒体网关控制协议(MGCP)、瘦客户端控制协议(SCCP)、ISDN Q931、E1 R2。
介质协议:实时协议(RTP)、语音编解码器、视频编解码器。
模拟技术:耳和嘴(E&M)、外汇交换用户(FXS)和外汇局(FXO)。
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
属性 | 描述 |
---|---|
数字字符串 | 也称为号码字符串、电话号码、号码或E164号码。完整地由数字0到9组成,带有可选的前导加号(+)。
|
拨号号码识别服务(DNIS) | 这是呼叫的被叫号码或目标号码。 |
自动号码识别(ANI) | 这是呼叫的主叫号码或始发主叫号码。这也可以称为主叫线路标识符(CLID),也可以标题为主叫方ID |
统一资源标识符 (URI) | URI可以是sip:或电话:字符串最常用于VoIP协议SIP和H323。
|
运营商ID | CID示例: 注意:CSCua14749 |
路由字符串 | ILS路由字符串的思科专有报头,与SIP一起使用。
|
枚举 | ENUM是使用域名服务(DNS)将E164电话号码转换为URI的协议。本文档不涉及此内容。 |
PSTN | 公共交换电话网 |
ITSP | 互联网电话服务提供商 |
SBC | 会话边界控制器。 这是代表客户LAN和ITSP/PSTN网络之间分界点的设备 |
功能 | IOS 版本 | IOS-XE版本 |
数字扩展(num-exp) 拨号对等体(POTS和VOIP) 应答地址 destination-pattern 传入被叫号码 会话目标(IPv4和DNS) 最大连接数(最大连接数) direct-inward-dial forward-digits(POTS) 前缀(POTS) 超时位间(语音端口) |
11.3(1)T | all |
拨号对等终结器 |
12.0 | all |
huntstop |
12.0(5)T | all |
ISDN映射 | 12.0(6)T | all |
拨号对等体寻线方案 |
12.0(7)XK | all |
语音转换规则和配置文件 转换传出 编号类型 digit-strip(POTS) |
12.0.(7)XR1 | all |
会话目标(sip-server) | 12.1(1)T | all |
POTS中继组 | 12.1(3)T | all |
DNIS映射(出站) | 12.2(2)XB |
all |
trunk-group-label | 12.2(11)T |
all |
拨号对等体(数据) | 12.2(13)T |
all |
语音类URI(出站) | 12.3(4)T |
all |
会话目标(IPv6) | 12.4(22)T |
all |
SIP配置文件(出站) | 15.0(1)M |
all |
语音类URI(入站) voice source-group |
15.1(2)T |
3.8秒 |
SIP副本列表 会话目标(注册器) |
15.1(3)T |
3.6秒 |
call-route(url) |
15.2(1)T |
3.3S |
最大带宽 |
15.2(2)T |
3.7S |
E164模式映射(出站) | 15.2(4)M | 3.7S |
语音类路由字符串 call-route(dest-route-string) |
15.3(3)米 | 3.10S |
拨号对等体组(VOIP) E164模式映射(入站) 目标服务器组 requri传递 会话目标(sip-uri) |
15.4(1)T |
3.11S |
拨号对等体调配策略 SIP配置文件(入站) |
15.4(2)T | 3.12秒 |
拨号对等体组(POTS) | 15.5(1)T | 3.14秒 |
语音类租户 | 15.6(2)T | 16.3.1 |
拨号对等体的VRF过滤 | 15.6(3)米 | 16.3.1 |
e164-translation | 不适用 | 16.8.1 |
SIP DSAPP | 不适用 | 16.12.1 |
服务器组的Huntstop | 不适用 | 17.4.1 |
租户的SIP侦听端口 拨号对等体的租户过滤 |
不适用 | 17.8.1 |
Cisco IOS和IOS-XE网关利用拨号对等体的概念来控制呼叫路由和呼叫每个支路的功能协商。呼叫段是两个呼叫代理之间的双向通信。呼叫代理是发起、处理或转发电话呼叫的设备。这可以也不限于电话提供商设备、思科网关、IP电话、思科统一通信管理器(CUCM)、Cisco Unity连接(CUC)等。要列出的呼叫座席太多。
场景:从另一个呼叫代理到达思科网关的呼叫是入站呼叫段(in-leg)。 网关处理呼叫,并根据其处理将呼叫发送到下一个呼叫代理。这是呼出呼叫段(外线段)。
图1 显示通过思科语音网关从PSTN到CUCM路由的呼叫以及相应的入站和出站呼叫段信息。
图1 — 显示呼入和呼出呼叫段
通过思科网关ALWAYS*成功进行的呼叫与入站或出站拨号对等体匹配,以便正确路由。呼入和呼出拨号对等体类似于前面提到的呼叫段。在映像1中,从PSTN到达思科网关的呼叫需要匹配入站拨号对等体。然后,网关使用出站拨号对等体将呼叫路由到下一个呼叫代理。请务必记住,这些术语是从思科网关的角度定义的。
通过为呼叫的每一端匹配拨号对等体,管理员有权控制每个特定呼叫段的许多方面。这些示例包括语音编解码器、DTMF首选项、数字处理、呼叫路由位置以及许多其他设置。拨号对等体可以配置入站和出站匹配语句,因此如果对特定拨号对等体应用有效的入站和出站匹配配置,则可以为in-leg和out-leg匹配相同的拨号对等体。
映像2说明与映像1相同的入站和出站呼叫段,但与通过思科语音网关从PSTN到CUCM路由的呼叫的相应拨号对等体一起说明。
图2 — 显示入站和出站拨号对等体
思科语音网关可以互通多种不同类型的语音呼叫和协议,包括IP到IP、POTS到POTS和IP到POTS,反之亦然。
图3 说明通过思科统一边界要素(CUBE)进行的VoIP到VoIP呼叫。
图3 - Voip到VoIP呼叫的入站和出站拨号对等体
图4显示通过思科网关的POTS到POTS呼叫。
映像4 - POTS到POTS呼叫的入站和出站拨号对等体
POTS | 普通老式电话服务拨号对等体与模拟连接匹配,例如模拟FXS、FXO、ISDN T1/E1、E1 R2和耳和嘴(E&M)连接。 这些设备会向/从网关上的物理语音端口发送或接收呼叫。 |
VOIP | IP语音拨号对等体主要用于控制与网关之间的H323和SIP连接。 这些拨号对等体使用域名系统(DNS)从IPv4和IPv6地址以及完全限定域名(FQDN)发送和接收信令。 — VoIP拨号对等体还可用于帧中继语音(VoFR)、ATM语音(VoATM)、高级数据链路控制语音(VoHDLC)以及注册、准入和状态(RAS)信令,这些拨号对等体的会话目标也可以包括结算和ENUM值。 注意:其中一些配置类型是较新网络中未见的较旧技术,而且对于IOS-XE,一些不再受支持。因此,本文档不涵盖这些内容。 |
MMOIP | 多媒体IP邮件拨号对等体用于向交换服务器发送电子邮件。 这些设备主要用于t37进/出/进传真。这些拨号对等体类型不在本文档的范围内。 |
注意: 可在Cisco网关上配置的最大拨号对等体数量取决于可用内存(DRAM)。 每个拨号对等体消耗大约6KB的内存,因此请确保网关至少拥有为其他CPU进程保留的总内存的20%。大量已配置的拨号对等体可能会增加路由呼叫的延迟。当思科语音应用从上到下通过拨号对等体查找时,这一点非常重要,类似于访问控制列表(ACL)。 在较新的思科网关上,这通常不是问题。
示例错误:
May 26 12:59:46.406: %DIALPEER_DB-3-ADDPEER_MEM_THRESHOLD: Addition of dial-peers limited by available memory
当思科网关收到呼叫建立请求时,网关开始搜索适用于此呼叫的传入拨号对等体。这不是逐位分析;而是使用完整消息来确定选择哪个入站拨号对等体。表1、表2和表3中定义的首选项列表所指示的呼叫协议是否匹配消息中项的顺序。拨号对等体只需要满足匹配条件之一。在拨号对等体中配置所有属性或每个属性与呼叫设置信息匹配,则无需。所有拨号对等体根据第一个匹配条件搜索对等体。只有在找不到匹配项时,网关才会转到下一个条件。
首选项 | 匹配条件 |
拨号对等体命令 |
1 | URI |
通过<uri-tag>传入URI |
2 | URI |
incoming uri request <uri-tag> |
3 | URI | 传入URI到<uri-tag> |
4 | URI | 从<uri-tag>传入URI |
5 | 被叫号码 |
incoming called-number <number-string> 传入被叫e164-pattern-map <pattern-map-number> |
6 | 主叫号码 | 传入呼叫e164-pattern-map <pattern-map-number> answer-address <number-string> |
7 | 目标模式(ANI) | destination-pattern <number-string> |
8 | 运营商ID | carrier-id source <string> |
注意:如果配置了适用的功能,可以按VRF或租户过滤符合条件的入站拨号对等体。有关详细信息,请参阅虚拟路由和转发(VRF)和拨号对等体寻线和语音类租户部分。
表 2. 入站H323拨号对等体选择首选项
首选项 | 匹配条件 | 拨号对等体命令 |
1 | URI | 名为<uri-tag>的传入URI 传入URI主叫<uri-tag> |
2 | 被叫号码 | incoming called-number <number-string> 传入被叫e164-pattern-map <pattern-map-number> |
3 | 主叫号码 | 传入呼叫e164-pattern-map <pattern-map-number> answer-address <number-string> |
4 | 目标模式(ANI) |
destination-pattern <number-string> |
5 | 运营商ID |
carrier-id source <string> |
表3.入站分组POTS拨号对等体选择首选项
首选项 | 匹配条件 | 拨号对等体命令 |
1 | 被叫号码 | incoming called-number <number-string> |
2 | 主叫号码 | answer-address <number-string> |
3 | 目标模式(ANI) | destination-pattern <number-string> |
4 | 语音端口 | port <voice-port-number> |
当不存在匹配/默认拨号对等体0 peer_tag=0, pid:0时
当POTS或VoIP呼叫的入站拨号对等体没有符合条件的匹配时,网关会分配拨号对等体0。这并不理想,因为拨号对等体0具有有限的功能,并且可能导致呼叫问题。此异常点是SCCP和MGCP协议,它们不使用拨号对等体进行路由呼叫。有关详细信息,请参阅MGCP和SCCP部分。
dial-peer 0功能
出站拨号对等体用于将POTS或VoIP呼叫从网关路由到下一个呼叫代理。与入站拨号对等体匹配一样,网关可以根据特定协议的首选项顺序使用项列表来匹配拨号对等体。但是,与入站拨号对等体不同,如果没有符合条件的出站拨号对等体来路由呼叫,则呼叫失败。与入站拨号对等体匹配类似,所有拨号对等体都根据第一个匹配条件进行搜索。只有在找不到匹配项时,网关才会转到下一个条件。
表4.出站SIP拨号对等体选择首选项
首选项 | 匹配条件 | 拨号对等体命令* |
1 | 拨号对等体组拨号对等体 | destination dpg <dpg-tag> (在入站拨号对等体上配置的DPG) |
2 | 拨号对等体调配策略URI | destination uri-from <uri-tag> (在入站拨号对等体上配置的DPP) |
3 | ILS路由字符串 | destination route-string <route-string-tag> |
4 | URI和运营商ID | 目标uri <uri-tag> AND carrier-id target <string> |
5 | 被叫号码和载波ID | destination-pattern <number-string> AND carrier-id target <string> |
6 | URI | destination uri <uri-tag> |
7 | 被叫号码 | destination-pattern <DNIS-number> destination e164-pattern-map <pattern-map-number> dnis-map <dnis-map-number> |
8 | 主叫号码 | 目标呼叫e164-pattern-map <pattern-map-number> |
表5.出站H323拨号对等体选择首选项
首选项 | 匹配条件 | 拨号对等体命令* |
1 | 拨号对等体组拨号对等体 | destination dpg <dpg-tag> (在入站拨号对等体上配置) |
2 | URI和运营商ID | 目标uri <uri-tag> AND carrier-id target <string> |
3 | 被叫号码和载波ID | destination-pattern <number-string> AND carrier-id target <string> |
4 | URI | destination uri <uri-tag> |
5 | 被叫号码 | destination-pattern <number-string> destination e164-pattern-map <pattern-map-number> dnis-map <dnis-map-number> |
6 | 主叫号码 | 目标呼叫e164-pattern-map <pattern-map-number> |
表6.出站POTS拨号对等体选择首选项
首选项 | 匹配条件 | 拨号对等体命令* |
1 | 拨号对等体组拨号对等体 | destination dpg <dpg-tag> (在入站拨号对等体上配置) |
2 | URI和运营商ID | 目标uri <uri-tag> AND carrier-id target <string> |
3 | 被叫号码和载波ID | destination-pattern <number-string> AND carrier-id target <string> |
4 | URI | destination uri <uri-tag> |
5 | 被叫号码 | destination-pattern <DNIS-number> dnis-map <map-number> |
注意:* Number String Dial-Peer Hunting和URI Dial-Peer Hunting部分介绍网关如何在移至下一个匹配条件之前评估每个匹配条件行的潜在命令列表。即,在检查主叫号码命令之前,评估所有可能的目标模式匹配和目标e164模式映射匹配命令。
数字字符串首选项:
与URI具有用于评估匹配的特定操作顺序非常相似,在评估数字数字字符串时也使用一组规则。思科网关的默认拨号对等体寻线方案设置为0。这意味着网关搜索具有最长匹配(最具体)的模式。 如果有两个具有相同匹配长度的拨号对等体,则网关会查看显式定义的拨号对等体首选项。最后,如果两者相同,它会随机选择一个。
还有其他拨号对等体寻线方案可供配置;但是,大多数部署保留默认值0。
提示:如果拨号对等体在默认顺序之外匹配,则管理员应检查非默认拨号对等体寻线方案的运行配置。
Gateway(config)# dial-peer hunt ? <0-7> Dial-peer hunting choices, listed in hunting order within each choice: 0 - Longest match in phone number, explicit preference, random selection. 1 - Longest match in phone number, explicit preference, least recent use. 2 - Explicit preference, longest match in phone number, random selection. 3 - Explicit preference, longest match in phone number, least recent use. 4 - Least recent use, longest match in phone number, explicit preference. 5 - Least recent use, explicit preference, longest match in phone number. 6 - Random selection. 7 - Least recent use.
场景:符合条件的拨号对等体已配置了以下可能的匹配项,并且网关正在评估数字字符串2001。拨号对等体1可以匹配任意数字2000到2999,而拨号对等体2可以匹配2000到2009。此呼叫将匹配拨号对等体2,因为它是使用默认拨号对等体寻线机制(拨号对等体寻线0)时数字字符串2001的最长匹配(最具体)。 换句话说,数字序列200是与数字字符串2001中的数字序列完全匹配的最大序列。
!
dial-peer voice 1 voip
destination-pattern 2...
!
dial-peer voice 2 voip
destination-pattern 200.
!
首选项定义为管理员为每个拨号对等体定义的权重。管理员可以配置首选项,以便呼叫始终在其他呼叫之前使用特定拨号对等体。默认情况下,所有拨号对等体都是首选项0。首选项0的拨号对等体在优先级为1到10的另一个拨号对等体之前匹配。大多数管理员设置多个拨号对等体,以将呼叫发送到具有备份用户或正在使用具有较低优先级(配置有较高号码)的其他拨号对等体配置的特定CUCM用户。
场景:两个拨号对等体为2001数字字符串配置了相同的匹配长度。管理员定义了显式首选项。由于两个拨号对等体的匹配长度相同,因此网关对它们的评估相同。但是,管理员将拨号对等体1设置了更高的首选项,以便选择拨号对等体作为路由呼叫时使用的第一个拨号对等体。如果第一个拨号对等体发生故障,拨号对等体2将保持为辅助选项。
!
dial-peer voice 1 voip
destination-pattern 2...
preference 1
!
dial-peer voice 2 voip
destination-pattern 2...
preference 2
!
思科网关一次只尝试通过一个符合条件的出站拨号对等体路由呼叫。如果在第一个所选拨号对等体上观察到故障情况,则网关会尝试将呼叫路由到下一个符合条件的拨号对等体。此操作会一直持续,直到呼叫成功或失败,因为没有更多符合条件的拨号对等体可供尝试。拨号对等体寻线和失败的常见症状是呼叫时回铃的明显延迟。通常需要调试来验证特定拨号对等体上呼叫失败的确切原因。如果管理员不希望网关在发现故障情况时查找其他拨号对等体,则可在拨号对等体上使用huntstop命令。
场景:两个拨号对等体为2001数字字符串配置了相同的匹配长度。管理员已定义了显式首选项,不想为此特定呼叫匹配拨号对等体2。由于有两个具有相同匹配长度的拨号对等体,该首选项用于确定拨号对等体。拨号对等体1具有配置的最低首选项号码,因此用于路由呼叫。如果使用拨号对等体1在出站呼叫段上出现故障情况,则网关会立即停止拨号对等体寻线,因为已配置huntstop 命令。在此场景中,拨号对等体2从不用于出站路由。
! dial-peer voice 1 voip destination-pattern 2... preference 1 huntstop ! dial-peer voice 2 voip destination-pattern 2... preference 2 !
注意:huntstop和preference命令也可与URI匹配语句结合使用,因为它们是常规拨号对等体配置命令。此外,语音类服务器组配置可以在17.4.1a中使用huntstop命令。有关此的详细信息,请参阅目标服务器组部分。
网关会查看每个匹配条件并在移至下一个匹配条件之前将其耗尽。例如,入站SIP呼叫。根据表1。入站SIP拨号对等体选择首选项,思科网关首先检查的是URI,并评估所有潜在URI命令,以找到适合的命令。如果没有匹配或未配置匹配,则网关将移至下一个匹配项并对该条件执行评估。此过程会重复,直到呼叫根据匹配路由或网关超出匹配条件进行检查。
当使用URI命令配置入站或出站拨号对等体时,网关将检查在多个报头中收到的URI,以查找潜在匹配。匹配首选项基于最具体的匹配,而确切的首选项将进入“完全URI匹配”、“主机部分”、“用户部分”或电话URI。了解URI匹配的操作顺序可大大帮助拨号对等体与SIP和CUBE部署进行匹配。
可使用命令voice class uri sip preference操作此首选项顺序,以将user-id指定为第一个选项而不是主机。
URI首选项:
场景:管理员已配置以下拨号对等体并向网关发送呼叫。收到的INVITE中的FROM标题为“From:<sip:testuser@10.10.10.10>"网关可能根据此报头匹配两个不同的拨号对等体。基于用户部分的拨号对等体1和基于主机部分的拨号对等体2。但是,由于主机匹配是用户匹配之上的首选项,因此拨号对等体2用于呼叫中的入站拨号对等体。
! voice class uri URI1 sip user-id testuser ! voice class uri URI2 sip host ipv4:10.10.10.10 ! dial-peer voice 1 voip sess protocol sipv2 incoming uri FROM URI1 ! dial-peer voice 2 voip sess protocol sipv2 incoming uri FROM URI2 !
入站和出站拨号对等体的URI匹配使管理员能够灵活地对支持其消息传送中URI的VoIP协议的多个电话号码字符串执行匹配。在IOS 15.4(1)T和IOS-XE 3.11S之前,请求URI必须包含字母数字“user@host”,否则思科网关将拒绝包含4xx消息的呼叫。现在,URI可以仅包含主机部分,网关仅根据提供的主机路由呼叫。例如sip:cisco.com。
此外,在IOS 15.4(1)T和IOS-XE 3.11S之前,语音类URI用户ID只能是数字e.164值(sip:1234@host.com)。 更改了此项,以便管理员可以在CUBE上配置字母数字用户ID(sip:user@host.com)
语音类uri的主机或用户部分可包含正则表达式(regex)模式,这大大扩展了可匹配的可能值。
Gateway(config-voice-uri-class)# user-id .) % unmatched ()user-id pattern should be of format ^([][0-9A-Za-z\|\/()*+^$&?#--.])*$
Gateway(config-voice-uri-class)# host .)
% unmatched ()host pattern should be of format ^([][0-9A-Za-z\|@\/()*+^$&?#--.])*$
Gateway(config-voice-uri-class)# pattern .)
% unmatched ()pattern pattern should be of format ^([][0-9A-Za-z\|@;:=%!~\/()*+^$&?#--.])*$
语音类URI示例
! voice class uri HOST sip host webex.com host dns:cisco.webex.com host ipv4:14.50.244.2 host ipv6:[2001:4860:4860::8888] ! voice class uri USER sip user-id username ! voice class uri PATTERN sip pattern 8675309 ! voice class uri HostRegex sip host (.*)cisco.com !
voice class uri ipRegex sip
host 172\.18\.110\.20[567]
! voice class uri PatternRegex sip pattern 555(.*) !
voice class uri ipRegex sip
pattern (172\.18\.110\.10[134]|10\.10\.10\.10)
! One Line that matches 172.18.110.101, 172.18.110.103, 172.18.110.104 OR 10.10.10.10
! voice class uri UserRegex sip user-id test(.*) !
每个语音clas uri只能配置10台主机、1个模式或1个用户ID,如下例所示。如果需要匹配更多项,建议使用Regex。
Gateway(config)# voice class uri TEST sip Gateway(config-voice-uri-class)#host ipv4:1.1.1.1 Gateway(config-voice-uri-class)#host ipv4:2.2.2.2 Gateway(config-voice-uri-class)#host ipv4:3.3.3.3 Gateway(config-voice-uri-class)#host ipv4:4.4.4.4 Gateway(config-voice-uri-class)#host ipv4:5.5.5.5 Gateway(config-voice-uri-class)#host ipv4:6.6.6.6 Gateway(config-voice-uri-class)#host ipv4:7.7.7.7 Gateway(config-voice-uri-class)#host ipv4:8.8.8.8 Gateway(config-voice-uri-class)#host ipv4:9.9.9.9 Gateway(config-voice-uri-class)#host ipv4:10.10.10.10 Gateway(config-voice-uri-class)#host ipv4:11.11.11.11 Error:Maximum of 10 hosts can only be configured. Gateway(config)# voice class uri TEST2 sip Gateway(config-voice-uri-class)#host dns:1.com Gateway(config-voice-uri-class)#host dns:2.com Gateway(config-voice-uri-class)#host dns:3.com Gateway(config-voice-uri-class)#host dns:4.com Gateway(config-voice-uri-class)#host dns:5.com Gateway(config-voice-uri-class)#host dns:6.com Gateway(config-voice-uri-class)#host dns:7.com Gateway(config-voice-uri-class)#host dns:8.com Gateway(config-voice-uri-class)#host dns:9.com Gateway(config-voice-uri-class)#host dns:10.com Gateway(config-voice-uri-class)#host dns:11.com Error:Maximum of 10 hosts can only be configured. Gateway(config)# voice class uri TEST3 sip Gateway(config-voice-uri-class)#user-id 8675309 Gateway(config-voice-uri-class)#user-id 123456789 Gateway(config-voice-uri-class)#do sh run | s TEST3 voice class uri TEST3 sip user-id 123456789 Gateway(config)# voice class uri TEST4 sip Gateway(config-voice-uri-class)#pattern 8675309 Gateway(config-voice-uri-class)#pattern 123456789 Gateway(config-voice-uri-class)#do sh run | s TEST4 voice class uri TEST4 sip pattern 123456789
此功能已添加到IOS 15.1(2)T和IOS-XE 3.8S中,并使用 语音类URI 已配置并应用于入站拨号对等体。传入URI已被许多客户采用,而不是传统 传入被叫号码 SIP呼叫的语句,因为它是选择入站拨号对等体时检查的第一个匹配条件。该命令还使管理员能够更好地匹配来自特定呼叫代理或用户的呼叫。
常见使用案例
配置示例
以下示例输出匹配从语音类URI中定义的两个主机IP获取的任何SIP请求的拨号对等体777。正在监视的报头定义为拨号对等体上的FROM报头;但是,管理员可以定义许多其他内容,包括VIA、TO和REQUEST(请求URI)。 如果CUCM向CUBE发送OPTIONS ping命令,该命令现在与拨号对等体777匹配,并从指定接口将my 200 OK回复源到OPTIONS。如果我的CUCM向CUBE发送INVITE,则将拨号对等体777匹配为入站拨号对等体。
! voice class uri CUCM sip
host ipv4:14.50.244.2
host ipv4:14.50.244.20 ! dial-peer voice 777 voip description INCOMING URI session protocol sipv2 incoming uri from CUCM voice-class sip bind control source-interface Loopback777 voice-class sip bind media source-interface Loopback777 !
Cisco IOS网关可以通过应用 语音类URI 将呼叫路由URL添加到全局配置。当出现此情况时,CUBE将尝试根据请求URI路由呼叫。此功能已添加到IOS 12.3(4)T中,并且存在于所有IOS-XE版本中。应注意,默认情况下,传出SIP Request-URI和To 报头URI将具有出站拨号对等体的会话目标。可以使用命令禁用此功能 requri传递 它允许网关将in-leg URI主机部分传递到out-leg,而不是将URI主机部分替换为会话目标。命令 requri传递 添加到15.4(1)T和IOS-XE 3.11S中。
配置示例
voice service voip
sip
call-route url
requri-passing
! voice class uri CUCM sip
host dns:.*.com ! dial-peer voice 777 voip description OUTGOING URI session protocol sipv2 destination uri CUCM
session target sip-uri !
除了 语音类URI,管理员可以使用 拨号对等体调配策略(DPP) 匹配出站拨号对等体匹配的腿内URI。IOS 15.4(2)T和IOS-XE 3.12S中增加了此功能。A dial-peer provision-policy 需要定义主匹配属性,辅助匹配属性为可选。调配策略应用于入站拨号对等体,当该拨号对等体被选择用于入站呼叫段时,将调用该策略。结果是根据拨号对等体调配策略的属性选择出站拨号对等体。
出站匹配可以是单个报头或多个报头,为了匹配拨号对等体,所有报头都必须为true。
在示例中,有From和To信头的语音类URI对于OR匹配,将配置包含两个首选项的拨号对等体调配策略。From报头是第一个首选项,To报头是备份首选项。拨号对等体1234用于应用入站匹配的调配策略。然后构建拨号对等体11111和22222,分别应用目标uri-from和目标uri-to命令。这些命令会返回到其语音类URI。对于我们将收到INVITE的呼叫,请匹配拨号对等体1234并检查调配策略。然后,设备将首先尝试在From报头上路由,作为拨号对等体11111上的适用匹配项。如果失败,我们还可以尝试在到报头上路由22222。
本示例还详细说明如何与拨号对等体调配策略实现AND匹配。假设收到相同的INVITE,我们可以在一个首选项下定义两个报头,并将其应用于入站拨号对等体。
现在,收到邀请后,它将检查符合条件的出站拨号对等体,这些对等体同时满足调配策略中定义的两个匹配条件。因此,在本示例中,我们的出站拨号对等体需要同时使用TO和FROM报头进行定义才能进行匹配。如果两者之一不是有效匹配项,则不使用此拨号对等体12345。
注意:虽然我们在FROM报头上路由呼叫,但离开网关的INVITE仍具有原始请求URI。我们只需使用拨号对等体调配策略来匹配出站拨号对等体,而不更改请求URI。
配置示例:
### Recieved INVITE
Received:
INVITE sip:8675309@172.18.110.58:5060 SIP/2.0
From: sipp <sip:sipp@172.18.110.65>;tag=1
To: sut <sip:cube@172.18.110.58:5060>
### Common Configurations
!
voice class uri FROM sip
user-id sipp
!
voice class uri TO sip
user-id cube
!
### OR Match
!
voice class dial-peer provision-policy 1
description match from header. If false, try to header
preference 1 from
preference 2 to
!
dial-peer voice 1234 voip
session protocol sipv2
destination provision-policy 1
incoming called-number .
!
dial-peer voice 11111 voip
destination uri-from FROM
session protocol sipv2
session target ipv4:172.18.110.48
!
dial-peer voice 22222 voip
destination uri-to TO
session protocol sipv2
session target ipv4:172.18.110.48
!
### AND Match
!
voice class dial-peer provision-policy 2
description match from AND to headers
preference 1 from to
!
dial-peer voice 1234 voip
session protocol sipv2
destination provision-policy 2
incoming called-number .
!
dial-peer voice 12345 voip
destination uri-from FROM
destination uri-to TO
session protocol sipv2
session target ipv4:172.18.110.48
!
session target sip-uri
在IOS 15.4(1)T和IOS-XE 3.11S之前,如果URI的主机部分不同,但用户相同,则这需要两个单独的出站拨号对等体。
在此版本之后,管理员可以配置一个拨号对等体为同一用户服务多个主机。即testuser@cisco.com和testuser@webex.com。使用会话目标sip-uri触发传入INVITE请求URI域的DNS解析并动态确定会话目标IP。
配置示例:
网关收到两个SIP INVITE,其报头如下:INVITE sip:testuser@cisco.com:5060 SIP/2.0 INVITE sip:testuser@webex.com:5060 SIP/2.0。由于传入uri命令和用户ID定义均匹配“testuser”,因此网关与testuser@cisco.com和testuser@webex.com的传入SIP请求匹配。 存在的命令voice-class sip call-route url表示我们根据此入站INVITE的请求URI评估出站拨号对等体。Weans匹配dial-peer 2是因为与“testuser”的用户ID拨号对等体1匹配的原因相同。 此拨号对等体的会话目标是由FQDN为“会话目标sip-uri”定义的原始sip-uri。在进行DNS解析并将cisco.com和webex.com更改为第3层路由的IP后,我们会从网关发送一条消息。
!
ip host cisco.com 10.10.10.10
ip host webex.com 10.10.10.10
!
voice class uri TEST-IN sip
user-id testuser
!
dial-peer voice 1 voip
description INCOMING dial-peer
incoming uri request TEST
session protocol sipv2
voice-class sip call-route url
!
dial-peer voice 2 voip
description OUTBOUND dial-peer
destination uri TEST
session protocol sipv2
session target sip-uri
!
验证:
show voice class uri <uri-name> show voice class dial-peer provision-policy <number> debug voip uri
管理员在定义涉及数字字符串的入站和出站匹配机制时可以使用拨号对等体通配符。这包括destination-pattern、incoming called-number、e164-pattern-maps和answer-address以及prefix命令。拨号对等体通配符是可用于配置的正则表达式(regex),在拨号对等体的匹配方面具有更大的灵活性。
通配符表
字符 | 定义 | Examples |
* | 在拨号对等体上,键盘上的字面值为*(星型)。 | 12345 * |
# | 在拨号对等体上,键盘上的字面值为#(井号)。 | 8675309# |
, | 在数字之间插入1秒暂停。 方括号[ ]中也可以使用逗号来分隔连续范围。 |
9,,,,,555 91[1-3,5-9]8675309 |
。 | 用于匹配任何值0-9、A-F和*、#、+的正则表达式字符 每个拨号对等体最多可定义15个点字符,但CLI允许管理员根据自己认为适合的数量进行配置。 如果需要15个点以上,请使用T。 |
2...。 91[2-9]..[2-9]...... |
% | 前一个数字出现零次或多次的正则表达式。 | |
+ | 当在字符串开头使用时,它表示E164数字中使用的文字+。 当在字符串中的其他位置使用时,它是前一位数的正则表达式值,出现一次或多次。 |
+19191112222 |
? | 前一个数字的正则表达式发生零次或一次。 | (206)?5015111 (0)?(1)?(1)?21933... |
^ | 正则表达式字符,表示在方括号外使用时字符串的开头 当在方括号内使用时,它被视为排除或DO NO MATCH语句 在更高版本中不再需要此功能,因为网关在处理不带^的正则表达式字符串时会自动假设^。 |
^8675309 91[^135]555 |
$ | 表示字符串结尾的正则表达式字符。 | 8675309$ |
\ | 转义字符表示文字值 |
|
[ ] | 方括号定义单个位置的字符范围。 必须使用逗号分隔连续字符串。 |
[1-5]0000 [2,5-8]0000 |
() | 括号定义一组字符。 |
9(258) 7777 |
T | 最多32位的可变长度匹配。 路由器在路由呼叫之前等待数字间超时。 数字间超时的默认值为10秒,可通过语音端口上的数字间超时进行修改。 T还引用T302计时器 |
9011T |
- | 在括号中用于定义范围。 |
[5-9]1234 |
网关的输出,显示可能的正则表达式输入
Gateway(config-dial-peer)# destination-pattern asdfqw4r3~2 Incorrect format for E.164 Number regular expression must be of the form ^[][^0-9,A-F#*.?+%()-]*T?(\$)?$
拨号对等体可以处于两种运行状态之一。
拨号对等体要处于有效运行状态并符合呼叫路由的使用条件,则需要处于UP状态。对于出站VOIP拨号对等体,这意味着应存在有效的出站匹配机制以及将呼叫路由到的有效会话目标。对于出站POTS拨号对等体,应配置有效的出站匹配机制和有效的语音端口。对于入站拨号对等体,只能配置有效的入站匹配机制。
当拨号对等体配置了keepalive机制,并且远程目标使该keepalive机制的参数失败时,会看到busyout状态。然后,网关将拨号对等体移入忙状态,使其不再用于呼叫路由决策,并且当保持连接机制再次执行时,网关将拨号对等体恢复为up状态。如果拨号对等体被选为出站拨号对等体,并且此拨号对等体处于忙状态,则网关将失败呼叫,原因代码为188。
除运行状态外,还有管理状态。
管理员可以在拨号对等体上输入shutdown命令,在不从配置中删除拨号对等体的情况下禁用拨号对等体。要重新启用按拨号,请输入no shutdown。
注意:语音端口处于关闭、关闭或不运行状态的拨号对等体保持运行状态为UP,但“输出状态”显示为Down
确认
Gateway# show dial-peer voice summary dial-peer hunt 0 AD PRE PASS OUT TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE 1 voip up up 0 syst 777 voip up up 9... 0 syst ipv4:14.50.244.2 555 voip up down 555 0 syst 888 pots up up 888 0 up 0/2/0
999 pots up up 999 0 down 0/2/0
123 voip up up 123 0 syst ipv4:10.10.10.10 busyout
从IOS 15.6(3)M和IOS-XE 16.3.1开始,Cisco网关可以使用VRF ID匹配入站拨号对等体。要利用此优势,管理员必须将入站拨号对等体绑定到接口,该接口又将拨号对等体绑定到指定接口上的VRF ID。绑定完成后,思科网关将入站呼叫过滤为仅包括符合条件的入站拨号对等体,该拨号对等体与数据包接收时接口的VRF ID匹配。从此处,入站拨号对等体将根据常规拨号对等体匹配操作顺序进行匹配。
在这些IOS/IOS-XE版本之前,思科网关将根据常规入站拨号对等体匹配进行入站选择,而不进行任何过滤。这意味着VRF1呼叫可以与VRF2拨号对等体匹配。此外,由于在这些版本之前,H323和SIP只支持一个VRF,因此尝试使用多VRF功能时会出现其他问题。将单个VRF用于语音应用称为VRF感知配置。
完整的VRF感知文档: http://www.cisco.com/c/en/us/td/docs/ios/12_4t/12_4t15/vrfawvgw.html
思科网关能够跨VRF桥接呼叫,而无需配置路由泄漏。这意味着,如果满足正常的出站拨号对等体匹配选择,则VRF1上的入站呼叫可以在VRF2的拨号对等体上出站路由。可以使用拨号对等体组强制思科网关将呼叫保留在同一VRF内。
VRF和拨号对等体组配置示例
此配置示例具有VRF1和VRF2,两个重叠IP范围和两个重叠电话号码范围。
我们使用VRF绑定来确保匹配正确的入站拨号对等体和拨号对等体组以确保匹配正确的VRF绑定出站拨号对等体。\如果用于8675309呼叫的SIP数据包到达gig0/0/1.2,则网关会根据VRF2 ID过滤出所有可用的入站拨号对等体。这意味着我们无法匹配拨号对等体10。现在我们检查了匹配拨号对等体20的数字字符串。拨号对等体20有一个拨号对等体组,该组告知网关唯一可匹配的出站拨号对等体也是拨号对等体20。此拨号对等体组允许我们避免匹配拨号对等体10并跨过从VRF1到VRF的呼叫2.从那里,呼叫应正常进行。
! interface GigabitEthernet0/0/1.1 description VRF1 encapsulation dot1Q 10 ip vrf forwarding VRF1 ip address 10.10.10.10 255.255.255.0 ! interface GigabitEthernet0/0/1.2 description VRF2 encapsulation dot1Q 20 ip vrf forwarding VRF2 ip address 10.10.10.10 255.255.255.0 ! voice service voip no ip address trusted authenticate media-address voice-vrf VRF1 media-address voice-vrf VRF2 allow-connections sip to sip sip ! voice class dpg 10 description INBOUND VRF1 to OUTBOUND VRF1 dial-peer 10 preference 1 ! voice class dpg 20 description INBOUND VRF2 to OUTBOUND VRF2 dial-peer 20 preference 1 ! dial-peer voice 10 voip description VRF1 destination-pattern 8675309 session protocol sipv2 session target ipv4:10.10.10.20 destination dpg 10 incoming called-number 8675309 voice-class sip bind control source-interface GigabitEthernet0/0/1.1 voice-class sip bind media source-interface GigabitEthernet0/0/1.1 ! dial-peer voice 20 voip description VRF2 destination-pattern 8675309 session protocol sipv2 session target ipv4:10.10.10.20 destination dpg 20 incoming called-number 8675309 voice-class sip bind control source-interface GigabitEthernet0/0/1.2 voice-class sip bind media source-interface GigabitEthernet0/0/1.2 !
确认
Gateway# show vrf brief | i VRF VRF1 1:1 ipv4 Gi0/0/1.1 VRF2 2:2 ipv4 Gi0/0/1.2
Gateway# show dial-peer voice summary TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE VRF 10 voip up up 8675309 0 syst ipv4:10.10.10.20 VRF1 20 voip up up 8675309 0 syst ipv4:10.10.10.20 VRF2
Gateway# show voice class dpg 10 Voice class dpg: 10 AdminStatus: Up Description: INBOUND to OUTBOUND VRF1 Total dial-peer entries: 1 Peer Tag Pref -------- ---- 10 1 -------------------------------------
Gateway# show voice class dpg 20 Voice class dpg: 20 AdminStatus: Up Description: INBOUND to OUTBOUND VRF2 Total dial-peer entries: 1 Peer Tag Pref -------- ---- 20 1 -------------------------------------
随着业务需求的增长,公司不断扩展,需要更多DID,企业管理员可能会发现基本拨号对等体无法很好地满足扩展需求。可能存在需要解决的断开情况,或者总体上拨号对等体太多。拥有数千个拨号对等体不能简化管理和故障排除。为每个特定CUCM服务器或呼叫代理设置拨号对等体会加剧拨号对等体过多的问题,因为管理员现在需要为每个数字字符串配置拨号对等体。可能有多个SIP提供商连接到网关,或有几个不同的客户使用同一CUBE。这使得隔离特定租户非常困难。
思科已收集了此反馈,并创建了一组可解决秋千问题等问题的项目。拨号对等体组、语音类租户、目标服务器组、e164模式映射和POTS中继组允许管理员解决上述所有问题以及许多未列出的问题。
拨号对等体组已添加到IOS 15.4(1)T中,IOS-XE 3.11S和POTS拨号对等体已添加为IOS 15.5(1)T和IOS-XE 3.14S中的选项。拨号对等体组允许管理员根据匹配的入站拨号对等体为出站路由指定确切的拨号对等体。一旦配置了拨号对等体组的入站拨号对等体匹配,即使目标模式不匹配,呼叫也会使用拨号对等体组中定义的拨号对等体。唯一的前提条件是出站拨号对等体必须为UP,因此必须配置出站匹配方法,但实际上这并不用于路由呼叫。
描述拨号对等体组的最佳方法是将其与路由表中静态路由的概念进行比较。这些是静态入站到出站路由决策,消除了网关的一些猜测,因为它们确切地告诉网关如何路由呼叫。
配置示例
在以下示例中,被叫号码为8675309。这根据传入的called-number语句匹配拨号对等体1234。此拨号对等体配置了拨号对等体组,该组规定,如果拨号对等体2失败,呼叫现在应从拨号对等体2、3和最后1路由出去。了解此情况后,网关现在尝试将呼叫路由到拨号对等体2,因为它已通过拨号对等体组明确告知,它应该这样做。
请注意,拨号对等体1、2和3上的目标模式不是被叫号码8675309。这很好,呼叫仍然可以路由而无问题。请记住,如“拨号对等体状态”部分所述,我们需要配置为出站匹配状态的某些内容/任何内容。在我们的情况下,目标模式只是将拨号对等体置于UP运行状态,并且该命令的数字字符串从不被评估。建议配置“目标模式AAAA”等模式,因为这是有效的目标模式。由于这在技术上是有效的拨号对等体,其他呼叫可以匹配它。因此,AAAA数字字符串意味着,除了特定场景,我们可能永远不会将其用于其他任何场景,包括拨号对等体组,因为AAAA的呼叫进入的可能性非常低。
!
dial-peer voice 1 voip
description Server 1
destination-pattern ^1234$
session target ipv4:1.1.1.1
!
dial-peer voice 2 voip
description Server 2
destination-pattern ^5678$
session target ipv4:2.2.2.2
!
dial-peer voice 3 voip
description Server 3
destination-pattern AAAA
session target ipv4:3.3.3.3
!
voice class dpg 1
description Dial-peer Group for specific called number 8675309
dial-peer 2 preference 1
dial-peer 3 preference 2
dial-peer 1 preference 3
!
dial-peer voice 1234 voip
description INCOMING dial-peer with DPG
incoming called-number ^8675309$
destination dpg 1
!
确认
Gateway# show voice class dpg 1 Voice class dpg: 1 AdminStatus: Up Description: Dial-peer Group for specific called number 1234 Total dial-peer entries: 3 Peer Tag Pref -------- ---- 2 1 3 2 1 3 -------------------------------------
此功能使管理员能够将许多可能的号码匹配(目标模式、传入的被叫号码等)合并到单个模式映射中,从而减少总拨号对等体的数量。IOS 15.2(4)M和IOS-XE 3.7S中增加了出站拨号对等体e164模式映射支持,而IOS 15.4(1)T和IOS-XE 3.1中增加了入站拨号对等体e164模式映射支持1S。
e164模式映射可以通过CLI配置或预配置,并另存为.cfg文件。然后,.cfg文件会添加到网关的闪存中,并在配置命令的其余部分时引用。.cfg文件可以使用5000个条目。
两种配置方法中的条目可以使用所有普通拨号对等体通配符进行进一步聚合!
CLI配置示例 — 呼叫号码
! voice class e164-pattern-map 1 description E164 Pattern Map for calling numbers e164 919574100. e164 919574300. e164 8675309 ! dial-peer voice 1 voip description INBOUND Dial-peer based on CALLING # incoming calling e164-pattern-map 1 !
dial-peer voice 11 voip
description OUTBOUND Dial-peer based on CALLING #
destination calling e164-pattern-map 1
!
CLI配置示例 — 被叫号码
! voice class e164-pattern-map 2 description E164 Pattern Map for called 800 numbers e164 91800T e164 91855T e164 91888T ! dial-peer voice 2 voip description INBOUND Dial-peer based on CALLED # incoming called e164-pattern-map 2 ! dial-peer voice 22 voip description OUTBOUND Dial-peer based on CALLED # destination e164-pattern-map 2 !
闪存配置示例
! voice class e164-pattern-map <tag> description FILEPATH for E164 Pattern Map url flash:<filepath>/e164-pattern-list.cfg ! dial-peer voice ### voip description E164 Pattern Map Dial-peer incoming calling e164-pattern-map <tag> !
voice class e164-pattern-map load
确认
Gateway# show voice class e164-pattern-map 1 e164-pattern-map 1 ----------------------------------------- Description: CUCM phones It has 3 entries It is not populated from a file. Map is valid. E164 pattern ------------------- 8675309 1... [2-5]...$
显着缺陷
服务器组使管理员能够在同一VOIP拨号对等体上配置多个目标(会话目标)。默认情况下,排序顺序是在服务器组条目中定义的首选项。循环寻线可以通过使用命令hunt-scheme round-robin来使用。IOS 15.4(1)T和IOS-XE 3.11S中添加了服务器组。在IOS-XE 17.4.1中,可配置huntstop错误代码已添加到语音类服务器组配置。也就是说,您可以配置一个错误代码,例如404 Not Found SIP错误通常会触发设备尝试服务器组中的下一个选项。在服务器组内配置huntstop 1 resp-code 404;狩猎就会停止。这些也可以配置为范围,如huntstop 1 resp-code 401到599。
注意:每个服务器组的条目最大数量为5。
配置示例 — 正常
! voice class server-group 1 hunt-scheme round-robin ipv4 14.50.244.2 port 5060 preference 1 ipv4 14.50.244.62
ipv6 2010:AB8:0:2::1 port 2323 preference 3
ipv6 2010:AB8:0:2::2 port 2222 ! dial-peer voice 1 voip session protocol sipv2
destination-pattern 8675309 session server-group 1 !
确认
Gateway# show voice class server-group 1 Voice class server-group: 1 AdminStatus: Up OperStatus: Up
Hunt-Scheme: round-robin Last returned server:
Description:
Total server entries: 4
Pref Type IP Address IP Port
---- ---- ---------- -------
1 ipv4 14.50.244.2 5060
0 ipv4 14.50.244.62
3 ipv6 2010:AB8:0:2::1 2323
0 ipv6 2010:AB8:0:2::2 2222
[..truncated..]
值得注意的是,服务器组不遵循正常的对话外选项保持连接机制。他们使用称为 option-keepalive配置文件。这允许网关监控在特定服务器组中定义的每个呼叫代理。
Option-keepalive服务器组示例
! voice class server-group 1 hunt-scheme round-robin ipv4 14.50.244.2 ipv4 14.50.244.62 ! dial-peer voice 1 voip session protocol sipv2 session server-group 1 voice-class sip options-keepalive profile 1 !
确认
Gateway# show voice class sip-options-keepalive 1 Voice class sip-options-keepalive: 1 AdminStat: Up Description: Transport: system Sip Profiles: 0 Interval(seconds) Up: 5 Down: 5 Retry: 5 Peer Tag Server Group OOD SessID OOD Stat IfIndex -------- ------------ ---------- -------- ------- 1 1 Active 87 Server Group: 1 OOD Stat: Active OOD SessID OOD Stat ---------- -------- 1 Active 2 Active OOD SessID: 1 OOD Stat: Active Target: ipv4:14.50.244.2 Transport: system Sip Profiles: 0 OOD SessID: 2 OOD Stat: Active Target: ipv4:14.50.244.62 Transport: system Sip Profiles: 0
中继组是具有类似信令功能的物理语音端口的集合。此功能可用于减少需要配置的POTS拨号对等体总数。中继组在12.1(3)T中引入到IOS中,并且存在于所有IOS-XE版本中。
完整文档: http://www.cisco.com/c/en/us/td/docs/ios/12_2/12_2x/12_2xu/feature/guide/ftpg_str.html#wp1034848
配置示例:
! trunk group PSTN description PSTN voice-ports !
trunk group FXO
description FXO voice-ports
! voice-port 0/2/0 trunk-group PSTN 1 ! voice-port 0/2/1 trunk-group PSTN 2 !
voice-port 0/2/2
trunk-group FXO 1
!
voice-port 0/2/3
trunk-group FXO 2
! dial-peer voice 1234 pots trunkgroup PSTN 1 trunkgroup FXO 2 !
IOS 15.6(2)T和IOS-XE 16.3.1引入了语音类租户,允许每个租户有各自的配置。租户可以是电话提供商、Cisco Unified Communication Manager(CUCM)或管理员希望具有特定全局设置的任何其他第三方呼叫代理。首先,管理员创建语音类租户并定义参数。然后,语音类租户将应用于特定拨号对等体或选择。此新配置使管理员对除拨号对等体和全局配置之外的呼叫拥有更高级别的控制。
从17.8.1a开始,语音类租户配置可以使用sip-listen命令(与适当的SIP控制绑定命令结合)配置,以定义该租户的非安全或安全端口。这意味着租户1可以侦听UDP 5060 + VRF红色上不安全的SIP,而租户2可侦听TCP TLS 5070 + VRF蓝色上的SIP。根据侦听端口+绑定+可选vrf入站拨号对等体匹配租户后,将过滤为已应用租户的对等体。
命令首选项的正常顺序(无租户)
租户的命令首选项顺序
多租户配置示例
我们有两个租户777和999。我们为它们配置了略有不同的配置,并将它们应用于我们的拨号对等体。这意味着使用不同拨号对等体的呼叫具有基于拨号对等体的配置以及租户特定配置。以下选项仅是语音类租户功能的片段。请参阅文档,了解租户上可以配置的所有内容。建议使用严格匹配机制(如语音类URI或使用特定号码字符串标记号码)来精简租户拨号对等体匹配,甚至配置VRF,使租户A不与租户B重叠,并意外地匹配它们不应该的拨号对等体。
!
voice class tenant 999 asymmetric payload full bind control source-interface GigabitEthernet0/0/0.228 bind media source-interface GigabitEthernet0/0/0.228 g729 annexb-all ! voice class tenant 777 sip-server ipv4:192.168.1.2 bind control source-interface Loopback0 bind media source-interface Loopback0 pass-thru content sdp ! dial-peer voice 999 voip destination-pattern 8675309 session protocol sipv2 incoming called-number 8675309 voice-class sip tenant 999 ! dial-peer voice 777 voip destination-pattern 8675309 session protocol sipv2 session target sip-server voice-class sip tenant 777 !
确认
目前没有单独的命令可查看语音类租户配置。以下命令应足以将运行配置过滤为仅包含租户信息。
show run | sec tenant
注意:CSCvf28730 ,其中show sip-ua register status不反映语音类租户上SIP中继注册的状态。
路由字符串与CUCM集群间查找服务(ILS)一起使用,并且可以配置为允许思科网关通过从运行ILS服务的CUCM 9.5+接收的SIP INVITE中包含的路由字符串路由VoIP呼叫。IOS 15.3(3)M和IOS-XE 3.10S中增加了此功能。大多数ILS连接是CUCM到CUCM的连接,管理员不用费心将CUBE用于集群间中继。但是,如果我们需要在中间的CUBE中执行该功能,则存在选项。CUCM需要在SIP中继上应用的SIP配置文件上启用Send ILS Learned Destination Route String设置,以便将x-cisco-dest-route-string报头发送到CUBE
配置示例:CUCM - SIP - CUBE - SIP - CUCM
!
voice service voip sip call-route dest-route-string ! voice class route-string rt1 pattern london.uk.eu ! voice class sip route-string rt2 pattern *.eu ! voice class sip-hdr-passthrulist hdr1 passthru-hdr x-cisco-dest-route-string ! dial-peer voice 1 voip description INBOUND dial-peer session protocol sipv2 voice-class sip pass-thru headers hdr1
incoming called-number .
! dial-peer voice 2 voip description OUTBOUND dial-peer destination route-string rt2 session protocol sipv2 session target ipv4:172.16.104.178 !
确认
show voice class route-string
本节中涉及的项目被视为传统技术。虽然配置这些命令的功能仍存在于思科网关中,但建议不要在现代配置中使用这些命令。本文档仅介绍它们,因为在使用旧配置或执行升级时可能遇到它们。
DNIS映射可以视为E164模式映射的前身。在12.2(2)XB中,DNIS映射被添加到IOS中,并且一直存在于IOS-XE中。
如果配置了DNIS映射,则值得将其转换为更强大的e164模式映射功能。
命令语法: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/vcr2/vcr2-cr-book/vcr-d2.html#wp3372710070
配置示例:
! voice dnis-map 34 dnis 8675309 ! dial-peer voice 88 voip dnis-map 34 !
IOS 12.2(11)T中添加了中继组标签,并且存在于所有IOS-XE版本中。中继组标签的用途类似于运营商ID,因为它可用于增强拨号对等体的匹配。这可用于在POTS中继组、VOIP和POTS拨号对等体以及语音源组内进行配置。使用中继组标签在现代思科网关配置中很少见。
命令语法: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/vcr5/vcr5-cr-book/vcr-t3.html#wp2051313870
配置示例:
! dial-peer voice 112 pots trunk-group-label source north3 trunk-group-label target east17 !
在ISDN Q.931集成中,能够根据主叫或被叫号码以及Q.931 SETUP消息中的特定ITU号码类型匹配拨号对等体。这可通过VOIP或POTS拨号对等体上的numbering-type命令进行配置。编号类型不能单独使用,必须与目标模式、应答地址或传入被叫号码一起使用。这表示入站/出站匹配语句的条件和号码类型必须匹配,才能使拨号对等体成功进行入站和出站呼叫路由。
编号匹配可以视为拨号对等体过滤机制,而不是匹配机制。这是因为,如果未应用管理员首选项,则应用了numbering type命令和不应用numbering type命令的拨号对等体被视为相同的默认首选项权重。这与运营商ID不同,当在其它匹配机制一侧应用到拨号对等体时,如果两个条件都为真,则运营商ID会向拨号对等体添加优先级。
编号类型匹配已添加到IOS 12.0(7)XR1中,并且存在于所有IOS-XE版本中。随着传统POTS ISDN线路在协作网络中部署的减少,编号类型的使用在现代部署中很少见。
命令语法: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/vcr3/vcr3-cr-book/vcr-n1.html#wp3304694174
配置示例:
仅当ISDN号码类型为National时,此拨号对等体才4085150000与4085159999匹配
! dial-peer voice 408 voip numbering-type national destination-pattern 408515.... session target ipv4:10.1.1.2 !
可能的号码类型:
缩写 | 此网络支持的完整数字的缩写表示 |
国际 | 拨打到另一国家/地区的用户的号码 |
国内 | 拨打的号码,用于联系同一国家/地区但本地网络外的用户 |
网络 | 特定于服务网络的管理或服务编号 |
预留 | 保留用于分机 |
用户 | 为到达同一本地网络中的用户而呼叫的号码 |
未知 | 网络未知号码类型 |
IOS 12.2(13)T中引入了数据拨号对等体,这种拨号对等体对于思科网关上的传入数据调制解调器呼叫非常有用。此拨号对等体仅用于入站方向,在现代部署中很少见。
命令语法: http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/vcr2/vcr2-cr-book/vcr-d1.html#wp1448833490
配置示例:
! dial-peer data 100 pots incoming called-number 100 !
此功能在15.1(2)T中添加,但在许多现代部署中未实施。IOS/CUBE的其他安全方法通常会部署。
从第4.2节开始,可在以下白皮书中查看CUBE应用安全概述。
此配置允许管理员限制拨号对等体仅允许入站连接(术语/终止)或出口连接(源/发起)。 这类似于显式配置入站拨号对等体以仅用于入站呼叫,而出站拨号对等体用于出站呼叫。任何拨号对等体的默认设置是允许入站和出站连接。现代部署中通常不部署此CLI。
Router(config)# dial-peer voice 1 voip
Router(config-dial-peer)# permission ?
both allow both orig/term on this dialpeer
none no orig/term allowed on this dialpeer
orig allow only orig on this dialpeer
term allow only term on this dialpeer
在协作部署的某一时刻,管理员可能需要处理数字或URI/SIP报头。思科网关有多种数字处理方法,允许管理员完全控制数字的处理方式和时间。但是,这对于某些人来说可能会令人望而却步,因为他们被各种不同的选项所淹没,或者管理员不知道某个选项存在。
POTS拨号对等体具有VOIP拨号对等体所不具备的一些独特的数字操作技术。
第一种是在目标模式中删除显式定义的左对齐数字。在POTS拨号对等体上使用no digit-strip命令可禁用此功能。
示例:
在本示例中,我们将9011T定义为destination-pattern的字符串。
在此情况下,我们将收到90113227045555的呼叫。这与我们用于出站呼叫路由的拨号对等体匹配,并且在呼叫从语音端口路由之前,显式定义的9011数字将被删除。
! dial-peer voice 1 pots destination-pattern 9011T port 0/0/0:23 !
以下示例显示没有就位数字条的配置。
如果同一号码被称为9011,则发送
! dial-peer voice 1 pots destination-pattern 9011T port 0/0/0:23
no digit-strip !
第二种是指定要在POTS拨号对等体上转发多少位数的能力。
以下示例为例,我们收到来自CUCM的918005532447呼叫。在这种情况下,我们要删除9,但发送以1开头的其余数字。
如果在POTS拨号对等体上配置forward-digits命令,我们可以精确指定我们发送的数字数。
! dial-peer voice 1 pots destination-pattern 918005532447 forward-digits 11 port 0/2/0 !
最后,POTS拨号对等体可以在从语音端口路由出去之前,使用prefix命令向呼叫添加数字。以下示例在将呼叫从语音端口发出之前,将明确定义的91和前缀007删除为号码。
! dial-peer voice 1 pots destination-pattern 91T prefix 007 port 0/1/0:15 !
语音转换规则是用于转换数字的正则表达式(regex)。在12.0(7)XR1中,转换规则和配置文件被添加到IOS。转换规则被应用到语音转换配置文件,然后应用到拨号对等体或语音端口。转换规则包含匹配输入和修改输出。与号码上的匹配输入一起,还有匹配和修改ISDN计划和类型的输入。匹配数字字符串、计划和类型的组合被视为AND匹配。这意味着要进行转换,定义的所有匹配输入必须为真。
转换规则能够在ISDN、SIP和H323信令协议中更改被叫、主叫、重定向被叫、重定向目标和回叫号码。翻译规则基于自上而下的搜索进行匹配,因此规则的顺序至关重要。如果在较高规则中找到匹配项,则网关立即停止搜索并处理转换。转换规则不能更改非数字SIP报头,如“testuser@10.10.10.10”。 要进行此操作,请使用SIP配置文件。
过渡规则可用于阻止思科网关上的呼叫。
转换配置文件选择首选项
除拨号对等体正则表达式和通配符转换规则外,还有其自己的正则表达式字符。
字符 | 定义 |
* | 在translation-rules中使用时,此正则表达式对于前一个字符的0个或更多个。 要匹配文字*,请使用转义字符:\* |
\ | 通常用于转换规则\(\)中的转义集 |
& | “和号”用于为修改集在初始匹配集中引入任何匹配项 |
() | 括在括号中的项目被视为一个集。 |
^ | 定义字符串的显式开头。 与拨号对等体转换规则不同,不定义字符串的开头。 这意味着定义不带^的字符串可能匹配输入字符串中的任意位置,这可能导致数字中间出现不需要的转换。 |
修改集
具有两组的转换规则示例
在本例中,我们检查编号000111000222。
我们想从数字中删除0,并实现最终数字111222。
为此,我们配置set 1和2,以在丢弃0时分别获取111和222。
! voice translation-rule 333 rule 1 /000\(111\)000\(222\)/ /\1\2/ ! voice translation-profile SET-EXAMPLE translate called 333 ! Gateway# test voice translation-rule 333 000111000222 Matched with rule 1 Original number: 000111000222 Translated number: 111222 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
从被叫号码中删除9个外拨模式的示例
! voice translation-rule 9 rule 1 /^9\(.*\)/ /\1/ ! voice translation-profile STRIP-9 translate called 9 ! dial-peer voice 9 voip translation-profile outgoing STRIP-9 ! voice-port 0/0/0 translation-profile outgoing STRIP-9 ! Gateway# test voice translation-rule 9 918675309 Matched with rule 1 Original number: 918675309 Translated number: 18675309 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
将被叫号码截断为4位
! voice translation-rule 4 rule 1 /.*\(....\)/ /\1/ ! voice translation-profile STRIP-TO-4 translate called 4 ! Gateway# test voice translation-rule 4 8675309 Matched with rule 1 Original number: 8675309 Translated number: 5309 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
从被叫号码中删除加号+
! voice translation-rule 999 rule 1 /\+\(.*\)/ /\1/ ! voice translation-profile STRIP-PLUS translate called 999 ! Gateway# test voice translation-rule 999 +8675309 Matched with rule 1 Original number: +8675309 Translated number: 8675309 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
转换规则也可以直接应用于拨号对等体,而无需先应用于转换配置文件。
! voice translation-rule 1 rule 1 /1234/ /8678309/ ! voice translation-rule 2 rule 2 /^4...$/ /1408515\0/ ! dial-peer voice 1 voip translate-outgoing called 1 ! dial-peer voice 2 voip translate-outgoing calling 2 !
中继组上的转换配置文件
! trunk group <name> translation-profile incoming <profile-name> translation-profile outgoing <profile-name> !
调试语音转换规则和配置文件
debug voip ccapi inout debug voice translation debug dialpeer test voice translation-rule <number> <string> type <type> plan <plan>
语音类e164-translation功能是一种较新的IOS-XE功能,它允许管理员创建匹配语句列表和修改语句,以便通过配置文件从闪存或网络目录加载。这与本文档中讨论的e164模式映射功能的概念类似。这允许管理员在配置文件内配置最多100个转换,并在单个转换配置文件中应用这些转换。有关详细信息,请参阅Cisco IOS语音命令参考
请按照.cfg文件的以下语法操作:
pattern1_to_be_matched<tab>replaced_pattern<space><enter> pattern1_to_be_matched<tab>replaced_pattern<space><enter>
注意:尾部空间非常重要,如果没有额外的格式设置步骤,导入将失败。
Sample.cfg
+111111 8897 +222222 8312 928747 +123456789 737362 +987654321
然后,此文件将引用如下:
voice class e164-translation 164 url ftp://username:password@10.10.10.10/sample.cfg
现在,您正常应用到转换配置文件,然后从此处应用到使用正常转换配置文件语法的拨号对等体。
voice translation-profile e164 translate calling voice-class e164-translation 164 translate called voice-class e164-translation 164
命令show voice class e164-translation e164-translation-number可用于查看转换配置文件的内容。
感谢Swati Sharma详细介绍此文档的流程
ISDN MAPS是用于修改数字的较早技术。IOS 12.0(6)T中添加了此功能,大多数新配置不使用此功能,因为它们不像语音转换规则和配置文件那样强大。ISDN映射在串行接口下定义。
配置示例:
Serial0/0/0:23 isdn map address ^911 plan isdn type unknown isdn map address ^1.......... plan isdn type national isdn map address ^2......... plan isdn type national isdn map address ^3......... plan isdn type national isdn map address ^4......... plan isdn type national isdn map address ^5......... plan isdn type national isdn map address ^6......... plan isdn type national isdn map address ^7......... plan isdn type national isdn map address ^8......... plan isdn type national isdn map address ^9......... plan isdn type national
与ISDN映射号扩展一样,ISDN映射号扩展是IOS 11.3(1)T中添加的较旧技术,在新网络中使用较少。此功能是在存在语音转换规则和配置文件之前添加的。号码扩展是应用于思科网关上所有拨号对等体的数字的全局更改。在拨号对等体匹配后,在呼叫发送到下一个呼叫代理之前,修改将应用于被叫号码。
配置示例:
num-exp 4... 18005554...
num-exp 1234 8675309
SIP配置文件是稳健的正则表达式(regex)匹配语句,允许管理员更改SIP消息的任何方面,包括SDP和SIP报头。这些功能可以全局启用、按拨号对等体或按租户启用。从IOS 15.4(2)T和IOS-XE 3.12S开始,SIP配置文件可用于入站修改。由于SIP配置文件非常强大,因此本文档仅介绍几个特定示例。SIP配置文件还增加了在IOS 15.5(2)T和IOS-XE 3.13S中修改或添加自定义SIP报头的功能。
有关入站和出站SIP配置文件的关键点
有关sip-profile配置的其他说明:
SIP配置文件测试工具:https://cway.cisco.com/tools/SipProfileTest/
入站/出站SIP配置文件示例语法
! voice class sip-profiles <number> request <message-type> sip-header <header> modify "match-pattern" "replace-pattern" request <message-type> sip-header <header> add "add-pattern" request <message-type> sip-header <header> remove
request <message-type> sdp-header <header> modify "match-pattern" "replace-pattern" request <message-type> sdp-header <header> add "add-pattern" request <message-type> sdp-header <header> remove
response <number> sip-header <header> modify "match-pattern" "replace-pattern" response <number> sip-header <header> add "add-pattern" response <number> sip-header <header> remove
response <number> sdp-header <header> modify "match-pattern" "replace-pattern" response <number> sdp-header <header> add "add-pattern" response <number> sdp-header <header> remove !
入站/出站SIP配置文件示例,带数字
voice class sip-profiles 200
rule 1 response ANY sip-header Remote-Party-ID modify "match-pattern" "replace-pattern" rule 2 response ANY sdp-header Audio-Attribute modify "match-pattern" "replace-pattern"
出站SIP配置文件应用方法
! Global Application voice service voip sip sip-profiles <number> !
! Tenant Application
voice class tenant <tag>
sip-profiles <tag>
!
! Dial-peer Application
dial-peer voice <tag> voip
voice-class sip profiles <number>
!
入站SIP配置文件应用方法
请注意:无论使用全局应用、租户还是拨号对等体应用,都需要在语音服务voip sip下启用“sip-profile inbound”。
! Global Application voice service voip sip sip-profiles inbound sip-profiles <number> inbound !
! Tenant Application
voice service voip
sip
sip-profiles inbound
! voice class tenant <tag>
sip-profiles <tag> inbound
!
! Dial-Peer Application
voice service voip
sip
sip-profiles inbound
! dial-peer voice <tag> voip voice-class sip profiles <number> inbound !
修改OPTIONS保持连接消息的SIP配置文件示例
!
voice class sip-options-keepalive 200
transport tcp tls
sip-profiles 299
!
修改主机、域或URI两部分的SIP配置文件示例
! Host ! voice class sip-profiles 1 request ANY sip-header Contact modify "sip:(.*)@" "sip:8675309@" ! ! Domain ! voice class sip-profiles 2 request ANY sip-header Contact modify "10.67.138.241:5060" "cisco.com" ! ! Note: Port is optional ! ! Modify Both User and Host ! voice class sip-profiles 3 request ANY sip-header Contact modify "sip:(.*)>" "sip:8675309@cisco.com>" !
添加、修改或删除转移报头的示例SIP配置文件
! Add ! voice class sip-profiles 777 request INVITE sip-header Diversion add "Diversion: <sip:1234@cisco.com>" ! ! ! Modify ! voice class sip-profiles 888 request INVITE sip-header Diversion modify "sip:(.*)>" "sip:1234@cisco.com>" ! ! ! Remove ! voice class sip-profiles 999 request INVITE sip-header Diversion remove !
修改SIP报头的呼叫方ID名称部分的示例SIP配置文件
! voice class sip-profiles 123 request INVITE sip-header From modify "\".*\"" "\"TEST CLID*\"" !
SIP配置文件示例,将正在进行的183会话更改为180振铃。
! voice class sip-profiles 789 response 183 sip-header SIP-StatusLine modify "SIP/2.0 183 Session in Progress" "SIP/2.0 180 Ringing" !
用于与提供商进行单向或无向音频互操作的SIP配置文件示例
!
voice class sip-profiles 200 request ANY sdp-header Audio-Attribute modify "a=inactive" "a=sendrecv" request ANY sdp-header Audio-Connection-Info modify "0.0.0.0" "10.10.10.10"
!
! where 10.10.10.10 is CUBE's provider facing IP address
SIP配置文件示例,用于删除UPDATE方法以解决互操作性问题。
!
voice class sip-profiles 200
request ANY sip-header Allow-Header modify ", UPDATE" ""
!
显示SET使用在SIP配置文件中的SIP配置文件示例。这与语音转换规则部分中描述的集的概念相同。
!
voice class sip-profiles 1 request ANY sip-header Contact modify "sip:(.*)@" "sip:\1@"
!
配置IF逻辑和换行符会与SIP配置文件断开。
SIP配置文件支持换行符,但只有一个非常具体的使用案例。由于SIP配置文件没有任何IF,因此,Else逻辑现在可以根据来自另一个报头的输入对一个报头执行修改。即,如果FROM报头包含1234@cisco.com,则管理员只想修改转接报头。利用换行符,我们可以在SIP配置文件中“欺骗”IF语句。请参阅以下配置示例:我们在From报头中的任何域匹配1234。然后,我们将第一组换行并添加新换行符“\x0D\x0AD”。 最后,我们添加所需的信头。请参阅,此方法仅允许我们添加报头。无法修改另一个报头。因此,这仅部分满足管理员想要达到的上述要求。
!
voice class sip-profiles 1 request INVITE sip-header From modify “(.*sip:1234@.*)” “\1\x0D\x0ADiversion: <sip:5678@example.com>” !
带OR逻辑的SIP配置文件示例
!
voice class sip-profiles 123 request ANY sdp-header Audio-Attribute modify "(a=sendonly|a=recvonly|a=inactive)" "a=sendrecv" response ANY sdp-header Audio-Attribute modify "(a=sendonly|a=recvonly|a=inactive)" "a=sendrecv" !
通过SIP配置文件进行第7层SIP检测的示例
### Usage 10.21.15.10 replace with private IP of CUBE a.b.c.d replace with public IP ------------------------------------------------------ ### Inbound from ITSP Layer 7 Fixup !
voice class sip-profiles 888 request INVITE sip-header SIP-Req-URI modify "@.*;" "@10.21.15.100;" ! voice service voip sip sip-profiles inbound ! ### Outbound Layer 7 Fixup ! voice class sip-profiles 777 request ANY sip-header Contact modify "<sip:(.*)@10.21.15.100:5060>" "<sip:\1@a.b.c.d:5060>" response ANY sip-header Contact modify "<sip:(.*)@10.21.15.100:5060>" "<sip:\1@a.b.c.d:5060>" request ANY sip-header Via modify "SIP(.*) 10.21.15.100(.*)" "SIP\1 a.b.c.d\2" request ANY sdp-header Session-Owner modify "(.*IP4 ).*" "\1a.b.c.d" request ANY sdp-header Connection-Info modify "IN IP4 10.21.15.100" "IN IP4 a.b.c.d" request ANY sdp-header Audio-Connection-Info modify "IN IP4 10.21.15.100" "IN IP4 a.b.c.d" response ANY sdp-header Session-Owner modify "(.*IP4 ).*" "\1a.b.c.d" response ANY sdp-header Audio-Connection-Info modify "IN IP4 10.21.15.100" "IN IP4 a.b.c.d" response ANY sdp-header Connection-Info modify "IN IP4 10.21.15.100" "IN IP4 a.b.c.d" request ANY sip-header Remote-Party-ID modify "<sip:(.*)@10.21.15.100>" "<sip:\1@a.b.c.d>" response ANY sip-header Remote-Party-ID modify "<sip:(.*)@10.21.15.100>" "<sip:\1@a.b.c.d>" !
### Apply to dial-peers for the side of the CUBE facing the ITSP
!
dial-peer voice 1 voip
voice-class sip profiles 777
voice-class sip profile 888 inbound
!
dial-peer voice 2 voip
voice-class sip profiles 777
voice-class sip profile 888 inbound
!
SIP复制列表是SIP配置文件的扩展,它允许网关从呼叫的内段复制报头,然后将PASTE复制到外段出口SIP消息中的另一个位置。IOS 15.1(3)T和IOS-XE 3.6S中增加了SIP副本列表支持。这是根据呼叫段中的其他信头创建动态信头的强大方法。
最常见的使用案例是动态地将FROM报头复制到不同的报头,如转移或p-asserted-id,以便用户部分的值是来自用户。这主要用于身份验证和主叫方ID目的。
SIP副本列表示例
! ! Create Copylist to copy the FROM header on the inbound message specified later. ! voice class sip-copylist <number> sip-header From ! ! Apply this to the inbound dial-peer of the call. ! dial-peer voice <tag> voip voice-class sip copy-list <number> ! ! Create SIP Profile to take From (peer-header) stored as variable "u01" and apply to a header of choice. ! This example modifies the user portion of the Contact by copying the user portion of the From header to the user portion of the Contact header. ! voice class sip-profiles <number> request INVITE peer-header sip From copy "<sip:(.*)@" u01 request INVITE sip-header Contact modify "<sip:(.*)>" "<sip:\u01@14.50.244.2>" ! ! Apply the SIP profile to an outbound dial-peer ! dial-peer voice <tag> voip voice-class sip profiles <number>
!
调试SIP配置文件和副本列表
debug voip ccapi inout debug ccsip mess debug ccsip info debug ccsip feature sip-profile
调试示例SIP复制列表的输出
### Ingress from CUCM Received: INVITE sip:1001@14.50.228.61:5060 SIP/2.0 Via: SIP/2.0/TCP 14.50.244.3:5060;branch=z9hG4bKaad21bc3ae7e From: "5001" <sip:5001@14.50.244.3>;tag=100442~cdffff43-5020-4e79-a10b-99d406971010-36470319 Contact: <sip:5001@14.50.244.3:5060;transport=tcp> ### Copylist Details 00440: Mar 8 18:59:49.796: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: sed_match succeeded 000441: Mar 8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variables AVL tree created 000442: Mar 8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_prefix_slash_in_copy_var_val: ret_dst: 5001 000443: Mar 8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variable: u1 val: 5001 000444: Mar 8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : Contact: <sip:5001@14.50.228.61:5060> 000445: Mar 8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Node found: COPY variable: u1 val: 5001 000446: Mar 8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: substituted_replace_pattern : : @165.117.64.94> 000448: Mar 8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Final substituted_replace_pattern : <sip:5001@165.117.64.94> 000449: Mar 8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_app_modify_header: Passing substituted replace pattern 000450: Mar 8 18:59:49.798: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header after modification : Contact: <sip:5001@165.117.64.94> 000451: Mar 8 18:59:49.798: //187/D6138E000000/SIP/Msg/ccsipDisplayMsg: ### Egress from CUBE Sent: INVITE sip:1001@14.50.228.63:5060 SIP/2.0 Via: SIP/2.0/UDP 14.50.228.61:5060;branch=z9hG4bK3C7CD Remote-Party-ID: "5001" <sip:5001@14.50.228.61>;party=calling;screen=yes;privacy=off From: "5001" <sip:5001@14.50.228.61>;tag=34C458-D6 Contact: <sip:5001@165.117.64.94>
所有信令协议都允许管理员将信令绑定到特定接口。默认情况下,没有静态定义绑定的网关会从数据包经过的物理接口发出呼叫信令。在拨号对等体上绑定时,数据包会从指定接口发送源报头、消息和数据包,但实际数据包仍通过物理接口路由。拨号对等体绑定始终取代语音类租户和与会话初始协议(SIP)的全局语音服务VoIP绑定。
许多情况下,管理员将信令绑定到环回。这是一个逻辑接口,意味着没有数据包通过此接口。要执行数据包捕获,必须在物理接口上执行捕获。命令show ip cef <remote-ip>显示数据包用于路由到目的/远程IP的物理接口,即使配置绑定到虚拟接口。
媒体和信令绑定不一定需要是相同的IP。如果管理员需要绑定到特定接口,以便向/从CUCM发出信令,但电话和网关之间的音频/媒体可能需要绑定到另一个接口。
配置示例
此示例显示绑定到loopback 1的拨号对等体,它收到来自CUCM的呼叫。
即使媒体和信令(控制)绑定到loopback 1, show ip cef 命令显示发送到CUCM的所有数据包都离开物理接口GigabitEthernet0/0/1。
! dial-peer voice 2 voip description "Incoming call from CUCM" session protocol sipv2 incoming called-number . voice-class sip bind control source-interface Loopback1 voice-class sip bind media source-interface Loopback1 !
第7层应用绑定的操作顺序
SIP绑定命令
! Per Dial-peer
!
dial-peer voice 1 voip voice-class sip bind control source-interface <interface> voice-class sip bind media source-interface <interface> !
! Global Binding
! voice service voip sip bind control source-interface <interface> bind media source-interface <interface> !
MGCP绑定命令
!
mgcp bind control source-interface <interface> mgcp bind media source-interface <interface>
!
SCCP绑定命令
!
sccp local <interface> ! sccp ccm group <number> bind interface <interface> !
H323绑定命令
! inteface <interface> ! ! Media Bind Command: h323-gateway voip interface ! ! Signaling Bind Command: h323-gateway voip bind srcaddr <a.b.c.d> !
使用VOIP的DNS仅适用于任何其他DNS解决方案。 常见配置是使用会话目标dns:FQDN.com。
即使在网关上全局未配置IP域名查找,思科网关也会执行DNS解析。 这意味着,即使我们禁用DNS,VOIP拨号对等体仍会解析DNS条目。但是最近,在IOS-XE 3.16S中,IOS-XE平台中的整体DNS功能发生了一些变化。
在此更改配置了会话目标dns:FQDN.com的拨号对等体后,现在应遵守DNS已禁用且无ip域查找的事实。
我建议始终确保在使用DNS时配置命令“ip domain lookup”以避免此问题。
对于出站SIP连接,我们按以下顺序执行DNS解析操作。
有关如何创建SRV或如何跳过SRV并在会话目标上执行A记录查询的信息,请参阅完整文档:https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/voi-cube-sip-dns-srv-rfc2782.html
对于IOS网关需要解析报头以响应消息的入站SIP连接,网关将使用以下操作顺序进行DNS解析
IOS DNS配置示例
ip host _sip._udp.cucmgroup.lab.local srv 1 50 5060 cucm1.lab.local ip host _sip._udp.cucmgroup.lab.local srv 1 50 5060 cucm2.lab.local ip host _sip._udp.cucmgroup.lab.local srv 1 50 5060 cucm3.lab.local ip host cucm1.lab.local 10.0.0.1 ip host cucm2.lab.local 10.0.0.2 ip host cucm3.lab.local 10.0.0.3 ip domain name lab.local ip name-server 8.8.8.8
注意: 15.6(1)S / 3.17.00.S及更高版本支持IOS-XE上的DNS SRV
DNS调试和验证命令
show host clear host all * ! debug ip dns view debug ip domain debug ccsip info
debug ccsip error
DNS测试3.15S及更低版本
### Domain Name Verification Gateway# sh run | s lookup no ip domain lookup ### Checking the host table for no entry Gateway# show host Name lookup view: Global Default domain is cisco.com Name/address lookup uses static mappings Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate temp - temporary, perm - permanent NA - Not Applicable None - Not defined Host Port Flags Age Type Address(es) ### Verification of no PING on a FQDN Gateway# ping cucm.cisco.com Translating "cucm.cisco.com" % Unrecognized host or address, or protocol not running. ### Made a test call here ### Checking logs to see if it worked Gateway# sh log | s INVITE sip: INVITE sip:9001@14.50.228.70:5060 SIP/2.0 INVITE sip:5001@cucm.cisco.com:5060 SIP/2.0 ### Host Table now has an entry Gateway# sh host Name lookup view: Global Default domain is cisco.com Name/address lookup uses static mappings Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate temp - temporary, perm - permanent NA - Not Applicable None - Not defined Host Port Flags Age Type Address(es) cucm.cisco.com None (temp, OK) 0 IP 14.50.244.2 ### CCSIP All output showing a proper DNS Query for the FQDN on the dial-peer. 001338: Mar 9 15:29:07.437: //-1/xxxxxxxxxxxx/SIP/Info/info/1024/httpish_msg_free: Freed msg=0x7FE9873AE560 001339: Mar 9 15:29:07.437: //-1/xxxxxxxxxxxx/SIP/Info/notify/8192/sip_dns_type_srv_query: TYPE SRV query for _sip._udp.cucm.cisco.com and type:1 001340: Mar 9 15:29:07.438: //-1/xxxxxxxxxxxx/SIP/Info/info/8192/sip_dns_type_a_aaaa_query: DNS query for cucm.cisco.com and type:1 001341: Mar 9 15:29:07.441: //-1/xxxxxxxxxxxx/SIP/Info/notify/8192/sip_dns_type_a_query: TYPE A query successful for cucm.cisco.com 001342: Mar 9 15:29:07.441: //-1/xxxxxxxxxxxx/SIP/Info/info/8192/sip_dns_type_a_query: ttl for A records = 3600 seconds 001343: Mar 9 15:29:07.441: //-1/xxxxxxxxxxxx/SIP/Info/info/8192/sip_dns_type_a_aaaa_query: IP Address of cucm.cisco.com is: 001344: Mar 9 15:29:07.441: //-1/xxxxxxxxxxxx/SIP/Info/info/8192/sip_dns_type_a_aaaa_query: 14.50.244.2
DNS测试3.16S及更高版本
### Checking the command is present Gateway# sh run | s lookup no ip domain lookup ### Verifying the gateway cannot ping a FQDN Gateway# ping cucm.cisco.com % Unrecognized host or address, or protocol not running. ### Checking the Host Table for entries Gateway# sh host Default domain is cisco.com Name servers are 14.50.244.52 NAME TTL CLASS TYPE DATA/ADDRESS ----------------------------------------- ### Made a test call here ### CCSIP All Outbound showing the failed call 000974: *Mar 9 15:53:01.222: //-1/xxxxxxxxxxxx/SIP/Info/info/1024/httpish_msg_free: Freed msg=0x7FF31DAAA848 000975: *Mar 9 15:53:01.222: //-1/xxxxxxxxxxxx/SIP/Info/notify/8192/sip_dns_type_srv_query: TYPE SRV query for _sip._udp.cucm.cisco.com and type:1 000976: *Mar 9 15:53:01.224: //-1/xxxxxxxxxxxx/SIP/Info/info/8192/sip_dns_type_a_aaaa_query: DNS query for cucm.cisco.com and type:1 000977: *Mar 9 15:53:01.225: //-1/xxxxxxxxxxxx/SIP/Error/sip_dns_type_a_query: TYPE A query failed for cucm.cisco.com 000978: *Mar 9 15:53:01.225: //-1/xxxxxxxxxxxx/SIP/Error/_send_dns_fail: DNS Query for cucm.cisco.com failed 000984: *Mar 9 20:53:01.225: %VOICE_IEC-3-GW: SIP: Internal Error (DNS query fail): IEC=1.1.128.7.47.0 on callID 6 GUID=37B668DF044111E7A950D832C82B325C
默认情况下,VOIP和POTS拨号对等体允许无限连接(呼叫)和带宽(仅VOIP拨号对等体)。 对于对可利用的呼叫数或带宽有限制的中继,使用max-conn或max-bandwidth命令可能很有用。max-conn已添加到IOS 11.3(1)T中,并且存在于所有IOS-XE版本中,而max-bandwidth已添加到15.2(2)T和IOS-XE 3.7S中
配置示例:
下面我们告诉网关使用“max-conn 30”将拨号对等体1限制为30个呼叫。
拨号对等体2正在限制该拨号对等体的带宽,以便我们不超出已分配的限制。
! dial-peer voice 1 voip description ITSP SIP Trunk - 30 Max Calls! session protocol sipv2 sess target ipv4:10.10.10.10 destination-pattern 8675309$ max-conn 30 !
dial-peer voice 2 voip
description SIP Trunk with Bandwidth Restrictions!
session protocol sipv2
sess target ipv4:10.10.10.10
destination-pattern 123456789$
max-bandwidth 400
!
超过max-conn阈值时的示例错误
000308: Oct 5 19:01:02.603: %CALL_CONTROL-6-MAX_CONNECTIONS: Maximum number of connections reached for dial-peer 1 000309: Oct 5 19:01:02.603: %VOICE_IEC-3-GW: CCAPI: Internal Error (Dial-peer connections exceeded): IEC=1.1.181.1.21.0 on callID 0 000310: Oct 5 19:01:02.604: %SIP-3-MAXCONNCAC: Call rejected due to CAC based on maximum number of connections on dial-peer 1, sent response 503 000311: Oct 5 19:01:02.604: //17084/86B070800000/SIP/Msg/ccsipDisplayMsg: Sent: SIP/2.0 503 Service Unavailable Via: SIP/2.0/TCP 14.50.244.62:5060;branch=z9hG4bKb78c35aa21b0 From: <sip:9001@14.50.244.62>;tag=72531~2e8ca155-3f0b-4f07-a1b2-b14ef77ceb7f-26250846 To: <sip:1234@14.50.245.70>;tag=3E19564D-1684 Date: Thu, 05 Oct 2017 19:01:02 GMT Call-ID: 86b07080-9d61816e-b762-3ef4320e@14.50.244.62 CSeq: 101 INVITE Allow-Events: telephone-event Warning: 399 14.50.245.70 "Maximum Number of Connections reached for dial-peer 1" Server: Cisco-SIPGateway/IOS-15.4.3.S4 Content-Length: 0
在POTS拨号对等体上启用直接拨入后,入站消息应包含路由呼叫所需的所有数字。思科网关不应执行后续的数字收集。当路由器或网关搜索出站拨号对等体时,设备使用整个传入拨号字符串。默认情况下,这种匹配是变长的。这种匹配不会按数字逐个进行,因为根据 DID 定义,已经收到了所有数字。这是POTS拨号对等体的默认配置。
完整文档: http://www.cisco.com/c/en/us/support/docs/voice/digital-ccs/14072-direct-inward-dial.html
配置示例:
! dial-peer voice 1 pots incoming called-number 8675309 voice-port 0/0/0 direct-inward-dial !
如果传入POTS拨号对等体配置为没有直接向内拨号,则路由器或网关进入数字收集模式(数字在带内收集)。 出站拨号对等体匹配是逐位完成的。路由器或网关在设备收到每个数字后检查拨号对等体匹配,然后在完全匹配时路由呼叫。
配置示例:
!
dial-peer voice 1 pots
incoming called-number 8675309
voice-port 0/0/0
no direct-inward-dial
!
每个协议处理阻塞的位不同。大多数协议都可以使用基于数字字符串的阻止的转换规则拒绝模式。如果管理员仍要应用入站转换配置文件进行正常的数字操作,但不阻止其中的任何数字,则可以使用call-block translation-profile命令实施呼叫阻止。
! voice translation-rule 164 rule 1 reject /8675309/ ! voice translation-profile CALLBLOCK translate calling 164 !
dial-peer voice 1 pots
desc INCOMING VOICE-PORT with BLOCK
translation-profile incoming ANOTHER
call-block translation-profile incoming CALLBLOCK
call-block disconnect-cause incoming invalid-number
incoming called-number .
port 0/0/0:23
! Gateway#test voice translation-rule 164 8675309 8675309 blocked on rule 1
在E1 R2中,管理员能够阻止收集呼叫。这主要在巴西部署中出现和使用,但可以通过任何cas-custom组进行配置。
两个选项是:
II-8类块消息(debug vpm signal)
009228: Nov 21 12:02:00.955 GMT: //-1/BF12BE36BAC8/VTSP:(0/0/0:0):-1:1:2/vtsp_report_cas_digit: Begin Digit=8, Mode=CC_TONE_R2_MF_BACKWARD_MODE 009229: Nov 21 12:02:00.955 GMT: htsp_digit_ready_up(0/0/0:0(2)): Rx digit='8' 009230: Nov 21 12:02:00.955 GMT: R2 Incoming Voice(0/0): DSX (E1 0/0/0:1): STATE: R2_IN_CATEGORY R2 Got Event 8 009231: Nov 21 12:02:00.955 GMT: Enter r2_comp_category 009232: Nov 21 12:02:00.955 GMT: R2 Event : 8 009233: Nov 21 12:02:00.955 GMT: #######R2_II8 TRUE######## 009234: Nov 21 12:02:00.955 GMT: ####### collect_call_enable = 0 009235: Nov 21 12:02:00.955 GMT: ############sending B7 ########## 009236: Nov 21 12:02:00.955 GMT: r2_reg_generate_digits(0/0/0:0(2)): Tx digit '7' 009237: Nov 21 12:02:01.055 GMT: //-1/BF12BE36BAC8/VTSP:(0/0/0:0):-1:1:2/vtsp_report_cas_digit: End Digit=8, Mode=CC_TONE_R2_MF_BACKWARD_MODE 009238: Nov 21 12:02:01.055 GMT: htsp_digit_ready(0/0/0:0(2)): Rx digit='#' 009239: Nov 21 12:02:01.055 GMT: R2 Incoming Voice(0/0): DSX (E1 0/0/0:1): STATE: R2_IN_CATEGORY R2 Got Event R2_TONE_OFF 009240: Nov 21 12:02:01.055 GMT: Enter r2_comp_category 009241: Nov 21 12:02:01.055 GMT: r2_reg_generate_digits(0/0/0:0(2)): Tx digit '#' 009242: Nov 21 12:02:01.359 GMT: htsp_dsp_message: SEND_SIG_STATUS: state=0x8 timestamp=22365 systime=225097425 009243: Nov 21 12:02:01.359 GMT: htsp_process_event: [0/0/0:0(2), R2_Q421_IC_WAIT_ANSWER, E_DSP_SIG_1000] 009244: Nov 21 12:02:01.359 GMT: r2_q421_ic_clr_fwd_idle(0/0/0:0(2)) Rx CLEAR FWD 009245: Nov 21 12:02:01.359 GMT: r2_reg_channel_disconnected(0/0/0:0(2)) 009246: Nov 21 12:02:01.359 GMT: R2 Incoming Voice(0/0): DSX (E1 0/0/0:1): STATE: R2_IN_CATEGORY R2 Got Event R2_STOP 009247: Nov 21 12:02:01.359 GMT: Enter r2_comp_category 009248: Nov 21 12:02:01.359 GMT: htsp_timer - 2000 msec 009249: Nov 21 12:02:01.359 GMT: htsp_process_event: [0/0/0:0(2), R2_Q421_IC_CLR_FWD, E_HTSP_RELEASE_REQ] 009250: Nov 21 12:02:01.359 GMT: r2_q421_null_release(0/0/0:0(2)) E_HTSP_RELEASE_REQ 009251: Nov 21 12:02:01.359 GMT: r2_reg_process_event: [0/0/0:0(2), R2_REG_COLLECTING, E_R2_REG_DISCONNECT(91)] 009252: Nov 21 12:02:01.359 GMT: r2_reg_disconnect_collect(0/0/0:0(2)) 009253: Nov 21 12:02:01.359 GMT: r2_reg_timer_stop(0/0/0:0(2)) 009254: Nov 21 12:02:01.711 GMT: htsp_process_event: [0/0/0:0(1), R2_Q421_IC_CLR_FWD, E_HTSP_EVENT_TIMER] 009255: Nov 21 12:02:01.711 GMT: htsp_timer_stop 009256: Nov 21 12:02:01.711 GMT: r2_q421_clr_fwd_idle(0/0/0:0(1)) Tx IDLEvnm_dsp_set_sig_state:[R2 Q.421 0/0/0:0(1)] set signal state = 0x8 009257: Nov 21 12:02:01.711 GMT: r2_reg_channel_disconnected(0/0/0:0(1)) 009258: Nov 21 12:02:01.711 GMT: //682206/0C63B263B9C9/VTSP:(0/0/0:0):0:1:1/vtsp_do_call_history: Coder Rate=5 009259: Nov 21 12:02:01.711 GMT: r2_reg_process_event: [0/0/0:0(1), R2_REG_IDLE, E_R2_REG_DISCONNECT(91)]
双应答配置示例
! controller e1 0/0/0 ds0-group 0 timeslots 1-15,17-31 type r2-digital r2-compelled ani cas-custom 0 country brazil double-answer cc-reanswer-to 3000 !
双应答调试(debug vpm signal)
### Answer the call and start a 1 second timer May 23 09:52:59.180 BR: r2_q421_ic_answer(0/0/0:0(18)) Tx ANSWER seizure: delay 0 ms,elapsed 12404 msvnm_dsp_set_sig_state:[R2 Q.421 0/0/0:0(18)] set signal state = 0x4 May 23 09:52:59.180 BR: r2_reg_channel_connected(0/0/0:0(18)) May 23 09:52:59.180 BR: htsp_timer - 1000 msec May 23 09:52:59.180 BR: //23899578/92233E71B421/CCAPI/cc_api_voice_mode_event: Call Id=23899578 May 23 09:52:59.180 BR: //23899578/92233E71B421/CCAPI/cc_api_voice_mode_event: Call Entry(Context=0x1E73AD8) May 23 09:52:59.180 BR: htsp_process_event: [0/0/0:0(18), R2_Q421_IC_DOUBLE_ANS_ANS, E_HTSP_VOICE_CUT_THROUGH] all May 23 09:52:59.184 BR: //23899578/92233E71B421/CCAPI/cc_process_notify_bridge_done: Conference Id=0x10AD1, Call Id1=23899578, Call Id2=23899579 May 23 09:52:59.184 BR: r2_reg_process_event: [0/0/0:0(18), R2_REG_WAIT_FOR_CONNECT, E_R2_REG_CONNECT(90)] May 23 09:52:59.184 BR: r2_reg_connect(0/0/0:0(18)) ### One Second Passes and we clear the call and start a 2 second timer May 23 09:53:00.180 BR: htsp_process_event: [0/0/0:0(18), R2_Q421_IC_DOUBLE_ANS_ANS, E_HTSP_EVENT_TIMER] May 23 09:53:00.180 BR: r2_q421_ic_d_answ_answ_to(0/0/0:0(18)) E_TIMER_EVENT May 23 09:53:00.180 BR: htsp_timer - 2000 msec May 23 09:53:00.180 BR: r2_q421_ic_d_answ_answ_to(0/0/0:0(18)) Tx CLEAR BWDvnm_dsp_set_sig_state:[R2 Q.421 0/0/0:0(18)] set signal state = 0xC May 23 09:53:00.824 BR: htsp_process_event: [0/0/0:0(18), R2_Q421_IC_DOUBLE_ANS_RLS, E_DSP_SIG_1000] May 23 09:53:00.824 BR: r2_q421_ic_answer_clr_fwd(0/0/0:0(18)) Rx CLEAR FWD May 23 09:53:00.824 BR: r2_reg_channel_disconnected(0/0/0:0(18)) May 23 09:53:00.824 BR: htsp_timer - 2000 msec May 23 09:53:00.824 BR: r2_reg_process_event: [0/0/0:0(18), R2_REG_CONNECTED, E_R2_REG_DISCONNECT(91)] May 23 09:53:00.824 BR: r2_reg_disconnect_idle(0/0/0:0(18)) May 23 09:53:00.824 BR: R2 Incoming Voice(0/0): DSX (E1 0/0/0:17): STATE: R2_IN_IDLE R2 Got Event R2_STOP May 23 09:53:00.824 BR: r2_reg_timer_stop(0/0/0:0(18)) ### 2 second passes and the gateway release the call May 23 09:53:02.824 BR: htsp_process_event: [0/0/0:0(18), R2_Q421_IC_CLR_FWD, E_HTSP_EVENT_TIMER] May 23 09:53:02.824 BR: htsp_timer_stop May 23 09:53:02.824 BR: r2_reg_channel_disconnected(0/0/0:0(18)) May 23 09:53:02.824 BR: //23899578/92233E71B421/VTSP:(0/0/0:0):17:1:1/vtsp_cc_call_disconnected: Cause Value=16 May 23 09:53:02.824 BR: //23899578/92233E71B421/CCAPI/cc_api_call_disconnected: Cause Value=16, Interface=0xB41CEBC, Call Id=23899578
当在ISDN接口上配置isdn overlap-receiving命令时,入站拨号对等体匹配会产生一些影响。在ISDN层收到每个数字后,会检查拨号对等体是否匹配。如果发现了完全匹配,则不等待更多数字,就立即路由此呼叫(本示例中为路由到会话应用程序)。‘T’终止符可以挂起这种按数字逐个进行的匹配,并强制路由器或网关等待,直到收到所有数字为止。‘T’是指 ISDN 级的 T302 数字间计时器,可在与 ISDN 接口关联的串行接口下进行配置。ISDN还提供其他指示数字结尾的机制,例如在Q.931信息消息中设置发送完整信息元素(IE)。
当拨号对等体配置了传入的被叫号码T时,将显示如下所示的警告消息
输出示例:
Gateway(config)# dial-peer voice 1 pots
Gateway(config-dial-peer)# incoming called-number T
Warning: Pattern T defines a match with zero or more digits and hence could
match with an empty number. If this is not the desired behaviour please
configure pattern .T instead to match on one or more digits
有关传入拨号对等体与空被叫号码匹配的特殊说明:
与语音端口和/或某些情况下应答地址相比,“空”被叫号码被视为“较少”合格。因此,仅当没有基于应答地址或端口号的匹配时,才能发生基于“空”被叫号码的匹配。
在重叠拨号时,“空”被叫号码与“传入被叫号码T”不匹配,因为未发生超时。
只有在ENBLOCK的情况下,“null”被叫号码才能匹配“传入被叫号码T”,并且由于应答地址和端口号,两者均不匹配。显示的警告在管理员配置“传入被叫号码T”时显示,该警告是指此特定情况。
限制类是限制思科网关上的呼叫的方法。COR 经常被描述为锁和密钥机制。锁被分配给具有传出COR列表的拨号对等体。密钥分配给具有传入COR列表的拨号对等体。应用COR列表时,可用的出站拨号对等体是密钥可以解锁的拨号对等体。在检查其余出站拨号对等体匹配方法之前,会进行此过滤。
Class of Restriction的两个重要规则:
限制类(COR)、逻辑分区限制类(LPCOR)和带强制授权码(FAC)的LPCOR的配置不在本文档的范围内,但可以参考以下文档以供进一步阅读。
CME为ephone和语音注册池创建系统拨号对等体。在运行配置中无法看到这些。要更改CME拨号对等体,需要在实际电话或语音注册池上进行更改。当查看show dial-peer voice summary输出时,从2000开始的拨号对等体是SCCP电话,从4000开始的拨号对等体是SIP语音注册池。此拨号对等体显示为来自CME注册电话的呼叫的入站拨号对等体,以及调试中用于呼叫CME注册电话的出站拨号对等体。
使用CME的show dial-peer voice summary的输出示例
Gateway# show dial-peer voice sum | s 2000|4000 20001 pots up up 1001$ 0 50/0/1 20002 pots up up 4001$ 0 50/0/2 20003 pots up up 4002$ 0 50/0/3 20004 pots up up 7001$ 0 50/0/4 20005 pots up up 3009$ 0 50/0/5 20006 pots up up 8810....$ 0 50/0/10 20007 pots up up 8811....$ 0 50/0/11 40001 voip up up 14085151111$ 0 syst ipv4:14.50.214.67:50 40002 voip up up 19725252222$ 0 syst ipv4:14.50.214.67:50 40003 voip up up 85225353333$ 0 syst ipv4:14.50.214.67:50 40004 voip up up 442084445555$ 0 syst ipv4:14.50.214.67:50 40005 voip up up 911$ 0 syst ipv4:14.50.214.67:50 40006 voip up up 18005550100$ 0 syst ipv4:14.50.214.67:50 40008 voip up up 2001$ 0 syst ipv4:14.50.214.51:50
使用SIP CME的show voice register dial-peers的输出示例
Gateway# show voice register dial-peers Dial-peers for Pool 2: dial-peer voice 40006 voip destination-pattern 14085151111$ session target ipv4:14.50.214.67:5060 session protocol sipv2 dtmf-relay rtp-nte digit collect kpml codec g711ulaw bytes 160 no vad call-fwd-all 8888 after-hours-exempt FALSE dial-peer voice 40005 voip destination-pattern 19725252222$ session target ipv4:14.50.214.67:5060 session protocol sipv2 dtmf-relay rtp-nte digit collect kpml codec g711ulaw bytes 160 no vad after-hours-exempt FALSE
MGCP和SCCP对拨号对等体遵循自己的规则。他们使用的唯一概念是必须为呼叫配置所需的语音端口。其余部分由STCAPP和MGCPAPP工艺处理。当我们检查这些拨号对等体的配置时,它们要么使用命令“service mgcpapp”,要么使用命令“service stcapp”。 这些选项为所选应用启用拨号对等体,并告知应用应处理哪个拨号对等体。
调试这些协议时,输出从不显示入站拨号对等体匹配。这应始终显示为拨号对等体0。因为它不存在。处理应用的呼叫代理已选择将呼叫发送到哪个端口以及入站拨号对等体匹配无用,因为网关无法控制呼叫的该段。但是,可以观察出站拨号对等体匹配。这只是为了显示,处理该进程的呼叫代理最终也控制了该呼叫的那一边。
请记住,拨号对等体仅告知应用选择控制哪个物理语音端口。由于大多数呼叫由外部呼叫代理控制,网关只执行其告知的操作,我们将跳过此部分的底层“如何”,并提供一些配置以开始。
MGCP配置示例[使用CUCM自动配置*]:
!
mgcp call-agent 10.10.10.10
mgcp
!
ccm-manager mgcp [codec-all]
ccm-manager config server 10.10.10.10
ccm-manager config
ccm-manger redundant-host 10.10.10.20
!
voice-port 0/0/0
description The MGCP port to register
no shut
!
dial-peer voice 1 pots
description Defining the Port for the MGCP application
service mgcpapp
port 0/0/0
!
hostname myrouter
ip domain name cisco.com
ip name server 10.10.10.30
!
ip tftp source-interface gig0/0/0
!
SCCP/STCAPP配置示例[使用CUCM自动配置*]
!
stcapp ccm-group 1
stcapp
!
sccp local gig0/0/0
sccp ccm 10.10.10.10 id 1 priority 1 version 7.0+
sccp ccm 10.10.10.20 id 1 priority 2 version 7.0+
sccp
!
sccp ccm group 1
bind interface gig0/0/0
associate ccm 1 priority 1
associate ccm 2 priority 2
!
ccm-manager config server 10.10.10.10
ccm-manager sccp local gig0/0/0
ccm-manager sccp
!
voice-port 0/0/0
description The SCCP port to register
no shut
!
dial-peer voice 1 pots
description Defining the Port for the SCCP application
service stcapp
port 0/0/0
!
ip tftp source-interface gig0/0/0
!
*如果管理员不希望CUCM配置网关,只需删除“ccm-manager”命令。我们包括了拨号对等体配置,以阐明概念的工作原理。使用ccm-manager配置,CUCM根据CUCM中的端口配置创建这些拨号对等体,因此无需实际定义拨号对等体。CUCM创建的拨号对等体通常以999开头,然后是三位数。
IOS-XE 16.12.1+和CUCM 12.5.1SU+中添加了SIP DSAPP
借助此功能,FXS等模拟语音端口可由CUCM注册和管理。使用DSAPP的呼叫路由与MGCP或SCCP略有不同,因为拨号对等体仍然正常匹配。即,网关将从FXS端口收集数字并在VOIP拨号对等体上执行拨号对等体查找。在找到匹配项后,INVITE将发送到CUCM的CUCMenblock以执行进一步的数字分析。
SIP DSAPP配置示例[使用CUCM自动配置*] | IOS-XE 16.12.1+和CUCM 12.5.1SU+
!
dsapp line
!
voice service voip
sip
bind control source-interface GigabitEthernet0/0/0
bind media source-interface GigabitEthernet0/0/0
session transport tcp
!
application
service dsapp
param dialpeer 777
!
global
service default dsapp
!
ccm-manager config server 10.10.10.10
ccm-manager sipana auto-config local GigabitEthernet0/0/0
!
dial-peer voice 777 voip
destination-pattern 9T
session protocol sipv2
session target ipv4:10.10.10.10
session transport tcp
incoming called-number .
voice-class sip extension gw-ana
voice-class sip bind control source-interface GigabitEthernet0/0/0
dtmf-relay rtp-nte
codec g711ulaw
!
dial-peer voice 19990100 pots
service dsapp
destination-pattern 7776
voice-class sip extension gw-ana
port 0/1/0
!
sip-ua
registrar ipv4:10.10.10.10 expires 3600 tcp
!
完整的SIP DSAPP文档: https://www.cisco.com/c/en/us/td/docs/routers/access/vg450/software/configuration/guide/vg450-scg/vg450-scg_chapter_010.html#wp3621733520
此部分已在2022年删除。有关更多详细信息,请参阅新文档
版本 | 发布日期 | 备注 |
---|---|---|
3.0 |
27-Apr-2022 |
在稍作更改后重新发布。 |
1.0 |
30-May-2017 |
初始版本 |
注意: *此规则的例外是MGCP和SCCP语音端口。在呼叫路由过程中,这些信令协议不遵循正常的拨号对等体匹配机制。有关详细信息,请参阅SCCP和MGCP部分。