This is an old revision of the document!
Varianty:
Zdroje napájení mohou být:
Pozn.:
Switch# configure terminal
Switch(config)# vlan 100
Switch(config-vlan)# name VOICE
Switch(config-vlan)# exit
Switch(config)# vlan 200
Switch(config-vlan)# name DATA
Switch(config-vlan)# exit
Switch(config)# interface range FastEthernet 0/2 - 24
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 200
Switch(config-if)# switchport voice vlan 100
Switch(config-if)# spanning-tree portfast
Switch(config-if)# end
Switch# show vlan brief
Pozor! Nastavuje se v privilegovaném módu ne v configu:
Router# clock set 12:00:00 1 JAN 2013
Router# configure terminal
Router(config)# ntp server 213.168.176.3
Router(config)# clock timezone CZ 1 0
Router(config)#clock timezone ? WORD name of time zone Router(config)#clock timezone CZ ? <-23 - 23> Hours offset from UTC Router(config)#clock timezone CZ 1 ? <0-59> Minutes offset from UTC <cr> Router(config)#clock timezone CZ 1 0 ? <cr>
Router# show ntp status
Router#show ntp status Clock is synchronized, stratum 4, reference is 213.168.176.3 nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**24 reference time is D66934EB.597D6AC7 (12:30:51.349 CZ Sat Dec 28 2013) clock offset is -0.7446 msec, root delay is 13.03 msec root dispersion is 495.86 msec, peer dispersion is 439.72 msec loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s system poll interval is 64, last update was 21 sec ago.
Router# show ntp associations
Router#show ntp associations address ref clock st when poll reach delay offset disp *~213.168.176.3 188.2.166.125 3 55 64 77 7.879 -0.744 190.27 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router# show clock
Router#show clock 12:35:13.497 CZ Sat Dec 28 2013
Router(config)# ntp master <stratum>
Router# conf t
Router(config)# ip dhcp excluded-address 192.168.100.1 192.168.100.50
Router(config)# ip dhcp pool VOICE
Router(dhcp-config)# network 192.168.100.0 255.255.255.0
nebo
Router(dhcp-config)# network 192.168.100.0 /24
Router(dhcp-config)# default-router 192.168.100.1
Router(dhcp-config)# dns-server 8.8.8.8
Router(dhcp-config)# option 150 ip 192.168.100.1
Router# show ip dhcp binding
Router#show ip dhcp binding Bindings from all pools not associated with VRF: IP address Client-ID/ Lease expiration Type Hardware address/ User name 192.168.100.132 01cc.ef48.5e1d.e7 Dec 29 2013 07:46 AM Automatic 192.168.100.139 000c.2923.baca Dec 29 2013 12:10 AM Automatic 192.168.100.168 0190.02a9.a78a.c5 Dec 28 2013 03:37 PM Automatic 192.168.100.170 0100.16d3.2860.ed Dec 28 2013 04:36 PM Automatic 192.168.100.191 0100.036b.7ffd.e3 Dec 29 2013 10:47 AM Automatic 192.168.100.207 0100.036b.7ff9.78 Dec 29 2013 10:51 AM Automatic 192.168.100.216 0100.a0ba.020f.c9 Dec 29 2013 05:48 AM Automatic
Router(config)# ip helper-address <ip-addr dhcp serveru>
Podmínkou pro funkci je nastavení těchto tří věcí:
Zbytečně nenastavovat max-dn a max-ephones na vysoké hodnoty. Router dle nich rezervuje systémové prostředky pro telefonii.
Router(config-telephony)# ip source-address 192.168.100.1
Router(config-telephony)# max-ephones 10
Router(config-telephony)# max-dn 20
Router(config)# ephone-dn 1
Router(config-ephone-dn)# number 1000
Router(config)# ephone-dn 2 dual-line
Router(config-ephone-dn)# number 1001
Router(config)# ephone-dn 3 octo-line
Router(config-ephone-dn)# number 1002
Tel.dostupný pod oběmi čísly z vnitřní sítě:
Router(config)# ephone-dn 4 dual-line
Router(config-ephone-dn)# number 1003 secondary 326211003
Router(config)# ephone 1
Router(config-ephone)# ephone 1
Router(config-ephone)# mac-address 0003.6B7F.F978
Router(config-ephone)# type 7960
Router(config-ephone)# button 1:1
(button <tlačítko><separátor><ephone-dn>)
button 1:1
button 2:2
atd.
button 1:1 2:2 atd.
Router# show ephone
Router#show ephone ephone-1[0] Mac:0003.6B7F.F978 TCP socket:[3] activeLine:0 whisperLine:0 REGISTERED in SCCP ver 11/9 max_streams=0 mediaActive:0 whisper_mediaActive:0 startMedia:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0 caps:8 IP:192.168.100.207 * 51194 Telecaster 7960 keepalive 17703 max_line 6 available_line 6 button 1: cw:1 ccw:(0 0) dn 1 number 100 CH1 IDLE CH2 IDLE Preferred Codec: g711ulaw Lpcor Type: none
Router# show voice port summary
Router#show voice port summary
Router(config)# voice-port 1/0/1
signal loopstart (nebo groundstart)
cptone cz
station-id name telefon_v_garazi
station-id number 326210210
Připojuje se k nim linka z ústředny (CO). FXO port je vlastně jako telefon, umí přijmout jen vyzvánění, odeslat volbu.
voice-port 1/1/0
signal [ loopstart | groundstart ]
station-id name nejake_jmeno
station-id number 326210211
dial-type [ dtmf | pulse ]
ring number 3 (poč.zazvonění před vyzvednutím, def.=1)
connection plar 100 (kam zazvonit po vyzvednutí)
Číslování:
conf t
controler t1 1/0
framing esf (ef/esf)
linecode b8zs (ami/b8zf)
clock source line (internal/line/free-running)
ds0-group 1 timeslots 1-24 type fxo-loop-start
show voice port summary
conf t
isdn switch-type primary-5ess
controller t1 1/0
pri-group timeslots 1-24
show voice port summary
(pots,voip,wildcards,matching,inbound/outbound, dp0, preference)
(+translation profiles,pořadí)
(tel. seznam)
(přesměrování)
(přepojování)
(parkování)
+softkey template
—
voice service voip allow-connections h323 to sip allow-connections sip to h323 allow-connections sip to sip redirect ip2ip fax protocol pass-through g711alaw h323 h225 timeout t302 5 h225 signal overlap call start slow sip bind control source-interface GigabitEthernet0/1 bind media source-interface GigabitEthernet0/1 no call service stop ! voice translation-rule 1 rule 1 /^0/ // ! voice translation-rule 2 rule 1 /\(...\)/ /326211\1/ ! voice translation-profile 1 translate calling 2 translate called 1 ! dial-peer voice 1 voip translation-profile outgoing 1 destination-pattern ^0.T session protocol sipv2 session target ipv4:x.x.x.x voice-class codec 1 ip qos dscp cs3 signaling no vad ! ! sip-ua credentials username user password pass123 realm 213.168.186.130 authentication username user password pass retry invite 2 retry register 10 timers connect 100 registrar ipv4:x.x.x.x expires 3600 sip-server ipv4:x.x.x.x host-registrar ! telephony-service no auto-reg-ephone max-ephones 110 max-dn 400 ip source-address 192.168.100.1 port 2000 system message Company-name cnf-file location flash: cnf-file perphone load 7925 CP7925G-1.4.3.4.loads load ata ATA030204SCCP090202A.zup load 6921 SCCP69xx.9-1-1-0.loads time-zone 23 time-format 24 date-format dd-mm-yy keepalive 3000 auxiliary 3000 max-conferences 8 gain -6 call-forward pattern .T web admin system name admin secret xxxxxxx dn-webedit time-webedit transfer-system full-consult transfer-pattern .T secondary-dialtone 0 create cnf-files version-stamp Jan 01 2002 00:00:00 ! ! ephone-dn 10 number 410 secondary 326211410 no-reg both label 410 description Telefon name Telefon ! ephone 10 mac-address 70CA.9B99.8943 max-calls-per-button 2 type 6921 button 1:10
voice service voip allow-connections sip to sip sip bind control source-interface GigabitEthernet0/1 bind media source-interface GigabitEthernet0/1 registrar server expires max 1200 min 300 ! voice register global mode cme source-address 10.3.5.2 port 5060 max-dn 10 max-pool 5 (authenticate register) authenticate realm domain.com create profile ! voice register dn 1 number 438 name telefon label 438 no-reg ! voice register pool 1 id mac AAAA.BBBB.CCCC number 1 dn 1 dtmf-relay sip-notify username username password pass123 codec g711ulaw !
CME#conf t Enter configuration commands, one per line. End with CNTL/Z. CME(config)#voice register global CME(config-register-global)#create profile CME(config-register-global)#restart
show sip-ua status registrar show voice register dial-peer show voice register pool 1 debug voice register events debug voice register error debug ccsip messages
Příklad úpravy hlavičky SIP Diversion od CUCM na CUBE prvku. (Trunk mezi CUBE a CUCM je SIPový) Pozor CUCM defaultně při přesměrování hovorů nepoužívá SIP diversion hlavičku, je potřeba to na něm zapnout - dalším zádrhelem může být poskytovatel SIP trunku, který musí tuto funkci podporovat.
voice service voip allow-connections h323 to h323 allow-connections h323 to sip allow-connections sip to h323 allow-connections sip to sip redirect ip2ip fax protocol pass-through g711alaw h323 no call service stop sip sip-profiles 1 ! voice class sip-profiles 1 request INVITE sip-header Diversion modify "<sip:(.*)@(.*)>(.*)" "<sip:32621\1@213.168.188.219>\3"
Slouží k definování oprávnění volání. Funguje na principu “zámků” a “klíčenek”.
Definuji si seznam tagů (směrů):
dial-peer cor custom name INTERNAL name EMER name LOCAL name LONGDIST <code> Definuji seznam "zámků" pro OUTGOING směr: <code> dial-peer cor list EMER-CALL member EMER ! dial-peer cor list LOCAL-CALL member LOCAL ! dial-peer cor list LONGDIST-CALL member LONGDIST ! dial-peer cor list INTERNAL-CALL member INTERNAL
Definuji “klíčenky” pro INCOMING směr:
dial-peer cor list EMER member EMER ! dial-peer cor list EMER-INT member INTERNAL member EMER ! dial-peer cor list EMER-INT-LOCAL member INTERNAL member EMER member LOCAL ! dial-peer cor list EMER-INT-LOCAL-LONGDIST member INTERNAL member EMER member LOCAL member LONGDIST
Aplikuji OUTGOING pravidla (zámky) na dial-peery:
dial-peer voice 1 voip corlist outgoing LONGDIST-CALL description <--- International + other ---> translation-profile outgoing 1 destination-pattern ^0.T session protocol sipv2 session target ipv4:213.168.186.130 voice-class codec 1 dtmf-relay sip-notify rtp-nte no vad ! dial-peer voice 2 voip corlist outgoing LOCAL-CALL description <--- Czech Republic ---> translation-profile outgoing 1 destination-pattern ^0[2-9]........ session protocol sipv2 session target ipv4:213.168.186.130 voice-class codec 1 dtmf-relay sip-notify rtp-nte no vad ! dial-peer voice 3 voip corlist outgoing INTERNAL-CALL description <--- Employes mobilephones ---> translation-profile outgoing 1 destination-pattern ^07207486.. session protocol sipv2 session target ipv4:213.168.186.130 voice-class codec 1 dtmf-relay sip-notify rtp-nte no vad ! dial-peer voice 4 voip corlist outgoing EMER-CALL description <--- Emergency ---> translation-profile outgoing 1 destination-pattern ^015. session protocol sipv2 session target ipv4:213.168.186.130 voice-class codec 1 dtmf-relay sip-notify rtp-nte no vad ! dial-peer voice 5 voip corlist outgoing EMER-CALL description <--- Emergency (universal) ---> translation-profile outgoing 1 destination-pattern ^0112 session protocol sipv2 session target ipv4:213.168.186.130 voice-class codec 1 dtmf-relay sip-notify rtp-nte no vad
Aplikuji INCOMING pravidla (klíčenky) na telefonní čísla DNs:
ephone-dn 81 dual-line number 680 secondary 373702680 no-reg both name 01 TestovaciTelefon corlist incoming EMER-INT !
Není-li na tel.čísle aplikován incoming COR list, je to jako by měl generální klíč, žádný outgoing list ho nezastaví!!!