For this first post on the Cisco UC I want to share you the configuration that made me sweat ! I have a customer that has a centralized UC infrastructure with only two CUCM, one UCCX and remote sites with 2901 gateway (IOS 15.4) and some 7821 IP phones. The PSTN is linked to the gateway with an E1 on the local sites and the gateway uses SIP Trunks to the CUCM. There is only one DID on the PSTN acces on each site for the call to the UCCX.
So my challange was to configure the SRST for SIP Phones and find a way to redirect all incoming calls to all the phones (hunt with broadcast) if the WAN link is down and phones registers to SRST. Easy no ? No. (and now if you want the solution jump to the diagram below)
Why ? Because if you configure a hunt group with the same number as the UCCX DN but with lower preference in dial-peer, the hunt group is still local to the gateway and will be preferred than the trunk to CUCM. Worst, if you configure the hunt group after the trunk it would work but after a reload of the gateway it doesn’t work anymore .
I could configure the gateway in MGCP that would be privilegied in normal mode with the hunt group for the SRST, but using MGCP for a PSTN gateway when SIP is almost used every where, I don’t think it’s the best idea ! So what ? Shared-line ? Not supported in SRST, if you try it you would have a dial-peer for each phones with this line and with the dial-peer hunting, the gateway still would select the same phone.
Almost every post on the Net about SRST + Hunt would say to use the magic alias command, but this works perfectly with… SCCP Phones ! And the alias on the voice register pool section seems not working as well. What are the remaining options ? Mhmm maybe a custom TCL script or using the EEM to create dynamically a hunt group when the CUCM Trunk dial-peer is busied-out… yuck !
And finally during a peaceful night the solution appeared, A Cisco gateway does voice routing (yes it seems that it was a strange night). So why not use the hunt group solution not only in SRST but always ? Let’s imagin a hunt-group that would send the call to the UCCX first and then if no answer or error (no WAN) send the call to all phones. And “all phones” is a second hunt group ! Yes it works ! YES !
Here is the solution :
It could explain more in details,but I think that almost everything is in there ! So here is the basic voice configuration of the gateway :
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | version 15.4 ! hostname BASIQUEMENT ! card type e1 0 0 ! network-clock-participate wic 0  network-clock-select 1 E1 0/0/0 ! isdn switch-type primary-net5 ! voice-card 0  dspfarm  dsp services dspfarm ! voice call send-alert voice call disc-pi-off voice call convert-discpi-to-prog ! voice service voip  ip address trusted list   ipv4 172.30.100.227   ipv4 172.30.100.228  allow-connections h323 to h323  allow-connections h323 to sip  allow-connections sip to h323  allow-connections sip to sip  fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw  sip   registrar server expires max 600 min 60 ! voice class codec 1  codec preference 1 g711alaw  codec preference 2 g711ulaw  codec preference 3 g729r8 ! voice register global  mode srst  timeouts interdigit 5  system message SRST Mode is Active  max-dn 50  max-pool 10  timezone 26 ! voice register pool  1  id network 172.25.236.0 mask 255.255.255.0  dtmf-relay rtp-nte sip-kpml sip-notify  voice-class codec 1  no vad ! voice hunt-group 1 sequential  phone-display  final 5204  list 5202,5203  timeout 20   pilot 5201   description MainToUCCXorSRST     name MainToUCCXorSRST  preference 3 secondary 9 ! voice hunt-group 2 parallel  phone-display  final 5201  list 5211,5212,5213,5214,5215,5216,5217,5218,5219,5220,5221,5222,5223,5224,5225  timeout 60   pilot 5204   description SRST-CallCenter     name SRST-CallCenter  preference 3 secondary 9 ! voice translation-rule 10 ! voice translation-rule 20  rule 3 /8888/ /5201/ ! voice translation-rule 30  rule 5 /^00\(.*\)/ /\1/ type unknown international plan unknown isdn  rule 6 /^0\(.*\)/ /\1/ type unknown national plan unknown isdn ! voice translation-rule 40 ! voice translation-profile INCOMING-PRI  translate calling 10  translate called 20 ! voice translation-profile OUTGOING-PRI  translate calling 30  translate called 40 ! license udi pid CISCO2901/K9 sn SNSNSNSNSN call-history-mib retain-timer 500 call-history-mib max-size 500 hw-module pvdm 0/0 ! controller E1 0/0/0  pri-group timeslots 1-31 ! interface GigabitEthernet0/0  description Local Network  ip address 172.25.236.253 255.255.255.0  duplex auto  speed auto ! interface Serial0/0/0:15  description ISDN Access to PSTN  no ip address  encapsulation hdlc  isdn switch-type primary-net5  isdn incoming-voice voice  isdn send-alerting  isdn sending-complete  no cdp enable ! ip route 0.0.0.0 0.0.0.0 172.25.236.1 ! control-plane ! voice-port 0/0/0:15  cptone TR  bearer-cap Speech ! dial-peer voice 100 voip  description Inbound from CUCM  session protocol sipv2  incoming called-number 0T  voice-class codec 1    dtmf-relay rtp-nte  no vad ! dial-peer voice 110 voip  description Outboud to CUCM Sub  preference 5  destination-pattern 5...  session protocol sipv2  session target ipv4:172.30.100.228  voice-class codec 1    voice-class sip options-keepalive  dtmf-relay rtp-nte  no vad ! dial-peer voice 120 voip  description Outboud to CUCM Pub  preference 6  destination-pattern 5...  session protocol sipv2  session target ipv4:172.30.100.227  voice-class codec 1    voice-class sip options-keepalive  dtmf-relay rtp-nte  no vad ! dial-peer voice 200 pots  description Outbound E1 PRI  translation-profile outgoing OUTGOING-PRI  destination-pattern 0T  progress_ind alert enable 8  progress_ind progress enable 8  progress_ind connect enable 8  port 0/0/0:15  forward-digits all ! dial-peer voice 210 pots  description Inbound E1 PRI  translation-profile incoming INCOMING-PRI  incoming called-number ....  direct-inward-dial  port 0/0/0:15 ! dial-peer voice 300 pots  description Outbound E1 PRI Emergency SRST  translation-profile outgoing OUTGOING-PRI  destination-pattern 1..  port 0/0/0:15  forward-digits all ! sip-ua   registrar ipv4:172.25.236.253 expires 600 ! call-manager-fallback  secondary-dialtone 0  max-conferences 4 gain -6  transfer-system full-consult  timeouts interdigit 4  ip source-address 172.25.236.253 port 2000  max-ephones 10  max-dn 10 dual-line  system message primary SRST Mode is Active  transfer-pattern T  no huntstop  call-forward pattern .T  moh enable-g711 "flash0:music-on-hold.wav"  time-format 24  date-format dd-mm-yy | 
And that’s it, I can now really have a good peaceful night.


I enjoyed reading this post.
Thanks a lot.
This is an awesome solution. Thanks for posting
I see what you did there, nice work mate. Loving the diagram as well.