How to Voice – Router Konfiguration – Teil 3

Konfiguration Router

 

Der C2901 Router verbindet die DMZ Netze und die internen Netze miteinander. Darüber hinaus dient dieser als Media Termination Point also für die Umwandlung von Codecs nach unserer vorgegebenen Liste zum CUCM oder in das entfernte WAN Netzwerk. Wir machen uns die SIP-UA Technologie zunutze um das Gateway mit einem Externen SIP Provider zu registrieren und über die vorhandenen Dialpeer’s und Transformations anrufe nach draußen zu schicken bzw. anrufe von draußen, gemäß Dialplan umzuwandeln und dem Callmanager zuzustellen.
Dabei kann man entscheiden wie viel davon auf dem Gateway bereits gemacht werden soll oder ob Ihr einen Teil der Transformation z.B. Umwandlung von E164 auf euer Rufnummern Format auf dem Callmanager erledigt. (Translation / Transformation Pattern) Anbei eine Beispiel Konfiguration eines Cisco Routers. Dabei müssen alle Argumente mit (cleared) mit den richtigen Daten ersetzt werden.

 

Building configuration... 

Current configuration : 8741 bytes 
! 
! Last configuration change at 07:57:35 GMT Tue Jun 20 2017 
! 
version 15.4 
service timestamps debug datetime msec 
service timestamps log datetime msec 
no service password-encryption 
! 
hostname (cleared) 
! 
boot-start-marker 
boot-end-marker 
! 
logging buffered 51200 warnings 
enable secret 5 (cleared) 
! 
aaa new-model 
! 
! 
aaa session-id common 
clock timezone GMT 1 0 
! 
ip name-server 8.8.8.8 
ip cef 
no ipv6 cef 
! 
multilink bundle-name authenticated 
! 
cts logging verbose 
! 
crypto pki trustpoint TP-self-signed-2408701061 
 enrollment selfsigned 
 subject-name cn=IOS-Self-Signed-Certificate-2408701061 
 revocation-check none 
 rsakeypair TP-self-signed-2408701061 
! 
crypto pki certificate chain TP-self-signed-2408701061 
 certificate self-signed 01 
  (cleared) 
        quit 
voice-card 0 
 dsp services dspfarm 
! 
voice call carrier capacity active 
voice rtp send-recv 
! 
voice service voip 
 ip address trusted list 
  ipv4 0.0.0.0 0.0.0.0 
 allow-connections h323 to h323 
 allow-connections h323 to sip 
 allow-connections sip to h323 
 allow-connections sip to sip 
 supplementary-service h450.12 
 no supplementary-service sip moved-temporarily 
 no supplementary-service sip refer 
 no supplementary-service sip handle-replaces 
 redirect ip2ip 
 fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none 
 h323 
  no call service stop 
 sip 
  bind control source-interface GigabitEthernet0/0 
  bind media source-interface GigabitEthernet0/0 
  no call service stop 
! 
voice class codec 1 
 codec preference 1 g711ulaw 
 codec preference 2 g711alaw 
 codec preference 3 g729r8 
! 
voice class sip-profiles 1 
 request ANY sip-header From modify "(@.*)" "@(cleared)>" 
 request REGISTER sip-header To modify "(@.*)" "@(cleared) >" 
! 
voice translation-rule 1 
 rule 1 /^\.*\(.*\)/ /+\1/ 
! 
voice translation-rule 2 
 rule 1 /^\+\(.*\)/ /\1/ 
! 
voice translation-rule 3 
 rule 1 /^\+49\(.*\)/ /0\1/ 
! 
voice translation-rule 4 
 rule 1 /^\00\(.*\)/ /+\1/ 
! 
voice translation-profile Strip00addPlus 
 translate called 4 
! 
voice translation-profile StripPlus49Add0 
 translate called 3 
! 
voice translation-profile addPlus 
 translate called 1 
! 
voice translation-profile outgoingStripPlus 
 translate called 2 
! 
license udi pid CISCO2911/K9 sn (cleared) 
hw-module pvdm 0/0 
! 
username admin password 7 (cleared) 
! 
redundancy 
! 
interface Loopback0 
 no ip address 
 shutdown 
! 
interface Embedded-Service-Engine0/0 
 no ip address 
 shutdown 
! 
interface GigabitEthernet0/0 
 description PrimaryWANDesc_ 
 ip address 192.168.178.2 255.255.255.0 
 duplex auto 
 speed auto 
! 
interface GigabitEthernet0/1 
 description Interface zum Switch DEBOBSW01 
 ip address 10.1.2.1 255.255.255.0 
 ip helper-address 10.1.2.10 
 duplex auto 
 speed auto 
! 
interface GigabitEthernet0/2 
 ip address dhcp 
 shutdown 
 duplex auto 
 speed auto 
! 
interface Virtual-Template1 
 no ip address 
! 
ip forward-protocol nd 
! 
no ip http server 
ip http authentication local 
ip http secure-server 
ip http timeout-policy idle 60 life 86400 requests 10000 
ip flow-export version 9 
! 
ip route 0.0.0.0 0.0.0.0 192.168.178.1 
ip route 10.1.1.0 255.255.255.0 10.1.2.2 
! 
logging trap errors 
logging host 10.1.2.7 
! 
snmp-server community public RO 
snmp-server manager 
! 
control-plane 
! 
mgcp behavior rsip-range tgcp-only 
mgcp behavior comedia-role none 
mgcp behavior comedia-check-media-src disable 
mgcp behavior comedia-sdp-force disable 
! 
mgcp profile default 
! 
sccp local GigabitEthernet0/1 
sccp ccm 10.1.2.10 identifier 1 priority 1 version 7.0 
sccp 
! 
sccp ccm group 1 
 bind interface GigabitEthernet0/1 
 associate ccm 1 priority 1 
 associate profile 1 register transcode 
! 
dspfarm profile 1 transcode 
 description transcode profile 1 
 codec g711alaw 
 codec g711ulaw 
 codec g722-64 
 codec g729abr8 
 codec g729ar8 
 codec g729br8 
 codec g729r8 
 codec gsmamr-nb 
 codec ilbc 
 codec isac 
 codec pass-through 
 maximum sessions 5 
 associate application SCCP 
! 
dial-peer voice 5 voip 
 description outgoing TO CUCM Central Number 
 destination-pattern +49(cleared). 
 session protocol sipv2 
 session target ipv4:10.1.2.10 
 voice-class codec 1 
 dtmf-relay rtp-nte sip-notify sip-kpml 
 no vad 
! 
dial-peer voice 6 voip 
 description incoming TO CUCM Central Number 
 translation-profile incoming addPlus 
 session protocol sipv2 
 session target ipv4:10.1.2.10 
 incoming called-number 49(cleared). 
 voice-class codec 1 
 dtmf-relay rtp-nte sip-notify sip-kpml 
 no vad 
! 
dial-peer voice 7 voip 
 description incoming TO CUCM Easybell 
 translation-profile incoming addPlus 
 session protocol sipv2 
 session target ipv4:10.1.2.10 
 incoming called-number 49(cleared).. 
 voice-class codec 1 
 dtmf-relay rtp-nte sip-notify sip-kpml 
 no vad 
! 
dial-peer voice 8 voip 
 description outgoing TO CUCM Easybell 
 destination-pattern +49(cleared).. 
 session protocol sipv2 
 session target ipv4:10.1.2.10 
 voice-class codec 1 
 dtmf-relay rtp-nte sip-notify sip-kpml 
 no vad 
! 
dial-peer voice 9 voip 
 description incoming TO Easybell 
 session protocol sipv2 
 session target dns:sip.easybell.de 
 incoming called-number .% 
 voice-class codec 1 
 dtmf-relay rtp-nte sip-kpml sip-notify 
 no vad 
! 
dial-peer voice 10 voip 
 description outgoing to Easybell 
 destination-pattern .% 
 session protocol sipv2 
 session target dns:sip.easybell.de 
 voice-class codec 1 
 voice-class sip localhost dns:sip.easybell.de 
 voice-class sip registration passthrough 
 dtmf-relay rtp-nte sip-kpml sip-notify 
 no vad 
 authentication username (cleared) password 7 (cleared) realm sip.easybell.de 
! 
gateway 
 timer receive-rtp 1200 
! 
sip-ua 
 credentials username (cleared) password 7 (cleared) realm sip.easybell.de 
 authentication username (cleared) password 7 (cleared) realm sip.easybell.de 
 retry invite 2 
 retry register 10 
 timers trying 100 
 timers connect 100 
 registrar dns:sip.easybell.de:5060 expires 600 
 sip-server dns:sip.easybell.de 
 host-registrar 
! 
gatekeeper 
 shutdown 
! 
telephony-service 
 max-conferences 8 gain -6 
 transfer-system full-consult 
! 
line con 0 
 exec-timeout 300 0 
 password 7 (cleared) 
 logging synchronous 
line aux 0 
line 2 
 no activation-character 
 no exec 
 transport preferred none 
 transport output pad telnet rlogin lapb-ta mop udptn v120 ssh 
 stopbits 1 
line vty 0 4 
 access-class 23 in 
 privilege level 15 
 password 7 (cleared) 
 transport input telnet ssh 
line vty 5 15 
 access-class 23 in 
 privilege level 15 
 password 7 (cleared) 
 transport input telnet ssh 
! 
scheduler allocate 20000 1000 
ntp server europe.pool.ntp.org 
! 
end 

Teile dieser Konfiguration können per Copy und Paste im conf t Modus direkt eingespielt werden. Andere müssen je nach Syntax gemäß Cisco Command Guide schrittweise eingetragen werden.

SIP-UA Beispiel

Hier mal eine SIP UA Beispiel Konfiguration, wie diese in Den Router eingegeben werden muss:

SIP-GW(config)#sip-ua 
SIP-GW(config-sip-ua)#registrar ipv4:10.30.25.250 tcp 
SIP-GW(config-sip-ua)#registrar ipv4:10.30.25.251 tcp secondary 
SIP-GW(config-sip-ua)#sip-server ipv4:10.30.25.252 
SIP-GW(config-sip-ua)#max-forwards 10 
SIP-GW(config-sip-ua)#no transport udp 
! 
SIP-GW#show sip-ua status 
SIP User Agent Status 
SIP User Agent for UDP : DISABLED 
SIP User Agent for TCP : ENABLED 
SIP User Agent bind status(signaling): DISABLED 
SIP User Agent bind status(media): DISABLED 
SIP early-media for 180 responses with SDP: ENABLED 
SIP max-forwards : 10 
SIP DNS SRV version: 2 (rfc 2782) 
NAT Settings for the SIP-UA 
Role in SDP: NONE 
Check media source packets: DISABLED 
Maximum duration for a telephone-event in NOTIFYs: 1000 ms 
SIP support for ISDN SUSPEND/RESUME: ENABLED 
Redirection (3xx) message handling: ENABLED 
Reason Header will override Response/Request Codes: DISABLED 
  
SDP application configuration: 
 Version line (v=) required 
 Owner line (o=) required 
 Timespec line (t=) required 
 Media supported: audio image 
 Network types supported: IN 
 Address types supported: IP4 
 Transport types supported: RTP/AVP udptl 
! 
SIP-GW#show sip-ua register status 
Line          peer           expires(sec)  registered 
============  =============  ============  =========== 
4101          20001            118           yes 
4102          20003            118           yes 
4103          20005            118           yes 
4104          20007            118           yes

Solltet Ihr also einen Teil der Konfig nicht direkt einspielen können, prüft mit Hilfe von Google die Syntax und bereitet die Config etwas auf. Es ist auch möglich das eure jetzige IOS Software Version bestimmte Befehle noch nicht unterstützen. Dazu habe ich noch einen kleinen Upgrade Guide weiter unten erstellt.
Bitte vergesst nicht den Befehl „wr“ abzusetzen um die Konfiguration auch im System Flash zu speichern.
Das Gateway C2901 bringt nicht nur ein CMD Interface über SSH und Telnet mit sondern ist auch über den CCP erreichbar. Solltet Ihr diesen bei Kauf nicht mit als Kostenlose Option gebucht haben, kann dieser recht einfach nachinstalliert werden.

 

Let's go and write a comment