Приведу конфиг (ip и пароли взяты с потолка):
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname iad2430-24fxs
!
boot-start-marker
boot-end-marker
!
!
aaa new-model
!
!
!
aaa session-id common
clock timezone Moscow 4
!
!
ip domain name some-domain.ru
!
!
!
!
voice-card 0
!
!
!
!
!
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
sip
registrar server expires max 3600 min 3600
no call service stop
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 31.104.34.100 255.255.0.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
no ip http server
no ip http secure-server
!
ip forward-protocol nd
!
!
access-list 23 permit any log
dialer-list 1 protocol ip permit
!
!
!
!
control-plane
!
!
voice-port 2/0
caller-id enable
!
voice-port 2/1
!
voice-port 2/2
!
voice-port 2/3
!
voice-port 2/4
!
voice-port 2/5
!
voice-port 2/6
!
voice-port 2/7
!
voice-port 2/8
!
voice-port 2/9
!
voice-port 2/10
!
voice-port 2/11
!
voice-port 2/12
!
voice-port 2/13
!
voice-port 2/14
!
voice-port 2/15
!
voice-port 2/16
!
voice-port 2/17
!
voice-port 2/18
!
voice-port 2/19
!
voice-port 2/20
!
voice-port 2/21
!
voice-port 2/22
!
voice-port 2/23
!
!
!
!
dial-peer voice 1 pots
destination-pattern 9988
port 2/0
authentication username 9988 password xzxzxzxzxzxzxzx32666347343532054
!
dial-peer voice 1001 voip
destination-pattern .T
progress_ind progress enable 8
session protocol sipv2
session target ipv4:104.163.66.148:5060
codec g711alaw
!
sip-ua
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
registrar ipv4:104.163.66.148 expires 60
sip-server ipv4:104.163.66.148:5060
notify telephone-event max-duration 500
!
!
!
line con 0
line aux 0
line vty 0 4
access-class 23 in
exec-timeout 60 0
privilege level 15
password 7 zxxzxzxzxzxzxxzzx
logging synchronous
transport input ssh
!
ntp clock-period 17180023
ntp server 229.136.240.232 prefer
ntp server 229.136.240.231
end
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname iad2430-24fxs
!
boot-start-marker
boot-end-marker
!
!
aaa new-model
!
!
!
aaa session-id common
clock timezone Moscow 4
!
!
ip domain name some-domain.ru
!
!
!
!
voice-card 0
!
!
!
!
!
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
sip
registrar server expires max 3600 min 3600
no call service stop
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 31.104.34.100 255.255.0.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
no ip http server
no ip http secure-server
!
ip forward-protocol nd
!
!
access-list 23 permit any log
dialer-list 1 protocol ip permit
!
!
!
!
control-plane
!
!
voice-port 2/0
caller-id enable
!
voice-port 2/1
!
voice-port 2/2
!
voice-port 2/3
!
voice-port 2/4
!
voice-port 2/5
!
voice-port 2/6
!
voice-port 2/7
!
voice-port 2/8
!
voice-port 2/9
!
voice-port 2/10
!
voice-port 2/11
!
voice-port 2/12
!
voice-port 2/13
!
voice-port 2/14
!
voice-port 2/15
!
voice-port 2/16
!
voice-port 2/17
!
voice-port 2/18
!
voice-port 2/19
!
voice-port 2/20
!
voice-port 2/21
!
voice-port 2/22
!
voice-port 2/23
!
!
!
!
dial-peer voice 1 pots
destination-pattern 9988
port 2/0
authentication username 9988 password xzxzxzxzxzxzxzx32666347343532054
!
dial-peer voice 1001 voip
destination-pattern .T
progress_ind progress enable 8
session protocol sipv2
session target ipv4:104.163.66.148:5060
codec g711alaw
!
sip-ua
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
registrar ipv4:104.163.66.148 expires 60
sip-server ipv4:104.163.66.148:5060
notify telephone-event max-duration 500
!
!
!
line con 0
line aux 0
line vty 0 4
access-class 23 in
exec-timeout 60 0
privilege level 15
password 7 zxxzxzxzxzxzxxzzx
logging synchronous
transport input ssh
!
ntp clock-period 17180023
ntp server 229.136.240.232 prefer
ntp server 229.136.240.231
end
А теперь, что нам говорит про это астериск:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
asterisk*CLI> core show version
Asterisk 1.8.11.1 built by root @ asterisk on a x86_64 running Linux
asterisk*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
200/200 31.104.34.2 D N 5060 Unmonitored
201/201 31.104.34.2 D N 5060 Unmonitored
202/202 31.104.34.2 D N 5060 Unmonitored
203/203 31.104.34.2 D N 5060 Unmonitored
210/210 31.104.34.1 D N 5060 Unmonitored
211/211 31.104.34.1 D N 5060 Unmonitored
212/212 31.104.34.3 D N 5060 Unmonitored
213/213 31.104.34.3 D N 5060 Unmonitored
216/216 31.104.34.4 D N 5060 Unmonitored
217/217 31.104.34.4 D N 5060 Unmonitored
218/218 31.104.34.5 D N 5060 Unmonitored
219/219 31.104.34.5 D N 5060 Unmonitored
9988/9988 31.104.34.100 D N 57496 Unmonitored
13 sip peers [Monitored: 0 online, 0 offline Unmonitored: 13 online, 0 offline]
Asterisk 1.8.11.1 built by root @ asterisk on a x86_64 running Linux
asterisk*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
200/200 31.104.34.2 D N 5060 Unmonitored
201/201 31.104.34.2 D N 5060 Unmonitored
202/202 31.104.34.2 D N 5060 Unmonitored
203/203 31.104.34.2 D N 5060 Unmonitored
210/210 31.104.34.1 D N 5060 Unmonitored
211/211 31.104.34.1 D N 5060 Unmonitored
212/212 31.104.34.3 D N 5060 Unmonitored
213/213 31.104.34.3 D N 5060 Unmonitored
216/216 31.104.34.4 D N 5060 Unmonitored
217/217 31.104.34.4 D N 5060 Unmonitored
218/218 31.104.34.5 D N 5060 Unmonitored
219/219 31.104.34.5 D N 5060 Unmonitored
9988/9988 31.104.34.100 D N 57496 Unmonitored
13 sip peers [Monitored: 0 online, 0 offline Unmonitored: 13 online, 0 offline]