Спасибо помогло
вот что у меня вышло
Код:
!
version 8.51.002
!
hostname GS1002
!
username root password router administrator !юзер и пароль супер юзера
username guest password guest user ! юзер и пароль
!
!
interface Loopback0
ip address 127.0.0.1 255.0.0.0
!
interface FastEthernet0/0 ! интерфейс LAN0 (WAN) Internet
ip address 192.168.1.10 255.255.255.0
speed auto
no qos-control
!
interface FastEthernet0/1 ! интерфейс LAN1 (LAN) Local
ip address 192.168.10.1 255.255.255.0
speed auto
no qos-control
!
ip route 0.0.0.0 0.0.0.0 192.168.1.1 10 ! маршрут по умолчанию
!
!
!
!
http server
!
dns name-server 8.8.8.8 ! днс сервер
dns name-server 192.168.1.1
logging command
logging event 4-warning
logging host server ip 192.168.1.2
logging on
!
!
!
!
!
! VoIP configuration.
!
!
! Voice service voip configuration.
! Раздел настроек VOIP
voice service voip
protocol sip ! протокол
dtmf-relay out-of-band
fax protocol t38 redundancy 0
fax rate 9600
h323 call start fast
h323 call tunnel enable
no call-barring unconfigured-ip-address
no voip-inbound-call-barring enable
!
!
! Voice port configuration.
! Раздел настроек портов (GSM,FXO,FXS)
! GSM
voice-port 0/0 ! порт GSM1
connection plar 201 ! номер на который будет отправлен звонок при входящем вызове на GSM1 , звонок попадет на номер 201
no caller-id enable ! выкл. определителя номера АОН
!
!
! GSM
voice-port 0/1
connection plar 202
no caller-id enable
!
!
! FXO
voice-port 0/2 ! Порт FXO1
connection plar 203 ! номер на который будет отправлен звонок при входящем вызове на FXO1 , звонок попадет на номер 203
no caller-id enable
!
!
! FXO
voice-port 0/3
connection plar 204
no caller-id enable
!
!
!
!
! service port group configuration.
!
!
!
! Pots peer configuration.
! Настройки привязки СИП юзеров к портам
dial-peer voice 1 pots
destination-pattern 01T ! пропускаем только начинающейся на 01
port 0/0 ! порт к которому привязать
user-name gsm1 ! СИП юзер
user-password gsm1pass ! СИП пароль
translate-outgoing called-number 1 ! используем правило замены из translation rules 1
!
dial-peer voice 2 pots
destination-pattern 02T
port 0/1
user-name gsm2
user-password gsm2pass
translate-outgoing called-number 2
!
dial-peer voice 3 pots
destination-pattern 03T ! пропускаем только номера начинающейся на 03
port 0/2 ! порт в addpac
user-name fxo1 ! юзер для порта FXO1 (0/2)
user-password fxo1pass ! пароль для порта FXO2 (0/2)
translate-outgoing called-number 3 ! использовать правило замены набранного номера (Translation rules)
!
dial-peer voice 4 pots
destination-pattern 04T ! пропускаем только номера которые начинаются с 04
port 0/3 ! порт в addpac
user-name fxo2 ! юзер для порта FXO2 (0/3)
user-password fxo2pass ! пароль для порта FXO2 (0/3)
translate-outgoing called-number 4 ! использовать правило замены набранного номера (Translation rules)
!
!
!
! Voip peer configuration.
! Назначаем исходящий маршрут в сторону SIP срвера
!
dial-peer voice 0 voip
destination-pattern T ! пропускаем любые цифры
session target sip-server ! на сип сервер который настроили в SIP-UA
session protocol sip ! протокол (SIP/H.323)
voice-class codec 1 ! устанавливаем класс кодеков
no vad ! выключаем детектор голоса
dtmf-relay rtp-2833 ! устанавливаем DTMF RFC-2833
!
!
!
dial-peer call-hold h
!
dial-peer hunt 2
!
!
gatekeeper
!
!
! Gateway configuration.
!
gateway
h323-id voip.192.168.1.10
no ignore-msg-from-other-gk
!
!
! Codec classes configuration.
! параметры кодеков и приоритет
voice class codec 1
codec preference 1 g729
codec preference 2 g711alaw
codec preference 3 g711ulaw
!
!
!
! Translation Rule configuration.
! удаляем первые 2 цифры (01,02,03,04 префикс) перед отправкой вызова в GSM или FXO порт
translation-rule 1
rule 0 01T T
!
translation-rule 2
rule 0 02T T
!
translation-rule 3
rule 0 03T T
!
translation-rule 4
rule 0 04T T
!
!
!
! SIP UA configuration. Настройки сип Сервера
!
sip-ua
user-register ! включить регистрацию юзеров
sip-server 109.110.188.171 ! ип адрес сервера
called-party-number to-field
remote-party-id
register e164 ! регистрировать на сервере юзера из pots
!
!
! Tones
!
!
!
!
line console
!
line vty
!
gsm dev-restart-by-unreg 300
!
gsm 0/0
sms-language utf8
!
gsm 0/1
sms-language utf8
!
end