2009年4月17日星期五

Cisco 3640 VoIP配置实例





  下面是Cisco 3640的VOIP配置,结构是台北和上海两地做VOIP,后接阿尔卡特的PBX,里面有很多需要注意的地方。

台北配置代码:

<code><br />Taipei#sh run<br />Building configuration...<br /><br />Current configuration:<br />!<br />version 12.0<br />service timestamps debug uptime(设定Debug跟踪日志显示其时间)<br />service timestamps log uptime(设定看Log时显示其时间)<br />no service password-encryption(口令不加密)<br />!<br />hostname Taipei(主机名)<br />!<br />enable secret 5 $1$R.66$z.BUjhNsJcIr8KCcS9uxG.<br />!<br />!<br />!<br />!<br />!<br />voice-card 1(定义语音卡1)<br />!<br />voice-card 3(定义语音卡3)<br />!<br />ip subnet-zero<br />no ip domain-lookup<br />!<br />isdn voice-call-failure 0<br />!<br />!<br />!<br />!<br />controller E1 1/0(配置 E1语音卡)<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-wink-start(定义语音卡的类型为E&M卡)<br />cas-custom 0<br />!<br />controller E1 3/0(配置 E1语音卡)<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-wink-start(定义语音卡的类型为E&M卡)<br />cas-custom 0<br />!<br />!<br />!<br />interface BRI0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />isdn guard-timer 0 on-expiry accept<br />!<br />interface FastEthernet0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />duplex auto<br />speed auto<br />!<br />   interface Serial0/0<br />description "Link to MainLand_ShangHai by NCIC lease line"<br />ip address 192.168.1.1 255.255.255.252<br />no ip directed-broadcast<br />no ip mroute-cache<br />no fair-queue<br />!<br />interface Serial0/1<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />clockrate 2000000<br />!<br />ip classless<br />no ip http server<br />!<br />!<br />voice-port 1/0:0(配置模拟语音端口)<br />compand-type a-law<br />!<br />voice-port 3/0:0(配置模拟语音端口)<br />compand-type a-law<br />!<br />dial-peer voice 1 voip (定义拨号对等体到语音)<br />destination-pattern +445...(为拨号对等体分配电话号码,其中.为通配符)<br />session target ipv4:192.168.1.2(定义Voip路由,为对端的IP地址)<br />req-qos guaranteed-delay (语音数据流RVSP的保证,其中Guaranteed-dealy可用于保证整个网络的延时)<br />ip precedence 5(IP优先级,5为关键)<br />!<br />dial-peer voice 2 pots(定义拨号对等体到语音物理端口)<br />destination-pattern +3...(定义电话话码以3开头的)<br />port 1/0:0(定义语音端口)<br />!<br />dial-peer voice 3 pots(定义拨号对等体到语音物理端口)<br />destination-pattern +3...(定义电话话码以3开头的)<br />port 3/0:0(定义语音端口)<br />!<br />!<br />line con 0(设定登陆)<br />transport input none<br />line aux 0<br />line vty 0 4(允许用Telnet)<br />password cisco(口令为Cisco)<br />login<br />!<br />end<br /><br />Taipei#<br /></code></pre></td></tr></tbody></table><br /><br />上海一方的3640配置代码:<br /><br /><table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"> <tbody> <tr> <td><pre><code><br />ShangHai#sh run<br />Building configuration...<br /><br />Current configuration:<br />!<br />version 12.0<br />service timestamps debug uptime<br />service timestamps log uptime<br />no service password-encryption<br />!<br />hostname ShangHai<br />!<br />enable secret 5 $1$dB/c$tnrMU9IxFCJdix5ssHAdH/<br />!<br />!<br />!<br />!<br />!<br />voice-card 1<br />!<br />voice-card 2<br />!<br />ip subnet-zero<br />no ip domain-lookup<br />!<br />isdn voice-call-failure 0<br />!<br />!<br />!<br />!<br />controller E1 1/0<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-immediate-start<br />cas-custom 0<br />! <br />   controller E1 2/0<br />framing N<br />ds0-group 0 timeslots 1-15,17-31 type e&m-immediate-start<br />cas-custom 0<br />!<br />!<br />!<br />interface BRI0/0<br />no ip address<br />no ip directed-broadcast<br />encapsulation ppp<br />isdn guard-timer 0 on-expiry accept<br />ppp multilink<br />!<br />interface FastEthernet0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />duplex auto<br />speed auto<br />!<br />interface Serial0/0<br />no ip address<br />no ip directed-broadcast<br />no ip mroute-cache<br />shutdown<br />no fair-queue<br />clockrate 2000000<br />!<br />interface Serial0/1<br />ip address 192.168.1.2 255.255.255.252<br />no ip directed-broadcast<br />!<br />ip classless<br />!<br />no ip http server<br />!<br />!<br />voice-port 1/0:0<br />compand-type a-law<br />!<br />voice-port 2/0:0<br />compand-type a-law<br />!<br />dial-peer voice 20 voip<br />destination-pattern +3...<br />session target ipv4:192.168.1.1<br />req-qos guaranteed-delay<br />ip precedence 5<br />!<br />dial-peer voice 10 pots<br />destination-pattern +448...<br />port 1/0:0<br />!<br />dial-peer voice 30 voip<br />destination-pattern +4...<br />session target ipv4:192.168.1.1<br />req-qos guaranteed-delay<br />ip precedence 5<br />!<br />dial-peer voice 40 pots<br />destination-pattern +449...<br />port 2/0:0<br />!<br />!<br />line con 0<br />transport input none<br />line aux 0<br />line vty 0 4<br />password cisco<br />login<br />!<br />end<br /><br />ShangHai#<br /></code>
(完)


0 评论: