本文档讨论了一阶段和两阶段拨号的方面。
本文档的读者应掌握以下主题的相关知识:
本文档中的信息基于以下软件和硬件版本:
所有的 Cisco IOS® 软件版本
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文档约定的更多信息,请参考 Cisco 技术提示约定。
在数字接口中,当PBX或中心局(CO)交换机发送包含完全路由呼叫所需的所有数字的设置消息时,这些数字可以映射到出站IP语音(VoIP)拨号对等体(或发夹到普通老式电话服务(POTS)拨号对等体)。 路由器/网关不向主叫方显示辅助拨号音,也不收集数字。它会将呼叫直接转发到已配置的目标。这称为一阶段拨号。
在模拟接口的情况下,用户只听到一次拨号音(本地或远程),然后拨打数字并接通目的电话。
当收到来自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将呼叫路由到路由器。由于已配置直接拨入,因此路由器会查看拨号的数字并匹配其出站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。
确保入站呼叫与已配置直接拨入的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,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 交换机在入站情况下捕捉。然后,路由器/网关向主叫方显示拨号音并收集数字,直到它能够识别出站拨号对等体。无论数字是由人以不规则的间隔拨打,还是由发送预先收集的数字的电话设备以常规方式拨打,拨号对等体匹配都是逐位进行的。这意味着路由器/网关在收到每个数字后尝试匹配拨号对等体。此过程称为两阶段拨号。
请考虑以下场景:
以下两种方法可用于两阶段拨号:
当用户拿起电话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上使用直接拨入。
当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 !
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.