Passerelles VoIP patton SmartNodes

Configuration d'une passerelle Patton SmartNode 4634/4638

Les passerelles Patton 4634/4638 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 du 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 interfraces, il faut connecter la patte WAN sur votre réseau (eth0/0), qui récupèrera la configuration réseau par DHCP. Attention, la patte LAN est en IP fixe (192.168.1.1), mais surtout, fournit du DHCP sur ce segment (donc, vaut mieux pas brancher la patte LAN sur votre réseau, vous risquez les petites joyeusetés d'avoir deux DHCP sur un segment )

Après avoir identifié l'adresse de votre 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 Voici un exemple de configuration de base, qui active 4 T0

#----------------------------------------------------------------# # # # 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 identity BNAIbc89124OLib2TCizbiCZ 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

Dans cet exemple, voilà les paramètres importants:

pass interface web: m2p4PATTON

secret (asterisk): BNAIbc89124OLib2TCizbiCZ

ip asterisk: 192.168.10.1

Créer un trunk dans FreePBX

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

En admettant que le boitier patton ait obtenu l'IP 192.168.10.11 par le DHCP (il est d'ailleurs recommandé de lui fixer une IP par votre DHCP, ou de lui mettre une IP fixe directement)

Debug isdn

il est possible de debuguer les apels 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

Sur les dernières version, les commandes “context” ne sont pas reconnues.

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

#----------------------------------------------------------------# # # # 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

Configuration d'une passerelle Patton SmartNode 4131

Dans cet exemple:

La passerelle patton obtient ses paramètres réseau par DHCP.

Le serveur Asterisk est 10.56.8.10

Le peer SIP est patton avec un mot de passe chiffré

#----------------------------------------------------------------# # # # 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 profile aaa DEFAULT method 1 local method 2 none console use profile aaa DEFAULT telnet-server use profile aaa DEFAULT 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 CZY0Fth8WxWPmIqifR/s3IX+tuEXUfQeB0Dmz4PcGLkx3dk8/C7P/A== encrypted location-service LS_ASTERISK domain 1 10.56.8.10 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 protocol pmp uni-side auto q931 protocol dss1 uni-side user max-calls 2 channel-range 0 1 bind interface IF_ISDN_0 IF_ISDN_0 port bri 0 0 no shutdown port bri 0 1 q921 protocol pmp uni-side auto q931 protocol dss1 uni-side user max-calls 2 channel-range 0 1 bind interface IF_ISDN_1 IF_ISDN_1 port bri 0 1 no shutdown port bri 0 2 q921 protocol pmp uni-side auto q931 protocol dss1 uni-side user max-calls 2 channel-range 0 1 bind interface IF_ISDN_2 IF_ISDN_2 port bri 0 2 no shutdown port bri 0 3 q921 protocol pmp uni-side auto q931 protocol dss1 uni-side user max-calls 2 channel-range 0 1 bind interface IF_ISDN_3 IF_ISDN_3 port bri 0 3 shutdown

Le trunk correspondant serait :