The configuration file below is tested between the Patton SmartNode SN4970/1E15V and the 2Degrees hosted VoIP platform. 


Features:

  • SIP peering topology
  • Strips incoming called (i.e. destination) digits to a maximum of 8
  • Adheres to P-Asserted-Identity, privacy & diversion headers
  • NZ progress & ringing tones
  • Fax pass-through via G.711


NOTE: this configuration assumes there is an IP firewall for access control. If not see our other notes in our KB on how to set this up on the SmartNode itself using ACL rules.


 

cli version 3.20
clock local default-offset +12:00
dns-client server 192.168.1.254
dns-relay
webserver port 80 language en
sntp-client
sntp-client server primary nz.pool.ntp.org port 123 version 4
system hostname SNAP_ISDN_GW

system

  ic voice 0

profile r2 default

profile service-policy SNAP_SIP_QoS
  no rate-limit
  set ip dscp 46

profile ppp default

profile call-progress-tone NZ_Dialtone
  play 1 5000 400 -15

profile call-progress-tone NZ_Alertingtone
  play 1 400 400 -15 450 -15
  pause 2 200
  play 3 400 400 -15 450 -15
  pause 4 2000

profile call-progress-tone NZ_Busytone
  play 1 500 400 -15
  pause 2 500

profile call-progress-tone NZ_SDTone
  play 1 10000 425 -19 620 -19

profile call-progress-tone NZ_Callwaiting
  play 1 200 400 -15
  pause 2 200

profile call-progress-tone NZ_Releasetone
  play 1 250 400 -15
  pause 2 250

profile tone-set default
profile tone-set NZ
  map call-progress-tone dial-tone NZ_Dialtone
  map call-progress-tone ringback-tone NZ_Alertingtone
  map call-progress-tone busy-tone NZ_Busytone
  map call-progress-tone waiting-tone NZ_Callwaiting
  map call-progress-tone release-tone NZ_Releasetone
  map call-progress-tone congestion-tone NZ_Releasetone

profile voip default
  codec 1 g711alaw64k rx-length 20 tx-length 20 no-silence-suppression
  codec 2 g711ulaw64k rx-length 20 tx-length 20 no-silence-suppression
  rtp traffic-class local-default
  fax transmission 1 bypass g711alaw64k rx-length 10 tx-length 10
  fax redundancy low-speed 1 high-speed 2
  fax volume -9.0
  modem transmission 1 bypass g711alaw64k rx-length 10 tx-length 10

profile pstn default

profile sip default
  no autonomous-transitioning

profile aaa default
  method 1 local
  method 2 none

context ip router
  rtp-port-range 35000 45000

  interface WAN
    ipaddress 192.168.1.1 255.255.255.0
    use profile service-policy SNAP_SIP_QoS in
    use profile service-policy SNAP_SIP_QoS out
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

context ip router
  route 0.0.0.0 0.0.0.0 192.168.1.254 1

context cs switch

  routing-table called-e164 SIP_TO_ISDN
    route default dest-service ISDN_HUNT_GRP 8DIGITS

  routing-table called-e164 ISDN_TO_SIP
    route default dest-interface SNAP_SIP_IF MAP

  mapping-table called-e164 to called-e164 8DIGITS
    map .%(........) to \1

  mapping-table calling-pi to calling-pi MAP-PI
    map allowed to allowed
    map restricted to restricted
    map interworking to interworking
    map default to allowed

  mapping-table calling-si to calling-si MAP-SI
    map default to network

  complex-function MAP
    execute 1 MAP-PI
    execute 2 MAP-SI

  interface isdn ShoreTel_IF
    route call dest-table ISDN_TO_SIP
    call-reroute accept
    call-reroute emit
    diversion accept
    diversion emit
    dtmf-dialing
    use profile tone-set NZ
    caller-name

  interface sip SNAP_SIP_IF
    bind context sip-gateway SNAP_SIP_GW
    route call dest-table SIP_TO_ISDN
    remote 123.255.8.182 5060
    hold-method direction-attribute sendonly
    early-disconnect
    privacy
    address-translation incoming-call calling-name from-header
    address-translation incoming-call calling-redir diversion-header
    address-translation incoming-call called-e164 to-header
    address-translation incoming-call called-uri to-header
    use profile tone-set NZ

  service hunt-group ISDN_HUNT_GRP
    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
    route call 1 dest-interface ShoreTel_IF

context cs switch
  no shutdown

context sip-gateway SNAP_SIP_GW

  interface SNAP_SIP_GW
    bind interface WAN context router port 5060

context sip-gateway SNAP_SIP_GW
  no shutdown

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

port e1t1 0 0
  port-type e1
  clock master
  framing crc4
  encapsulation q921

  q921
    uni-side net
    encapsulation q931

    q931
      protocol dss1
      uni-side net
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface ShoreTel_IF switch

port e1t1 0 0
  no shutdown