Nemesi Labs

Xanio's blog

[WORK] – Isdn Telecom (Borchia NTplus) + Patton4552 + Freepbx

Mi sono trovato a dover configurare un patton 4552 per gestire una linea ISDN Telecom e un pbx Asterik basato su FreePbx (2.10.1).

Visto che ho perso molto tempo a trovare una configurazione funzionante che fosse il più standard e semplice possibile e che dirotti il traffico in ingresso direttamente al pbx e viceversa, adesso la metto in condivisione.

PARAMETRI:

router internet: 192.168.0.1

patton: WAN -> 192.168.0.253

patton: LAN -> 192.168.1.1

pbx: 192.168.0.254

CONFIGURAZIONE PATTON:

#----------------------------------------------------------------#
#                                                                #
# SN4552/2BIS/EUI                                                #
# R5.2 2009-07-09 SIP                                            #
# 2012-07-12T18:59:30                                            #
# SN/00A0BA059BFF                                                #
# Generated configuration file                                   #
#                                                                #
#----------------------------------------------------------------#

cli version 3.20
dns-relay
webserver port 80 language en
sntp-client
sntp-client server primary 129.132.2.21 port 123 version 4
system hostname Patton4552

system

  ic voice 0

profile napt NAPT_WAN

profile ppp default

profile call-progress-tone IT_DialTone
  play 1 200 425 -12
  pause 2 200
  play 3 600 425 -12
  pause 4 1000

profile call-progress-tone IT_Alertingtone
  play 1 1000 425 -12
  pause 2 4000

profile call-progress-tone IT_Busytone
  play 1 500 425 -12
  pause 2 500

profile call-progress-tone IT_Congestion
  play 1 200 425 -12
  pause 2 200

profile tone-set default
profile tone-set IT
  map call-progress-tone dial-tone IT_DialTone
  map call-progress-tone ringback-tone IT_Alertingtone
  map call-progress-tone busy-tone IT_Busytone
  map call-progress-tone release-tone IT_Busytone
  map call-progress-tone congestion-tone IT_Congestion

profile voip default
  codec 1 g711ulaw64k rx-length 20 tx-length 20
  codec 2 g711alaw64k rx-length 20 tx-length 20
  dejitter-max-delay 200

profile pstn default

profile sip default

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface WAN
    ipaddress 192.168.0.253 255.255.255.0
    use profile napt NAPT_WAN
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

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

context ip router
  route 0.0.0.0 0.0.0.0 192.168.0.1 1

context cs switch
  national-prefix 0
  international-prefix 00

  routing-table called-e164 RT_OUT
    route .%T dest-interface IF-TELECOM

  interface isdn IF-TELECOM
    route call dest-interface IF-ASTERISK
    use profile tone-set IT

  interface sip IF-ASTERISK
    bind context sip-gateway GW-ASTERISK
    route call dest-interface IF-TELECOM
    remote 192.168.0.254
    early-connect
    early-disconnect

context cs switch
  no shutdown

authentication-service AUTH_SVC
  realm 1 192.168.0.254
  username 1000 password PKpdK9MRazA= encrypted

location-service LOCATION_SVC
  domain 1 192.168.0.254 5060

  identity 1000
    display-name 1000
    phone-context from-pstn

    authentication outbound

    registration outbound
      registrar 192.168.0.254
      lifetime 3600
      register auto
      retry-timeout on-system-error 10
      retry-timeout on-client-error 10
      retry-timeout on-server-error 10

    call outbound
      proxy 1 192.168.0.254

context sip-gateway GW-ASTERISK

  interface WAN
    bind interface WAN context router port 5060

context sip-gateway GW-ASTERISK
  no shutdown

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

port ethernet 0 1
  bind interface LAN router
  no shutdown

port bri 0 0
  clock auto
  encapsulation q921

  q921
    permanent-layer2
    protocol pp
    uni-side user
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF-TELECOM 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 net
      bchan-number-order ascending
      encapsulation cc-isdn

port bri 0 1
  shutdown

Si rende noto che è stato creato un utente 1004 con password 1234, che dobbiamo usare per il trunk sip con il pbx.

Di seguito la configurazione del pbx

Creiamo un nuovo trunk sip e mettiamo come trunk name : patton_trunk e nella sezione peer il seguente codice

type=friend
username=1000
fromuser=1000
secret=1234
context=from-pstn
qualify=yes
insecure=very
host=192.168.0.253
disallow=all
allow=ulaw&alaw

importante e la sezione from-pstn che deve essere uguale a quella del patton.

Adesso decidete voi inbound e outbound route!

Good Hack

{lang: 'it'}
Category: Appunti, VoIP, Work

Your email address will not be published. Required fields are marked *

*


× tre = 15