Настройка связки ADDPAC AP200D <=> Asterisk
Голосовой шлюз ADDPAC AP200D имеет 2 FXO порта. Создадим в FreePBX 4 trunk-а примерно такого содержания:
Maximum channels: 1
Dial Rules: 91+.
Trunk Name: 5499051PEER Details:
host=dynamic
type=friend
username=5499051
secret=5499051_password
qualify=yes
context=from-trunk
Maximum channels: 1
Dial Rules: 92+.
Trunk Name: 5499052PEER Details:
host=dynamic
type=friend
username=5499052
secret=5499052_password
qualify=yes
context=from-trunk
USER Details во всех транках оставляем пустыми.
Теперь прошиваем шлюз прошивкой с поддержкой SIP и настраиваем его. Прошивку, а также руководство пользователя можно взять на сайте addpac.su, здесь я эти функции описывать не буду. Дальше после конфигурирования и перезагрузки должно получиться следующее:
sh run
! version 8.23I ! hostname fxo-pka140_1 ! ! no bridge spanning-tree ! dhcp-list 0 type server dhcp-list 0 address server interface ether0.0 dhcp-list 0 option dhcp-lease-time 600 ! dhcp-list 1 type server dhcp-list 1 address server 10.1.1.2 10.1.1.126 255.255.255.128 ! ! ip-share enable ip-share interface net-side ether0.0 ip-share interface local-side ether1.0 ! interface ether0.0 ip address 10.70.131.202 255.255.252.0 ! interface ether1.0 no ip address shutdown ! snmp name fxo-pka140_1 snmp enable-trap dn-register 300 ! no arp reset ! route 0.0.0.0 0.0.0.0 10.70.128.1 ! utilization cpu utilization ethernet ! ntp offset -3:00 ntp server 89.222.212.2 ! dnshost domain spnet.ru dnshost nameserver 89.222.212.129 ! ! ! ! ! ! ! ! VoIP configuration. ! ! ! Voice service voip configuration. ! voice service voip fax protocol bypass fax rate 9600 h323 call start fast h323 call channel early h323 call tunnel enable timeout tidt 2 ! ! ! Voice port configuration. ! ! FXO voice-port 0/0 connection plar 390 description 5499051 ring detect-timeout 50 ring detect-timer 500 caller-id enable caller-id type etsi caller-id name disable ! ! ! FXO voice-port 0/1 connection plar 390 description 5499052 ring detect-timeout 50 ring detect-timer 500 caller-id enable caller-id type etsi caller-id name disable ! ! ! ! ! Pots peer configuration. dial-peer voice 0 pots destination-pattern 91T port 0/0 forward-digits from 3 user-name 5499051 user-password 5499051_password ! dial-peer voice 1 pots destination-pattern 92T port 0/1 forward-digits from 3 user-name 5476860 user-password 5499052_password ! ! ! ! Voip peer configuration. ! dial-peer voice 2 voip destination-pattern T session target sip-server session protocol sip codec g711alaw dtmf-relay rtp-2833 no vad description pbx.spnet.ru fax protocol bypass fax rate 9600 ! ! ! ! ! ! ! Gateway configuration. ! gateway h323-id addpac-pka140_1 no ignore-msg-from-other-gk ! ! ! SIP UA configuration. ! ! sip-ua user-register sip-server pbx.spnet.ru remote-party-id register e164 ! ! ! MGCP configuration. ! mgcp dtmf-relay rtp-2833 codec g711alaw vad ! ! ! Tones voice class clear-down-tone 0 420 0 300 300 ! voice class clear-down-cadence 1 -5 500 500 3 11 ! ! !
У меня к данному шлюзу подключены входящие линии от двух разных АТС, обе линии имеют нестандартные тоны сигнала «ЗАНЯТО». Один из них я прописал через clear-down-tone, а другой через clear-down-cadence, т. к. сразу оба через одну функцию не получается прописать, точнее шлюз почему-то воспринимает только одну запись. Информацию по анализу сигнала «ЗАНЯТО» можно получить в статье «ADDPAC, детекция сигнала отбоя» (спасибо автору!).