Child pages
  • Patton 4524 Time of Day and Day of Week Routing
Skip to end of metadata
Go to start of metadata

This is an example that assumes the following:

You are in US, New York Timezone. You are using all 4 FXO ports. You want the gateway to auto send the calls to a hunt group (300) from 8:30am-5:00pm during the work week but want them to go to your Auto Attendant (100) at all other times.

The Auto DST-RULES are good through Fall 2016. The example below is marked up for you to be able to adapt it your your environment and is taken from a working example at one of our customer sites.

#----------------------------------------------------------------#
#                                                                #
# SN4524/JO/EUI                                                  #
# R5.8 2011-09-05 H323 SIP FXS FXO                               #
# 2011-12-09T09:30:39                                            #
# SN/00A0BA02D98C                                                #
# Generated configuration file                                   #
#                                                                #
#----------------------------------------------------------------#

cli version 3.20
clock local default-offset -05:00
# this assumes your time zone is USA, New York. You can replace your clock offset to refelct your timezone and your DST start/stop date and times
clock local dst-rule SPRING2011 -04:00 from 02:00 mar 13rd 2011 until 03:00 nov 6th 2011
clock local dst-rule SPRING2012 -04:00 from 02:00 mar 11st 2012 until 03:00 nov 4th 2012
clock local dst-rule SPRING2013 -04:00 from 02:00 mar 10th 2013 until 03:00 nov 3rd 2013
clock local dst-rule SPRING2014 -04:00 from 02:00 mar 9th 2014 until 03:00 nov 2nd 2014
clock local dst-rule SPRING2015 -04:00 from 02:00 mar 8th 2015 until 03:00 nov 1st 2015
clock local dst-rule SPRING2016 -04:00 from 02:00 mar 13rd 2016 until 03:00 nov 6th 2016
dns-client server 192.168.0.16
webserver port 80 language en
sntp-client
#replace NTP1 and NTP2 with your networks preferred NTP ip addresses
sntp-client server primary NTP1 port 123 version 4
sntp-client server secondary NTP2 port 123 version 4
sntp-client local-clock-offset
#replace fxo1.sipdomain.tld with the hostname of this device for your network
system hostname fxo1.sipdomain.tld

system

  ic voice 0
    low-bitrate-codec g729

profile ppp default

profile call-progress-tone US_Dialtone
  play 1 1000 350 -13 440 -13

profile call-progress-tone US_Alertingtone
  play 1 2000 440 -19 480 -19
  pause 2 4000

profile call-progress-tone US_Busytone
  play 1 500 480 -24 620 -24
  pause 2 500

profile tone-set default
profile tone-set US
  map call-progress-tone dial-tone US_Dialtone
  map call-progress-tone ringback-tone US_Alertingtone
  map call-progress-tone busy-tone US_Busytone
  map call-progress-tone release-tone US_Busytone
  map call-progress-tone congestion-tone US_Busytone

profile voip default
  codec 1 g711alaw64k rx-length 20 tx-length 20
  codec 2 g711ulaw64k rx-length 20 tx-length 20

profile pstn default
  
profile sip default
  no autonomous-transitioning

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface LAN
#replace the ip address and mask with the one you will be using for your device
    ipaddress 1.2.3.4 255.255.255.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

context ip router
#replace the address 5.6.7.8 with the device real gateway ip address
  route 0.0.0.0 0.0.0.0 5.6.7.8 0

context cs switch
  digit-collection timeout 3

  routing-table called-e164 SIP_TO_ISDN
    route default dest-service OUTBOUND
	
  routing-table day-of-week RT_DATE
    route saturday dest-interface IF-SIP1 MAP_WEEKEND
    route sunday dest-interface IF-SIP1 MAP_WEEKEND
    route default dest-table RT_TOD

  routing-table time RT_TOD
    route default dest-interface IF-SIP1 MAP_WEEKEND
#change this time to reflect your actual office hours
    route 08:30:00-17:30:00 dest-service HUNT1

  mapping-table time to called-e164 MAP_WEEKEND
# outside og of the normal working, hours, specify the Auto Attendant you use to send calls for all other times, the default AA on sipx is 100
    map default to 100	

  interface sip IF_SIPX
    bind context sip-gateway GW-SIP
    route call dest-table SIP_TO_ISDN
# replace with your sipx hostname
    remote pbx.sipdomain.tld
# replace 300 with your hunt group number for daytime calls and pbx.sipdomain.tld with your sipx hostname
    address-translation outgoing-call to-header user-part fix 300 host-part fix pbx.sipdomain.tld

  interface fxo IF_FXO0
    route call dest-table RT_DATE
    route call dest-interface IF_SIPX
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 2
    mute-dialing
    use profile tone-set US

  interface fxo IF_FXO1
    route call dest-table RT_DATE
    route call dest-interface IF_SIPX
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 2
    mute-dialing
    use profile tone-set US

  interface fxo IF_FXO2
    route call dest-table RT_DATE
	route call dest-interface IF_SIPX
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 2
    mute-dialing
    use profile tone-set US

  interface fxo IF_FXO3
    route call dest-table RT_DATE
    route call dest-interface IF_SIPX
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 2
    mute-dialing
    use profile tone-set US

  service hunt-group OUTBOUND
    drop-cause normal-unspecified
    drop-cause no-circuit-channel-available
    drop-cause network-out-of-order
    drop-cause temporary-failure
    drop-cause switching-equipment-congestion
    drop-cause access-info-discarded
    drop-cause circuit-channel-not-available
    drop-cause resources-unavailable
    drop-cause user-busy
    route call 1 dest-interface IF_FXO3
    route call 2 dest-interface IF_FXO2
    route call 3 dest-interface IF_FXO1
    route call 4 dest-interface IF_FXO0

context cs switch
  no shutdown

location-service SIPX_SERVER
  domain 1 sipx.voice.mydomain.loc

context sip-gateway GW-SIP

  interface IF_SIPX
    bind interface LAN context router port 5060

context sip-gateway GW-SIP
  bind location-service SIPX_SERVER
  no shutdown

port ethernet 0 0
  medium auto
  encapsulation ip
  bind interface LAN router
  no shutdown

port ethernet 0 1
  medium 10 half
  shutdown

port fxo 0 0
  flash-hook-duration 50
  use profile fxo us
  caller-id format bell
  encapsulation cc-fxo
  bind interface IF_FXO0 switch
  no shutdown

port fxo 0 1
  flash-hook-duration 50
  use profile fxo us
  caller-id format bell
  encapsulation cc-fxo
  bind interface IF_FXO1 switch
  no shutdown

port fxo 0 2
  flash-hook-duration 50
  use profile fxo us
  caller-id format bell
  encapsulation cc-fxo
  bind interface IF_FXO2 switch
  no shutdown

port fxo 0 3
  flash-hook-duration 50
  use profile fxo us
  caller-id format bell
  encapsulation cc-fxo
  bind interface IF_FXO3 switch
  no shutdown
  • No labels