Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

История изменений [назад]

нажмите, чтобы скрыть/показать версии 1
изначальная версия
редактировать

ответил 2012-04-23 19:05:54 +0400

Master135 Gravatar Master135

Вообщем надо сделать так:

Current configuration:
!
version 8.51.002
!
hostname GS1002
clock timezone EST+2
!
username ****
username ****
!
interface Loopback0
 ip address 127.0.0.1 255.0.0.0
!
interface FastEthernet0/0
 ip address 10.5.5.252 255.255.255.0
 speed auto
 no qos-control
!
interface FastEthernet0/1
 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 10.5.5.1 10
!
http server
!
dns name-server 10.5.5.1
dns name-server 8.8.8.8
logging command
logging event 4-warning
logging on
!
! VoIP configuration. 
! 
! Voice service voip configuration. 
! 
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 
voice-port 0/0 
 connection plar 881 
 ring detect-timeout 40 
 caller-id enable 
 caller-id type etsi 
! 
! GSM 
voice-port 0/1 
 connection plar 882 
 ring detect-timeout 40 
 caller-id enable 
 caller-id type etsi 
! 
! service port group configuration. 
! 
! Pots peer configuration. 
! 
dial-peer voice 1 pots
 **destination-pattern .T** 
 port 0/0
 user-name 881
 user-password 881
! 
dial-peer voice 2 pots
 **destination-pattern .T** 
 port 0/1 
 user-name 882
 user-password 882
! 
! Voip peer configuration. 
! 
dial-peer voice 100 voip 
 **destination-pattern 88T**  -- именно так!!!
 session target sip-server  
 session protocol sip 
 voice-class codec 0 
 no vad
 dtmf-relay rtp-2833 
! 
dial-peer call-hold h 
dial-peer call-transfer h 
! 
gatekeeper
! 
! Gateway configuration. 
! 
gateway 
 h323-id voip.10.5.5.252 
 ignore-msg-from-other-gk
! 
! Codec classes configuration. 
! 
voice class codec 0 
 codec preference 1 g711alaw 
 codec preference 2 g711ulaw 
 codec preference 3 g729 
 codec preference 4 g7231r53 
 codec preference 5 g726r16 
 codec preference 6 g726r32 
! 
! SIP UA configuration. 
! 
sip-ua 
 user-register 
 sip-server 10.5.5.253
 register e164 
! 
! Tones 
!
line console
!
line vty
!
gsm dev-restart-by-unreg 300
!
gsm 0/0
 sms-language utf8
!
gsm 0/1
 sms-language utf8
!
end

настройки asterisk sip.conf

[881]
type=friend
secret=881
context=dph
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw

[882]
type=friend
secret=882
context=dph
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw

Вообщем надо сделать так:

Current configuration:
!
version 8.51.002
!
hostname GS1002
clock timezone EST+2
!
username ****
username ****
!
interface Loopback0
 ip address 127.0.0.1 255.0.0.0
!
interface FastEthernet0/0
 ip address 10.5.5.252 255.255.255.0
 speed auto
 no qos-control
!
interface FastEthernet0/1
 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 10.5.5.1 10
!
http server
!
dns name-server 10.5.5.1
dns name-server 8.8.8.8
logging command
logging event 4-warning
logging on
!
! VoIP configuration. 
! 
! Voice service voip configuration. 
! 
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 
voice-port 0/0 
 connection plar 881 
 ring detect-timeout 40 
 caller-id enable 
 caller-id type etsi 
! 
! GSM 
voice-port 0/1 
 connection plar 882 
 ring detect-timeout 40 
 caller-id enable 
 caller-id type etsi 
! 
! service port group configuration. 
! 
! Pots peer configuration. 
! 
dial-peer voice 1 pots
 **destination-pattern .T** 
destination-pattern .T
 port 0/0
 user-name 881
 user-password 881
! 
dial-peer voice 2 pots
 **destination-pattern .T** 
destination-pattern .T
 port 0/1 
 user-name 882
 user-password 882
! 
! Voip peer configuration. 
! 
dial-peer voice 100 voip 
 **destination-pattern 88T** destination-pattern 88T  -- именно так!!!
 session target sip-server  
 session protocol sip 
 voice-class codec 0 
 no vad
 dtmf-relay rtp-2833 
! 
dial-peer call-hold h 
dial-peer call-transfer h 
! 
gatekeeper
! 
! Gateway configuration. 
! 
gateway 
 h323-id voip.10.5.5.252 
 ignore-msg-from-other-gk
! 
! Codec classes configuration. 
! 
voice class codec 0 
 codec preference 1 g711alaw 
 codec preference 2 g711ulaw 
 codec preference 3 g729 
 codec preference 4 g7231r53 
 codec preference 5 g726r16 
 codec preference 6 g726r32 
! 
! SIP UA configuration. 
! 
sip-ua 
 user-register 
 sip-server 10.5.5.253
 register e164 
! 
! Tones 
!
line console
!
line vty
!
gsm dev-restart-by-unreg 300
!
gsm 0/0
 sms-language utf8
!
gsm 0/1
 sms-language utf8
!
end

настройки asterisk sip.conf

[881]
type=friend
secret=881
context=dph
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw

[882]
type=friend
secret=882
context=dph
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.