SmartNode PSTN trunk gateway for Asterisk IP-PBX
Posted by , Last modified by Daniel Lizaola on 14 December 2017 04:27 PM

Configuration Description

PSTN trunk gateway for Aserisk IP-PBX application

 

Command sequence to copy, edit and paste

#----------------------------------------------------------------#
#                                                                #
# Patton SmartNode SN46XX                                        #
# SWR5.X                                                         #
#                                                                #
# PSTN trunk gateway for Aserisk IP-PBX application              #
#                                                                #
# DATE:   2010-06-01                                             #
# AUTHOR: Thomas Tlapak                                          #
#         PATTON-INALP-NETWORKS; CH-3172 NIEDERWANGEN            #
#         WWW.PATTON.COM    WWW.INALP.COM                        #
#                                                                #
#----------------------------------------------------------------#

cli version 3.20
clock local default-offset +02:00
dns-relay
webserver port 80 language en
sntp-client
sntp-client server primary 129.132.2.21 port 123 version 4

system

  ic voice 0
    low-bitrate-codec g729

system
  clock-source 1 bri 0 0

profile ppp default

profile tone-set default

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


profile sip default
  no autonomous-transitioning

profile dhcp-server DHCPS_LAN
  network 192.168.1.0 255.255.255.0
  include 1 192.168.1.10 192.168.1.99
  lease 2 hours
  default-router 1 192.168.1.1
  domain-name-server 1 192.168.1.1

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface IF_WAN
    ipaddress dhcp
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

  interface IF_LAN
    ipaddress 192.168.1.1 255.255.255.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

context ip router
  dhcp-server use profile DHCPS_LAN

context cs switch

  routing-table called-e164 RT_IN
    route .T2 dest-interface IF_SIP

  interface isdn IF_ISDN_00
    route call dest-table RT_IN
    isdn-date-time

  interface isdn IF_ISDN_01
    route call dest-table RT_IN
    isdn-date-time

  interface isdn IF_ISDN_02
    route call dest-table RT_IN
    isdn-date-time

  interface isdn IF_ISDN_03
    route call dest-table RT_IN
    isdn-date-time

  interface sip IF_SIP
    bind context sip-gateway GW_SIP
    route call dest-service SER_HUNT_PSTN
# enter the remote IP of Asterisk PBX below
    remote <remote IP>
    privacy

  service hunt-group SER_HUNT_PSTN
    cyclic
    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 IF_ISDN_00
    route call 2 dest-interface IF_ISDN_01
    route call 3 dest-interface IF_ISDN_02
    route call 4 dest-interface IF_ISDN_03

context cs switch
  no shutdown

context sip-gateway GW_SIP

  interface IF_GWSIP
    bind interface IF_WAN context router port 5060

context sip-gateway GW_SIP
  no shutdown

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

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

port bri 0 0
  clock auto
  power-feed
  encapsulation q921

  q921
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      encapsulation cc-isdn
      bind interface IF_ISDN_00 switch

port bri 0 0
  no shutdown

port bri 0 1
  clock auto
  encapsulation q921

  q921
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      encapsulation cc-isdn
      bind interface IF_ISDN_01

port bri 0 1
  no shutdown

port bri 0 2
  clock auto
  encapsulation q921

  q921
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      encapsulation cc-isdn
      bind interface IF_ISDN_02

port bri 0 2
  no shutdown

port bri 0 3
  clock auto
  encapsulation q921

  q921
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      encapsulation cc-isdn
      bind interface IF_ISDN_03

port bri 0 3
  no shutdown

(8748 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).