Passerelles VoIP patton SmartNodes
Configuration d'une passerelle Patton SmartNode 4634/4638/4131
Les passerelles patton SmartNodes (4634/4638/4131 etc.) sont des boîtiers autonomes pouvant servir de passerelle entre ISDN et SIP. Ils peuvent donc remplacer les cartes Digium B410P (idéal pour la virtualisation par exemple, puisqu'on a pas besoin de faire de PCI Passthrough)
Connecter le boitier au réseau
La première chose à faire est de connecter le boitier au réseau local. Ce boitier disposant de deux interfaces, il faut connecter le WAN sur votre réseau (eth0/0), qui récupérera la configuration réseau par DHCP. Attention, le port LAN (eth0/1) est en IP fixe (192.168.1.1), mais surtout, fournit du DHCP sur ce segment.
Après avoir identifiée l'adresse IP du patton, il faut se connecter sur l'interface web (http://<ip_du_boitier_>/). L'interface web étant quelque peu…… ce qu'elle est, il vaut mieux se contenter de l'utiliser pour faire des imports/exports de la configuration
En fonction du système utilisé (SmartWare ou Trinity), la configuration ne sera pas tout à fait la même
Configuration pour SmartWare
Configuration pour SmartWare
- config.cfg
#----------------------------------------------------------------#
# #
# SN4638/5BIS #
# R6.1 2012-07-17 H323 SIP BRI #
# 2012-12-04T13:34:26 #
# SN/00A0BA062720 #
# Generated configuration file #
# #
#----------------------------------------------------------------#
cli version 3.20
administrator administrator password YNMdFwK2XvHf0XXz7ZROdw== encrypted
clock local default-offset +02:00
webserver port 80 language en
sntp-client
sntp-client server primary 88.190.12.250 port 123 version 4
system
ic voice 0
system
clock-source 1 bri 0 0
clock-source 2 bri 0 1
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
fax transmission 1 relay t38-udp
profile pstn default
profile sip default
no autonomous-transitioning
profile aaa default
method 1 local
method 2 none
context ip router
interface IF_IP_WAN
ipaddress dhcp
tcp adjust-mss rx mtu
tcp adjust-mss tx mtu
context cs switch
national-prefix 0
international-prefix 00
routing-table called-e164 RT_ISDN_TO_SIP
route T dest-interface IF_SIP
routing-table calling-e164 RT_SIP_TO_ISDN
route default dest-service SV_HUNT_ISDN strip_pref
mapping-table calling-e164 to calling-e164 strip_pref
map 0(033)?(.%) to \2
interface isdn IF_ISDN_0
route call dest-table RT_ISDN_TO_SIP
interface isdn IF_ISDN_1
route call dest-table RT_ISDN_TO_SIP
interface isdn IF_ISDN_2
route call dest-table RT_ISDN_TO_SIP
interface isdn IF_ISDN_3
route call dest-table RT_ISDN_TO_SIP
interface sip IF_SIP
bind context sip-gateway GW_SIP
route call dest-table RT_SIP_TO_ISDN
remote 192.168.10.1
service hunt-group SV_HUNT_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_ISDN_0
route call 2 dest-interface IF_ISDN_1
route call 3 dest-interface IF_ISDN_2
route call 4 dest-interface IF_ISDN_3
context cs switch
no shutdown
authentication-service AUTH_ASTERISK
realm 1 smartnode-gw
username patton password LgwK6EtOvBQScY1PLvUXmaZY9Ce4jbB2M+rsrzh3fnY= encrypted
location-service LS_ASTERISK
domain 1 smartnode-gw
identity-group default
authentication inbound
context sip-gateway GW_SIP
interface WAN
bind interface IF_IP_WAN context router port 5060
context sip-gateway GW_SIP
bind location-service LS_ASTERISK
no shutdown
port ethernet 0 0
medium auto
encapsulation ip
bind interface IF_IP_WAN router
no shutdown
port ethernet 0 1
medium 10 half
shutdown
port bri 0 0
clock auto
encapsulation q921
q921
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
bchan-number-order ascending
encapsulation cc-isdn
bind interface IF_ISDN_0 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
bchan-number-order ascending
encapsulation cc-isdn
bind interface IF_ISDN_1 switch
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
bchan-number-order ascending
encapsulation cc-isdn
bind interface IF_ISDN_2 switch
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
bchan-number-order ascending
encapsulation cc-isdn
bind interface IF_ISDN_3 switch
port bri 0 3
no shutdown
port bri 0 4
clock auto
encapsulation q921
q921
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side net
bchan-number-order ascending
port bri 0 4
shutdown
Configuration pour Trinity
Configuration pour Trinity
- config.cfg
#----------------------------------------------------------------#
# #
# Patton Electronics Company #
# SN4131/4BIS8VHP v1.8 (SmartNode 4131 VoIP Gateway) #
# S/N: 00A0BA0F19AC #
# Release: 3.15.3-19061 2019/05/16 #
# Generated configuration file #
# #
#----------------------------------------------------------------#
cli version 4.00
superuser admin password YNMdFwK2XvHf0XXz7ZROdw== encrypted
system hostname patton
clock local default-offset +02:00
profile aaa DEFAULT
method 1 local
method 2 none
console
use profile aaa DEFAULT
telnet-server
use profile aaa DEFAULT
no shutdown
ssh-server
use profile aaa DEFAULT
no shutdown
snmp-server
community public read-only
host 192.168.38.10 security-name public
no shutdown
web-server
protocol http port 80
protocol https port 443
use profile aaa DEFAULT
no shutdown
ntp
server pfsense.mornier.pro
no shutdown
system
clock-source 1 bri 0 0
clock-source 2 bri 0 1
clock-source 3 bri 0 2
clock-source 4 bri 0 3
profile napt NAPT_WAN
dns-server
relay dns-client
shutdown
profile tls DEFAULT
authentication incoming
authentication outgoing
private-key pki:private-key/DEFAULT
own-certificate 1 pki:certificate/DEFAULT
diffie-hellman-parameters pki:diffie-hellman-parameters/DEFAULT-2048
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 pstn DEFAULT
profile rip DEFAULT
profile sip DEFAULT
context ip ROUTER
interface IF_IP_WAN
ipaddress DHCP dhcp
use profile napt NAPT_WAN DHCP
routing-table DEFAULT
bgp
shutdown
rip
shutdown
nodems-client
resource any
shutdown
profile packetsmart DEFAULT
profile ppp DEFAULT
cwmp-client
session-retry-maximum 1
no shutdown
stun
shutdown
context cs SWITCH
national-prefix 0
international-prefix 00
no shutdown
mapping-table calling-e164 to calling-e164 strip_pref
map 0(033)?(.%) to \2
routing-table called-e164 RT_ISDN_TO_SIP
route T dest-interface IF_SIP
routing-table calling-e164 RT_SIP_TO_ISDN
route default dest-service SV_HUNT_ISDN strip_pref
interface isdn IF_ISDN_0
route call dest-table RT_ISDN_TO_SIP
interface isdn IF_ISDN_1
route call dest-table RT_ISDN_TO_SIP
interface isdn IF_ISDN_2
route call dest-table RT_ISDN_TO_SIP
interface isdn IF_ISDN_3
route call dest-table RT_ISDN_TO_SIP
interface sip IF_SIP
bind context sip-gateway GW_SIP
route call dest-table RT_SIP_TO_ISDN
remote 10.56.8.10 5060
service hunt-group SV_HUNT_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_ISDN_0
route call 2 dest-interface IF_ISDN_1
route call 3 dest-interface IF_ISDN_2
route call 4 dest-interface IF_ISDN_3
authentication-service AUTH_ASTERISK
realm 1 smartnode-gw
username patton password LgwK6EtOvBQScY1PLvUXmaZY9Ce4jbB2M+rsrzh3fnY= encrypted
location-service LS_ASTERISK
domain 1 192.168.10.1 5060
match-any-domain
identity-group default
authentication inbound
context sip-gateway GW_SIP
bind location-service LS_ASTERISK
interface WAN
transport-protocol udp+tcp 5060
no transport-protocol tls
bind ipaddress ROUTER IF_IP_WAN DHCP
context sip-gateway GW_SIP
no shutdown
sip-survivability
shutdown
port ethernet 0 0
bind interface ROUTER IF_IP_WAN
no shutdown
port bri 0 0
q921
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface SWITCH IF_ISDN_0
port bri 0 0
no shutdown
port bri 0 1
q921
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface SWITCH IF_ISDN_1
port bri 0 1
no shutdown
port bri 0 2
q921
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface SWITCH IF_ISDN_2
port bri 0 2
no shutdown
port bri 0 3
q921
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface SWITCH IF_ISDN_3
port bri 0 3
no shutdown
Dans ces exemples les paramètres importants sont :
pass interface web : m2p4PATTON (le login est administrator pour les SmartWare et admin pour les Trinity)
secret SIP pour le trunk patton (asterisk) : BNAIbc89124OLib2TCizbiCZ
ip asterisk : 192.168.10.1
ip patton (obtenue par DHCP) : 192.168.10.11
Créer un trunk dans FreePBX
Là encore, la configuration sera différente selon l'utilisation de la stack SIP chan_sip ou chan_pjsip sur Asterisk
chan_sip
Il faut ensuite créer un trunk dans FreePBX (un trunk SIP bien évidemment), dont les détails sont (à mettre dans la zone PEER DETAILS).
username=patton1
type=friend
secret=BNAIbc89124OLib2TCizbiCZ
qualify=300
insecure=very
host=192.168.10.11
dtmfmode=rcf2833
disallow=all
context=from-pstn
canreinvite=no
allow=alaw
chan_pjsip
Le trunk peut être créé en utilisant PJSIP :
Debug isdn
il est possible de debuguer les appels isdn, pour cela, il faut se connecter en telnet sur le boitier (login administrator et le même mot de passe que pour l'interface web), puis taper ces commandes:
enable
configure
debug context sip-gateway transport detail 1
debug context sip-gateway signaling detail 1
debug ccisdn signaling
enable
configure
debug sip-transport detail 1
debug sip-signaling detail 1
debug isdn-signaling
Configuration d'une passerelle Patton SmartNode 4614
La série SmartNode 461X permet de “convertir” des lignes analogiques en SIP. Le modèle 4614 par exemple dispose de 4 ports FXS.
Dans cet exemple:
La passerelle patton obtient ses paramètres réseau par DHCP. Le DHCP fournit l'IP 192.168.150.247
Le serveur Asterisk est 192.168.150.2
Le peer SIP est patton1 avec le mot de passe c4Y3GucUi2Nuk0h5L/6xIaGj
4 lignes analogiques sont connectées sur les ports FXO
Les 3 premiers ports (de 0 à 2) sont utilisés pour la voix, le numéro correspondant est 0501010101
Le dernier port (3) est utilisé pour le fax, le numéro correspondant est 0502020202
Voir le fichier de configuration
Voir le fichier de configuration
- patton.cfg
#----------------------------------------------------------------#
# #
# SN4114/JO/EUI #
# R6.3 2013-03-07 H323 SIP FXS FXO #
# 2013-04-30T13:36:14 #
# SN/00A0BA08FF0F #
# Generated configuration file #
# #
#----------------------------------------------------------------#
cli version 3.20
administrator administrator password m2p4PATTON
clock local default-offset +02:00
webserver port 80 language en
sntp-client
sntp-client server primary 0.pool.ntp.org port 123 version 4
system
ic voice 0
low-bitrate-codec g729
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 pstn default
profile sip default
no autonomous-transitioning
profile aaa default
method 1 local
method 2 none
context ip router
interface eth0
ipaddress dhcp
tcp adjust-mss rx mtu
tcp adjust-mss tx mtu
context cs switch
routing-table called-e164 RT_FXO_TO_SIP
route .T dest-interface IF_SIP
interface sip IF_SIP_CALL
bind context sip-gateway GW_SIP
route call dest-service SV_HUNT_FXO
remote 192.168.150.2
address-translation outgoing-call request-uri user-part fix 0501010101 host-part to-header target-param none
interface sip IF_SIP_FAX
bind context sip-gateway GW_SIP
route call dest-interface IF_FXO_3
remote 192.168.150.2
address-translation outgoing-call request-uri user-part fix 0502020202 host-part to-header target-param none
interface fxo IF_FXO_0
route call dest-interface IF_SIP_CALL
disconnect-signal loop-break
ring-number on-caller-id
dial-after timeout 1
interface fxo IF_FXO_1
route call dest-interface IF_SIP_CALL
disconnect-signal loop-break
ring-number on-caller-id
dial-after timeout 1
interface fxo IF_FXO_2
route call dest-interface IF_SIP_CALL
disconnect-signal loop-break
dial-after timeout 1
interface fxo IF_FXO_3
route call dest-interface IF_SIP_FAX
disconnect-signal loop-break
ring-number on-caller-id
dial-after timeout 1
service hunt-group SV_HUNT_FXO
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_FXO_0
route call 2 dest-interface IF_FXO_1
route call 3 dest-interface IF_FXO_2
route call 4 dest-interface IF_FXO_3
context cs switch
no shutdown
authentication-service AUTH_ASTERISK
realm 1 smartnode-gw
username patton1 password c4Y3GucUi2Nuk0h5L/6xIaGj
location-service LS_ASTERISK
domain 1 smartnode-gw
identity-group default
authentication inbound
identity patton
authentication inbound
registration outbound
register auto
context sip-gateway GW_SIP
interface IF_SIP_CALL
bind interface eth0 context router port 5060
interface IF_SIP_FAX
context sip-gateway GW_SIP
bind location-service LS_ASTERISK
no shutdown
port ethernet 0 0
medium auto
encapsulation ip
bind interface eth0 router
no shutdown
port fxo 0 0
use profile fxo us
encapsulation cc-fxo
bind interface IF_FXO_0 switch
no shutdown
port fxo 0 1
use profile fxo us
encapsulation cc-fxo
bind interface IF_FXO_1 switch
no shutdown
port fxo 0 2
use profile fxo us
encapsulation cc-fxo
bind interface IF_FXO_2 switch
no shutdown
port fxo 0 3
use profile fxo us
encapsulation cc-fxo
bind interface IF_FXO_3 switch
no shutdown
Le trunk correspondant serait:
username=patton1
type=friend
secret=c4Y3GucUi2Nuk0h5L/6xIaGj
qualify=300
insecure=very
host=192.168.150.247
dtmfmode=rcf2833
disallow=all
context=from-pstn
canreinvite=no
allow=alaw&ulaw
On peut maintenant créer des routes entrantes avec le DID 0501010101 ou 0502020202 pour envoyer les appels vers les modules souhaités