此文档已迁移到自行发布工作流。最初发布到https://www.cisco.com/c/en/us/support/docs/voice/voice-quality/22373-1stage2stage.html。
应更新此文档以符合当前准则,并且应在发布前删除此备注。发布此文档以进行预览时,请确保“文档ID”为22373,且URL与此段落中的原始URL匹配。如果文档ID或URL不匹配,请联系tz-writers@cisco.com。
简介
本文档介绍一阶段和两阶段拨号的各个方面。
先决条件
要求
本文档的读者应掌握以下主题的相关知识:
使用的组件
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
规则
有关文档约定的更多信息,请参考 Cisco 技术提示约定。
一次拨号
在数字接口的情况下,当PBX或中心局(CO)交换机发送包含完全路由呼叫所需的所有数字的设置消息时,这些数字可以映射到出站IP语音(VoIP)拨号对等体(或发夹直接映射到普通旧式电话服务(POTS)拨号对等体)。路由器/网关不向主叫方提供辅助拨号音,也不收集数字。它会将呼叫直接转发到已配置的目标。这称为一步拨号。
对于模拟接口,用户只听到一次拨号音(本地或远程),然后拨打数字并接通目标电话。
T1/E1 数字接口
当从POTS接口收到入站呼叫时,拨号对等体中的直接拨入(DID)功能使路由器/网关能够使用被叫号码(拨号号码识别服务(DNIS))直接匹配出站拨号对等体。在入站POTS拨号对等体上配置DID时,被叫号码将自动用于匹配出站呼叫段的目标模式。
从全局配置模式开始输入以下Cisco IOS命令,以便为DID配置POTS拨号对等体:
Router(config)#dial-peer voice number pots
Router(config-dial-peer)#direct-inward-dial
在此图中,当有人拿起电话1时,用户听到来自PBX的拨号音。PBX具有接入代码,该代码被编程为捕获到路由器的信道。用户拨打接入码和目标号码。在本例中,假设访问代码为99。电话1上的用户拨打995678。根据PBX的编程方式,它会将所有六个数字转发到路由器,或者删除自己的访问代码并仅将目标数字发送到路由器。同样,当连接到公共交换电话网(PSTN)的用户接听电话时,会听到PSTN的拨号音。当用户拨打1234时,PSTN将呼叫路由到路由器。由于配置了direct-inward-dial,因此路由器将查看拨号数字并匹配其出站VoIP拨号对等体(它将呼叫发送到路由器A)。
路由器A的配置如下:
dial-peer voice 99 pots
destination-pattern 1234
direct-inward-dial
!--- This command is required for one stage dialing so !--- the router routes the call based on the dialed digits.
port 1/0:0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2
路由器B的配置如下:
dial-peer voice 201 pots
destination-pattern 5678
direct-inward-dial
!--- This command is required for one !--- stage dialing so the router routes the call based on the dialed digits.
port 1/0:0
prefix 5678
dial-peer voice 200 voip
destination-pattern 1234
session target ipv4:192.168.1.1
您需要在远程路由器中添加前缀,因为POTS拨号对等体在默认情况下会删除其匹配的目标模式中的所有数字,这些数字需要发送到终接CO。
注意:在Cisco 2600/3600平台上,默认情况下在随路信令(CAS)(即时、闪烁、延迟)接口上启用DID。因此,请不要对来电配置 direct-inward-dial 命令。在Cisco AS5300平台上,为E&M即时信令配置的接口不支持DID。
请确保入站呼叫与已配置direct-inward-dial的POTS拨号对等体匹配。有关拨号对等体匹配的更多信息,请参阅语音-了解如何在Cisco IOS平台上匹配入站和出站拨号对等体。
模拟语音接口卡
注意:外部交换局/外部交换站/E&M (FXO/FXS/E&M)接口不支持直接拨入功能。必须使用VIC-2DID卡为模拟端口设置DID。有关Cisco模拟DID的详细信息,请参阅Cisco 2600和Cisco 3600系列路由器的模拟DID。
请考虑以下场景:
有两种方法可以为电话1配置一个阶段拨号:
本地拨号音
用户拿起电话时,会听到来自路由器的拨号音(debug)。然后,用户拨打5678或4321。路由器搜索出站拨号对等体并将呼叫发送到路由器B。然后,路由器B会获取PBX/CO的端口,并将DNIS(被叫号码)数字发送到PBX/CO,后者将呼叫发送到电话。此方案不需要特殊配置。路由器B必须将DNIS数字发送到PBX/CO。
路由器A的配置如下:
dial-peer voice 99 pots
destination-pattern 1234
port 1/0/0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2
路由器B的配置如下:
dial-peer voice 201 pots
destination-pattern 5678
port 1/0:0
prefix 5678
!--- Send the digits to the terminating PBX/CO.
dial-peer voice 200 voip
destination-pattern 1234
session target ipv4:192.168.1.1
远程拨号音
当用户拿起电话1时,会听到来自另一端PBX/CO的拨号音。这使电话看起来像是连接到远程端的PBX/CO。使用专用线路、自动振铃(PLAR)配置来实现此目的。此外,请确保路由器B未向PBX/CO发送任何数字。某些PBX可以配置为返回拨号音,即使它们确实收到任何DNIS数字。
路由器A的配置如下:
voice-port 1/0/0
connection plar 1000
!--- Connection PLAR is configured under the voice port.
!
dial-peer voice 100 voip
destination-pattern 1000
!--- Dialed string for connection PLAR !--- which sends the call to Router B.
session target ipv4:192.168.1.2
路由器B的配置如下:
!--- This dial matches the entire destination pattern, !--- strips it all off, and does not send any digits to the PBX/CO.
dial-peer voice 201 pots
destination-pattern 1000
!--- Dialed string for PLAR !--- that comes into this router from Router A.
port 1/0:0
!
有关可帮助您配置PLAR以及连接PLAR和连接中继之间的区别的详细信息,请参阅为VoIP网关配置连接PLAR。
二次拨号
当语音呼叫进入 Cisco IOS 路由器/网关时,路由器上的语音端口会被 PBX 或 CO 交换机在入站情况下捕捉。然后,路由器/网关向呼叫方发出拨号音,并收集数字,直到可以识别出站拨号对等体。无论数字是由人以不规则间隔拨号还是由发送预先收集的数字的电话设备以规则方式拨号,拨号对等体匹配都是按数字逐个完成的。这意味着路由器/网关在收到每个数字后尝试匹配拨号对等体。此过程称为两阶段拨号。
T1/E1 数字接口
请考虑以下场景:
以下两种方法可用于使用两阶段拨号:
本地拨号音
当用户拿起电话1时,听到来自PBX的拨号音,用户拨打路由器的接入代码(在PBX中编程),然后接收来自路由器的拨号音(debug)。接下来,用户拨打5678,该呼叫被路由到路由器B,然后被路由到电话2。
例如,如果PBX有另一条线路连接到另一台路由器,则会在PBX中为每个路由器编程一个访问代码。此外,根据您拨打的接入代码,可以从不同的本地路由器发出拨号音。
路由器A的配置如下:
!--- This dial-peer does not have !--- direct-inward-dial configured. !--- By default, when a call comes in, the router !--- provides dial tone to the user.
dial-peer voice 99 pots
destination-pattern 1234
port 1/0:0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2
!
路由器B的配置如下:
dial-peer voice 201 pots
destination-pattern 5678
port 1/0:0
prefix 5678
!
本地和远程拨号音
当用户拿起电话1时,PBX会听到拨号音。用户输入数字,然后听到连接到路由器B的PBX/CO发出的另一个拨号音。有两种方法可以达到此目的:
-
在路由器A上使用direct-inward-dial。
配置direct-inward-dial后,PBX/CO会占用路由器上的端口并发送一条包含DNIS数字的设置消息。路由器使用这些数字与出站VoIP拨号对等体匹配,并将呼叫发送到远程路由器。然后,路由器B将线路捕获到其PBX/CO,并且不转发任何数字。然后,远程PBX/CO向电话1上的用户提供拨号音。然后用户看起来好像连接到该PBX/CO。
路由器A的配置如下:
dial-peer voice 99 pots
destination-pattern 1234
direct-inward-dial
!--- This command is needed so that the router !--- routes the call based on the dialed digits.
port 1/0:0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 5678
session target ipv4:192.168.1.2
路由器B的配置如下:
!--- This dial-peer matches the entire destination pattern, !--- strips it all off, and does not send any digits to the PBX/CO.
dial-peer voice 201 pots
destination-pattern 5678
port 1/0:0
!
-
使用连接PLAR和连接中继。
在检测到其语音接口上的捕获时,使用连接PLAR设置呼叫的IP分支,而不是让路由器与PBX/CO发送给它的DNIS数字匹配。路由器B收到来自路由器A的呼叫,捕获PBX/CO上的端口,并且不向其发送任何数字。然后,远程PBX/CO向电话1上的用户提供拨号音,并且看起来像是用户连接到该PBX/CO。
路由器A的配置如下:
voice-port 1/0:0
connection plar 6666
!--- Connection PLAR is configured under the voice port.
!
dial-peer voice 99 pots
destination-pattern 1234
port 1/0:0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 6666
!--- Dialed string for connection PLAR !--- which sends the call to Router B.
session target ipv4:192.168.1.2
!
路由器B的配置如下:
!--- This dial matches the entire destination pattern, !--- strips it all off, and does not send any digits to the PBX/CO.
dial-peer voice 201 pots
destination-pattern 6666
!--- Dialed string for PLAR that comes !--- into this router from Router A.
port 1/0:0
!
模拟语音接口卡
请考虑以下场景:
当用户拿起电话1或为FXO线路拨打PSTN号码时,路由器会向主叫方提供拨号音(debug)。然后,用户输入数字并从终接PBX/CO接收拨号音。然后,用户拨打目标号码(9876或4321),并接通另一部电话。确保路由器B不向PBX/CO发送任何数字。
路由器A的配置如下:
dial-peer voice 99 pots
destination-pattern 1234
port 1/0/0
prefix 1234
!
dial-peer voice 100 voip
destination-pattern 9876
session target ipv4:192.168.1.2
!
!
dial-peer voice 101 voip
destination-pattern 4321
session target ipv4:192.168.1.2
路由器B的配置如下:
!--- This dial matches the entire destination pattern, strips it all off, !--- and does not send any digits to the PBX/CO.
dial-peer voice 201 pots
destination-pattern 9876
port 1/0:0
!
提供拨号音的路由器的debug voip ccapi inout命令的输出
Mar 9 06:30:26.270: cc_api_call_setup_ind (vdbPtr=0x823F6E70,
callInfo={called=,called_oct3=0x81,calling=,calling_oct3=0x0,calling_oct3a=0x0,
calling_xlated=false,subscriber_type_str=RegularLine,fdest=0,
peer_tag=700, prog_ind=3},callID=0x820704FC)
Mar 9 06:30:26.270: cc_api_call_setup_ind type 3 , prot 0
Mar 9 06:30:26.274: cc_process_call_setup_ind (event=0x823D0448)
Mar 9 06:30:26.274: >>>>CCAPI handed cid 2 with tag 700 to app "DEFAULT"
Mar 9 06:30:26.278: sess_appl: ev(24=CC_EV_CALL_SETUP_IND), cid(2), disp(0)
Mar 9 06:30:26.278: sess_appl: ev(SSA_EV_CALL_SETUP_IND), cid(2), disp(0)
Mar 9 06:30:26.278: ssaCallSetupInd
Mar 9 06:30:26.278: ccCallSetContext (callID=0x2, context=0x825A5C7C)
Mar 9 06:30:26.278: ssaCallSetupInd cid(2), st(SSA_CS_MAPPING),oldst(0),
ev(24)ev->e.evCallSetupInd.nCallInfo.finalDestFlag = 0
Mar 9 06:30:26.278: ccCallSetupAck (callID=0x2)
Mar 9 06:30:26.278: ccGenerateTone (callID=0x2 tone=8)
Mar 9 06:30:26.282: ccCallReportDigits (callID=0x2, enable=0x1)
Mar 9 06:30:26.282: cc_api_call_report_digits_done (vdbPtr=0x823F6E70, callID=0x2, disp=0)
Mar 9 06:30:26.282: sess_appl: ev(53=CC_EV_CALL_REPORT_DIGITS_DONE), cid(2), disp(0)
Mar 9 06:30:26.282: cid(2)st(SSA_CS_MAPPING)ev(SSA_EV_CALL_REPORT_DIGITS_DONE)
oldst(SSA_CS_MAPPING)cfid(-1)csize(0)in(1)fDest(0)
Mar 9 06:30:26.282: ssaReportDigitsDone cid(2) peer list: (empty)
Mar 9 06:30:26.282: ssaReportDigitsDone callid=2 Enable succeeded
Mar 9 06:30:26.282: ccGenerateTone (callID=0x2 tone=8)
!--- Router that provides dial tone.