Voice Lab 3-IPhone F

Voice Lab 3-IPhone Features & CME Features

1-試驗拓撲:

telephony-service

no auto-reg-ephone //關閉自動註冊

max-ephones 5

max-dn 5

ip source-address 192.168.100.1 port 2000 //電話註冊地址

timeouts interdigit 5 //撥號按鈕等待時間

system message HM TEST // 公司標示

network-locale JP //定義location

time-format 24 //定義時間格式

date-format yy-mm-dd

voicemail 9999

max-conferences 8 gain -6 //最多8個人參加會議

web admin system name cisco password cisco //開啟GUI

dn-webedit //在網頁中可以更改DN

time-webedit //在網頁中可以更改時間

transfer-system full-consult

secondary-dialtone 1 //外撥號音

create cnf-files version-stamp 7960 Jan 11 2016 20:25:32

load 7914 S00105000200 //更新電話韌體

幾個常用命令:

Show telephone-service

Show ephone summary

Show ephone registered

Debug vpm signal 

debug cch323 h225

debug cch323 h245

Debug voip dialpeer 

2-開啟GUI for CME

R1#format flash: //在gns3下作flash格式化,用下面命令確保flash是可以看到的

R1#archive tar /xtract tftp://192.168.100.100/cme-gui-4.1.0.2.tar flash:

注意: cme-gui-4.1.0.2.tar 可以在我的百度網盤中下載到

R1(config)#ip http server //開啟http 服務

http://192.168.100.1/ccme.html就可以訪問了,以下為截圖

3-配置電話directory

3-1電話配置

ephone-dn 1

number 1001

name fuA, ericA

ephone-dn 2

number 1002

name fuB, ericB

ephone-dn 3

number 1003

name fuC, ericC

!

ephone 1

mac-address 0200.4C4F.4F50

type CIPC

button 1:1

ephone 2

mac-address 000C.295E.AA6D

type CIPC

button 1:2

ephone 3

mac-address 000C.29CC.0734

type CIPC

button 1:3

3-2配置local directory

R1(config)#telephony-service

R1(config-telephony)#service local-directory

R1(config-telephony)directory last-name-first

R1(config-telephony)directory entry 1 1001 name fuA ericA

R1(config-telephony)directory entry 2 1002 name fuB ericB

R1(config-telephony)directory entry 3 1003 name fuC ericC

4-配置呼叫前轉

4-1方法一

電話機上設置

4-2 方法二

R1(config)#ephone-dn 1

R1(config-ephone-dn)#call

R1(config-ephone-dn)#call-f

R1(config-ephone-dn)#call-forward ?

all forward all calls

busy forward call on busy

max-length max number of digits allowed for CFwdAll from IP phone

night-service forward call on activated night-service

noan forward call on no-answer

5-配置呼叫轉移

它有兩個方式

R1(config-telephony)#transfer-system ?

full-blind Perform call transfers without consultation using H.450.2 or

SIP REFER standard methods //全盲轉

full-consult Perform H.450.2/SIP call transfers with consultation using

second phone line if available, fallback to full-blind if

second line unavailable. This is the recommended mode for most

systems. See also 'supplementary-service' commands under

'voice service voip' and dial-peer. //全諮詢轉

local-consult Perform call transfers with local consultation using second

phone line if available, fallback to blind for non-local

consultation/transfer target. Uses Cisco proprietary method.//local 轉

6-PLAR

私有號碼自主振鈴

例如一摘機就觸發一個呼叫

voice-port 1/0/0

connection plar 2001

7-配置呼叫駐留

ephone-dn 4

number 1004

park-slot

name callpark

具體詳細命令可以參考下表

1001A<—>1002B通訊

B有點事,換到C位置上,同時點了park, 輸入1004

然後用C的電話撥打park 1004,然後又建立起了連接

8-配置呼叫代答

就是用pickup和Gpickup 鍵

R1(config)#ephone-dn 1

R1(config-ephone-dn)#pickup-group 1

R1(config-ephone-dn)#ephone-dn 2

R1(config-ephone-dn)#pickup-group 1

R1(config-ephone-dn)#ephone-dn 3

R1(config-ephone-dn)#pickup-group 1

代答方式:

? 舉例:

Pickup:從外部一台電話2222呼叫1001。1001不接。1002提機按pickup鍵。輸入1001。這樣2222和1001的呼叫由1002接通(不同組也沒關係)

? Gpickup:從2222呼叫1002。1002不接。1001提機。按Gpickup鍵。輸入1002

所在的group號2。則2222和1001的呼叫接通。

9-配置快捷撥號

!!!特別注意要號碼重疊

num-exp 1 2001    撥1,2001就會振鈴(先要有路由)

num-exp 2 2002

特別要注意的是:這裡有一個快捷鍵是「2」撥號2002;,,這是如果需要打2001,,就不同了,,因為按到2就出觸發了去撥打2002.

R1(config)#num-exp 3 1003

撥打3就是代表撥打1003

10-配置對講電話

實際應用於上下級關係的電話配置中

R1(config)#ephone-dn 6

R1(config-ephone-dn)#number A100

R1(config-ephone-dn)#intercom A101 label manager

R1(config-ephone-dn)#ephone-dn 7

R1(config-ephone-dn)#number A101

R1(config-ephone-dn)#intercom A100 label "Assistant"

R1(config-ephone-dn)#ephone 1

R1(config-ephone)#button 2:6

R1(config-ephone)#restart

R1(config-ephone)#ephone 2

R1(config-ephone)#button 2:7

R1(config-ephone)#restart

Intercom有如下參數:

11-配置HuntGroup

從去呼叫總機。首先1001會振鈴。如果1001按了dnd鍵(don't disturb,類似

於靜音了),或Endcall。1002會振鈴。1002也按。1003振鈴。

CME配置如下:

R1(config)#ephone-hunt 1 ?

longest-idle longest idle hunting \按時間選擇

peer peer hunting \對等選擇輪訓

sequential sequential hunting \順序選擇

R1(config)#ephone-hunt 1 sequential

R1(config-ephone-hunt)#pilot 8888 //呼叫總機8888

R1(config-ephone-hunt)#list 1001,1002

R1(config-ephone-hunt)#preference 1//這個huntgroup的優先順序

R1(config-ephone-hunt)#timeout 30 //30秒自動跳轉到下個

R1(config-ephone-hunt)#final 9999 //最後轉入語音郵箱

R1(config)#ephone-dn 1 dual-line

R1(config-ephone-dn)#huntstop channel //如果第一路忙,則自動到第二路振鈴。默認是第一路忙就不轉了

R1(config)#ephone-dn 2 dual-line

R1(config-ephone-dn)#huntstop channel

R1(config)#ephone-dn 3 dual-line

R1(config-ephone-dn)#huntstop channel

12-配置尋呼功能

尋呼配置為三類,單播,多播,廣播.

R1(config)#ephone-dn 4

R1(config-ephone-dn)#number 5555

R1(config-ephone-dn)#paging

R1(config-ephone-dn)#paging ip 239.1.1.100 port 2000 \配置為組播地址

R1(config-ephone-dn)#exit

R1(config)#ephone 1

R1(config-ephone)#paging-dn 4

R1(config-ephone)#ephone 2

R1(config-ephone)#paging-dn 4

1003撥打5555,則1001和1002自動接聽,因為他們在同一個paging group中

R1(config)#ephone-dn 5

R1(config-ephone-dn)#number 6666

R1(config-ephone-dn)#paging group 4,5

Paging group的應用在於,撥打6666, 同時也會振鈴paging dn 4的所有電話

13-支援SIP電話

配置如下:

voice class codec 1

codec preference 1 g711ulaw 

codec preference 2 g729r8 !

voice register global  mode cme

source-address 11.11.11.100  

max-dn 10 

max-pool 5

authenticate realm cisco.com  create profile !

voice register dn  1  number 9001 !

voice register pool  1  id mac 9999.9999.0001

number 1 dn 1

voice-class codec 1      調用上面的class  必須要寫,或寫固定的code  username evan password evan

voice service voip   sip

  bind control source-interface Loopback0   bind media source-interface Loopback0 allow-connections sip to h323   registrar server

注意preference 的值,代表那根線先使用,0好像默認,為最大

如果是兩台sip之間打(路由表裡voip到voip),由於防環的機制,,我們要打下面的命令

voice service voip 

allow-connections sip to sip

allow-connections sip to h323

allow-connections h323 to h323

在R1和R2上在寫dial-peer時建議加上:voice-class codec x的命令 dial-peer voice 8000 voip 

destination-pattern 80..

voice-class codec 1

session target ipv4:x.x.x.x

14-配置時間段呼叫阻塞

R1(config)#telephony-service

R1(config-telephony)#after-hours day mon 18:00 9:00 //定義時間段,星期1晚6點到次日9點

R1(config-telephony)#after-hours block pattern 1 9T

R1(config-telephony)#ephone 3 //電話3除外

R1(config-ephone)#after-hour exempt

R1(config-ephone)#ephone 2

R1(config-ephone)#pin 1234//電話2除外,但要輸入pin碼,就是在電話螢幕中點 'log in'

R1(config-ephone)#exit

R1(config)#telephony-service

R1(config-telephony)#login time 120 clear 23:00 //定義輸入pin碼的等待時間

15-配置CDR

CDR:call detail record

R1(config)#logging buffered 51200

R1(config)#dial-control-mib retain-timer 10080 \保留時間

R1(config)#dial-control-mib max-size 700 \保留長度

以上配置是沒有log server的情況,但以下是有server的配置

R1(config)#gw-accounting syslog

R1(config)#logging 1.1.1.1

打電話過程中,這個鍵是用來計費的,比如each department cost center

16-配置保持音樂MOH

R1(config)#telephony-service

R1(config-telephony)#moh 1.wav

R1(config-telephony)#multicast moh 239.1.1.5 port 2111

17-配置呼叫許可權COR

COR的工作方式講起來有點麻煩。它的實施有三個步驟,

第一是定義COR成員,第二是定義COR list。第三是和dial-peer以及ephone-dn綁定。COR成員是包括在COR list當中,而COR list是與dial-peer和ephone-dn綁定的。

COR list分為incoming和outgoing。那麼如何判斷是否允許通過呢。如果COR outgoing中的成員是COR incoming中的成員的子集的時候,就可以通過。比如incoming成員有1,2,3,4 ,而outgoing有1或者有1,2或者2,3,4那麼都是incoming的子集(這個是數學裡面集合的內容)。這個時候這個出向dial-peer就可以繼續傳遞了。

(特例,當出向或者入向dial-peer,ephone-dn任何一方或者兩方都沒有和任何COR list關聯的時候,也是可以通過的)

Ephone-dn和入向dial-peer是和COR incoming來進行綁定的。出向dial-peer是和COR outgoing來進行綁定的。

現在要求1001 只能撥打2001, 1002隻能撥打2002

R1(config)#dial-peer cor custom //定義cor 成員

R1(config-dp-cor)#name call2001

R1(config-dp-cor)#name call2002

R1(config-dp-cor)#exit

出向和入向list並不是從配置的開始就確定的,創建的時候都是list。只是你應用到出向dial-peer就是出向COR list

//定義出向cor list時刻記住COR的匹配準則:出向COR成員是入向的子集才能通過

R1(config)#dial-peer cor list cor-out-2001

R1(config-dp-corlist)#mem call2001

R1(config)#dial-peer cor list cor-out-2002

R1(config-dp-corlist)#member call2002

//定義入向cor list

R1(config)#dial-peer cor list cor-in-2001

R1(config-dp-corlist)#mem

R1(config-dp-corlist)#member call2001

R1(config-dp-corlist)#exit

R1(config)#dial-peer cor list cor-in-2002

R1(config-dp-corlist)#member call2002

//邦定出向corlist在dial-peer上

R1(config)#no dial-p voice 2000 voip

R1(config)#dial-p voice 2001 voip

R1(config-dial-peer)#destination-pattern 2001

R1(config-dial-peer)#corlist outgoing cor-out-2001

R1(config-dial-peer)#session target ipv4:12.1.1.2

R1(config-dial-peer)#exit

R1(config)#dial-p voice 2002 voip

R1(config-dial-peer)#destination-p 2002

R1(config-dial-peer)#corlist outgoing cor-out-2002

R1(config-dial-peer)#session target ipv4:12.1.1.2

//再綁定入向dial-peer或者ephone-dn

R1(config)#ephone-dn 1

R1(config-ephone-dn)#corlist incoming cor-in-2001

R1(config-ephone-dn)#ephone-dn 2

R1(config-ephone-dn)#corlist incoming cor-in-2002

測試結果: 不能打通的時候,電話上顯示的是unknown number。

參考鏈接:

http://sns.clnchina.com.cn/space.php?uid=119704&do=blog&id=2241

http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucme/admin/configuration/guide/cmeadm/cmebasic.html

http://wenku.baidu.com/view/a9d7f548e45c3b3567ec8bbf

http://www.techrepublic.com/article/know-how-to-use-cisco-ios-file-system-commands/