这节主要讨论模拟语音的接口配置及信令行为。
3 个概念的理解:
1. 语音接口:提供模拟中继及用户线的接入与处理,实现语音信号在数据网路中的传输。
2. 语音信令:用来控制电路行为,如呼叫建立,拆除,网络管理等
3. 语音媒体:描述通讯会话中传递信息,协商等信息
以上拓扑图为例,讨论如下问题:
实验环境中的接口连接,如上图
接口及 dial-peer 配置
信令行为
FXO 口的 ” 吃号 ” 问题
FXS口的位间超时问题
ConnectionPlar opx 在 FXO/FXS 的应用
生产环境中的拓扑连接
R1:
dial-p voi 1000 pots --- 去分机 1000
destination-pattern 1000
port 1/0/0
exit
dial-p voice 1001 pots --- 去分机 1001
destination-pattern 1001
port 1/0/1
exit
dial-p voice 2000 pots – 去远端 2000
destination-pattern 0T – T表示任意
port 1/1/0
exit
R2:
dial-peer voice 2001 pots
destination-pattern 2001
port 1/0/0
exit
dial-peer voice 87651000 pots
destination-pattern 87651000
no digit-strip
port 1/0/1
命令解释:
1. 对于模拟口 FXO(ports,包括E1,T1作为PSTN接入时)存在吃号问题:对于模拟口的dial-peer,在写 destination-pattern 这条命令时,该命令下所有的 明细号码 将会被吃掉,即不发送出; “ T ” 表示所有, “ . ” 表示一个任意,如果用 0 T ,那么 0 会被吃掉,T(任意)会被发出去,如果是S口直接连接终端电话机,被吃掉也无所谓;上述配置中R2上由于S口连接到了R1的O口,在这里写了 destination-pattern 87651000 ,那么 87651000 会被吃掉, R1 将不会收到被叫号码的信息,对于这种情况,可通过 3条命令中的之一解决: no digit-strip : 不吃号 Prefix 87651000 : 添加 87651000 后再发 Forward digit all : 转发所有
2. 用户习惯于拿起电话就能听到一个拨号音后才开始拨号,如果听不到或者很长世间财听到均为导致用户挂断电话。为此要解决超时等问题,即位间超时 . 在 dial-peer 下添加: timeouts interdigits 5 : 拨号等就后结束 timeouts initial : 等待多久没有拨号就结束 timeouts ring : 振铃多久不接后就挂断 // 除在 dial-peer 下,在全局 telephony-service 下也可开启 //
3. 0T与 0.T的区别 0T :当你拨完 0后,什么都不拨, timeout后信令会传出去( off-hook给 R2, R2也会回应你,链路被占用, R2会提供 2次拨号音) 0.T :当你拨完 0 后,什么都不拨, timeout 后线路不会被触发,线路不会被占用。(命中两位才会命中路由,才会发出信令 ,注意这里有个 ” . ” )
4. O口与 S口的可选配置 O: 1. Ring number: 振铃几次再响应 2. Supervisory disconnect :主动监听挂断音 S: 1. cptone CN: 每个国家都有不同的振铃声 2. Disconnect-ack : S口提供 information的挂断音 3. Sation id name: 标识主机
5. 信令行为: 5.1. 1001 off-hook ( R1的 FXS口的 IN方向 ) 5.2. R1 发出 dialtong ( 拨号音 ) 5.3. 1001 开始拨 1002 (DTMF) 5.4. R1开始查找语音路由表, 1002在 FXS 1/0/1口 5.5. FXS 1/0/1口由 idle – ringing, 并向 1001发送 ringback 5.6. 1002摘机, on-hook --- off-hook (port 1/0/1) 5.7. 开始通话
6. PSTN的呼入及解决 实际环境中 PSTN不会向 FXO发送号码,所以此时不通,解决方案: 6.1 translation rule 转换 6.2 connection plar opx,强制连接分机 voice port 1/1/0 ring number 3 connection plar opx 1000 6.3 connection plar 应用场景 6.3.1 : FXO口检测到 ring信令时不能自动应答,使用此命令连接到总机。 6.3.2: FXS口拿起电话就能直接和远端通话,此一般用于应急电话 . voice-port 1/0/1 cptone CN connection plar 1001
7. 几个测试命令 7.1 test voice port 1/0/0 relay ring ? – 测试信令行为 disable on off 7.2 csim start 1000 – 测试路由器的语音路由 7.3 debug voice dialpeer inout -- 检查 dial-peer命中情况 7.4 sh dial-peer voice sum – 检查语音路由表
8. FXS / FXO 口的出,入方向的信令行为
接口
信令
IN
OUT
FXS
on-hook off-hook
Idle ring
FXO
Idle ring
On-hook off-hook
转载于:https://blog.51cto.com/52share/1697875