VoIP

SN4554 configuration example R5.4

SmartNode 4554 patton configuration Example R5.4

The following script can be used to configure SN4554 R5.4 firmware to be used with asterisk.
It manages 2 BRI ISDN ports, through 1 SIP account: PATTON register as client to ASTERISK (192.168.1.5) with username 101 and password 12311.
The outgoing calls should be dialed to 1* when they should be addressed to BRI 1, 2* where they should be addressed to BRI 2.



;asterisk sip.conf : Patton register on asterisk with account 101, password 12311
[101]
  type=friend
  context=default
  host=dynamic
  secret=12311
  nat=no
  insecure=port,invite
  disallow=all
  allow=alaw
  permit=192.168.1.128/255.255.255.0



The following configuration should be applicable to SmartNode R5.X, and was tried on firmware SmartNode R5.4 2009-09-22 SIP.



#----------------------------------------------------------------#
#                                                                #
# SN4554/2BIS/EUI                                                #
# R5.2 2009-01-14 SIP                                            #
# 1970-01-02T03:26:53                                            #
# SN/00A0BA049189                                                #
# Generated configuration file                                   #
#                                                                #
#----------------------------------------------------------------#

cli version 3.20
# administration: user admin, password 12311
administrator admin password D2F2A1lO9/8= encrypted
gui type basic
dns-relay
webserver port 80 language en
sntp-client
# NTP server which provide the current date/time
sntp-client server primary 192.168.1.5 port 123 version 4

system

  ic voice 0

system
  clock-source 1 bri 0 0
  clock-source 2 bri 0 1

profile acl ACL_WAN_PERMIT_SEL_MGMT

profile service-policy SP_WAN_OUT
  no rate-limit

profile service-policy SP_WAN_IN
  no rate-limit

profile napt NAPT_WAN

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 voip VOIP
  codec 1 g711alaw64k rx-length 20 tx-length 20
  codec 2 g711ulaw64k rx-length 20 tx-length 20
  dejitter-mode static
  dejitter-max-delay 120

profile pstn default

profile sip default

profile dhcp-server DHCPS_LAN

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface IF_IP_WAN
                #IP address defined statically
    ipaddress 192.168.1.128 255.255.255.0
                #ipaddress dhcp
    use profile napt NAPT_WAN
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

  interface IF_IP_LAN
    ipaddress unnumbered

subscriber ppp SUB_PPPOE
  dial in
  no multilink

context cs switch
        #Avoid trouble with early dial
        digit-collection timeout 8
        no digit-collection terminating-char
        #used to get the complete dialed number for incoming calls
        national-prefix 0
        international-prefix 00

  routing-table called-e164 RT_TO_SIP
                # Route all incoming calls to the SIP account 101
    route .%T dest-interface IF_SIP_SERVICE

        routing-table called-e164 DIAL_OUT
                # routing table for outgoing calls:
                # SIP/101/1456789 -> 456789 on ISDN IF_S0_00
                # SIP/101/2456789 -> 456789 on ISDN IF_S0_01
                route 1.% dest-interface IF_S0_00 STRIP_MAP
                route 2.% dest-interface IF_S0_01 STRIP_MAP
                route default dest-interface IF_S0_00

        #strip the first digit from outgoing calls
        mapping-table called-e164 to called-e164 STRIP_MAP
          map .(.%) to \1

  interface isdn IF_S0_00
    route call dest-table RT_TO_SIP

  interface isdn IF_S0_01
    route call dest-table RT_TO_SIP

  interface sip IF_SIP_SERVICE
    bind context sip-gateway GW_SIP
    route call dest-table DIAL_OUT
    remote 192.168.1.5
    early-connect
    early-disconnect

        #maybe this section is useless
  service hunt-group BOUND_ISDN
    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_S0_00
    route call 2 dest-interface IF_S0_01
                route default dest-interface IF_S0_00


context cs switch
  no shutdown

# define authentication to asterisk SIP account 101 with password 12311
authentication-service AUTH_SVC
  username 101 password 12311

# asterisk server with IP address 192.168.1.5
# patton registers to asterisk
location-service LOCATION_SVC
  domain 1 192.168.1.5
  identity 101
    authentication outbound
      authenticate 1 authentication-service AUTH_SVC username 101
    registration outbound
    registrar 192.168.1.5
    lifetime 3600
    register auto

context sip-gateway GW_SIP
  interface IF_SIP
    bind interface IF_IP_WAN context router port 5060

context sip-gateway GW_SIP
  bind location-service LOCATION_SVC
  no shutdown

port ethernet 0 0
  bind interface IF_IP_WAN router
  pppoe
    session SES_PPPOE
      shutdown

port ethernet 0 0
  no shutdown

port bri 0 0
  clock auto
  encapsulation q921

  q921
    permanent-layer2
    protocol pmp
                #protocol pp
    uni-side auto
    encapsulation q931

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

port bri 0 0
  no shutdown

port bri 0 1
  clock auto
  encapsulation q921

  q921
    permanent-layer2
    protocol pmp
                #protocol pp
    uni-side auto
    encapsulation q931

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

port bri 0 1
  no shutdown




Note: improvements and comments to this configuration script are welcome!

Other documentation


Created by: mesfet, Last modification: Mon 21 of Dec, 2009 (17:15 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+