Доброе время суток !
Небольшая проблема с сервером Asterisk - 4 SIP пира для городских линий и
около 6 шлюзов, разбросанных по офисам для абонентов. И с 2-мя у них, а именно,
SPA8000 возникают периодические проблемы старой и избитой односторонней слышимостью.
Asterisk (1.6.2.6) инсталлирован на Fedora (2.6.29.4-167.fc11.x86_64) имеет реальный
IP адрес. Шлюзы SPA8000 также имеют реальные IP-адреса. Проблем при входящих/исходящих
вызовах не возникает. Но изредка и с непредсказуемой периодичностью появляется односторонняя
слышимость при трансфере. Ниже [general] конфигурация Asterisk в файле sip.conf:
[general]
externip=78.24.78.252
context=default
allowguest=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
disallow=all
allow=alaw
allow=ulaw
allow=h261
allow=h263
allow=h263p
Конфигурация пира:
[7800937Jurl]
type=peer
secret=XXXXX
username=7800937Jurl
domain=kiev.farlep.ua
fromdomain=kiev.farlep.ua
fromuser=380487800937
host=vg1.vegatele.com
nat=no
canreinvite=no
t38pt_udptl=yes
context=incoming
insecure=invite
disallow=all
allow=alaw
allow=ulaw
Одного пользователя на шлюзе (она идентична всем проблемным 16-ти):
[501]
type=friend
host=dynamic
username=501
secret=XXX
dtmfmode=rfc2833
t38pt_udptl=yes
qualify=yes
nat=yes
canreinvite=no
sipreinvite=no
context=foreign_1622
callerid="user1" <501>
disallow=all
allow=alaw
allow=ulaw
callgroup=1
pickupgroup=1
Некоторые параметры на SPA8000:
NAT Mapping Enable: Yes - на всех 8-ми портах.
RTP Port Min: 10000
RTP Port Max: 20000 (Выставил в соответствии с значениями в rtp.conf)
RTP Packet Size: 0.020
Send Resp To Src Port: Yes (Рекомендации с какого-то сайта cisco)
Пробовал в настройках sip.conf убирать NAT (nat=no) - не помогло.
Дебаг полный к сожалению не могу выложить, так как успел
поймать только один раз проблему да и то "хвост".
Успел "поймать" только переключение с 501 на 502 (Простыня в самом низу письма):
Также получилось собрать TCPDump-ом rtp-сессию с "тишиной". Файлик можно забрать
ТУТ. Досадно, что трафик идёт от/до шлюза и от/до пира.
Но заметно - постоянно идут с шлюза и с пира на Asterisk сообщения "Port unreachable", хотя диапазон открыт и
IPTABLES выключен на время отладки. Оба SPA8000 подключены, Syslog-серверу, могу привести дебаг линий.
---
== Using SIP RTP CoS mark 5
== Using SIP VRTP CoS mark 6
Audio is at 78.24.78.252 port 13010
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 195.138.91.18:5061:
INVITE sip:502@195.138.91.18:5061 SIP/2.0
Via: SIP/2.0/UDP 78.24.78.252:5060;branch=z9hG4bK3284898e;rport
Max-Forwards: 70
From: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
To: <sip:502@195.138.91.18:5061>
Contact: <sip:977874501@78.24.78.252>
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.6
Date: Mon, 04 Oct 2010 16:47:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 287
v=0
o=root 1010608912 1010608912 IN IP4 78.24.78.252
s=Asterisk PBX 1.6.2.6
c=IN IP4 78.24.78.252
t=0 0
m=audio 13010 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
---
-- Called 502
<--- SIP read from UDP:195.138.91.18:5060 --->
SIP/2.0 200 OK
To: <sip:501@195.138.91.18:5060>;tag=7beeaec3583af3ai0
From: "977874501" <sip:977874501@78.24.78.252>;tag=as4d30d355
Call-ID: 05f37e922ff554f30c81c5466ba068bb@78.24.78.252
CSeq: 103 BYE
Via: SIP/2.0/UDP 78.24.78.252:5060;branch=z9hG4bK5ba04588
Content-Length: 0
<--- SIP read from UDP:195.138.91.18:5061 --->
SIP/2.0 100 Trying
To: <sip:502@195.138.91.18:5061>
From: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 102 INVITE
Via: SIP/2.0/UDP 78.24.78.252:5060;branch=z9hG4bK3284898e
Server: Linksys/SPA8000-5.1.10
Content-Length: 0
<--- SIP read from UDP:195.138.91.18:5061 --->
SIP/2.0 180 Ringing
To: <sip:502@195.138.91.18:5061>;tag=910b0bdabdb5a207i1
From: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 102 INVITE
Via: SIP/2.0/UDP 78.24.78.252:5060;branch=z9hG4bK3284898e
Server: Linksys/SPA8000-5.1.10
Remote-Party-ID: 502 <sip:502@78.24.78.252>;screen=yes;party=called
Content-Length: 0
<------------->
-- SIP/502-00000032 is ringing
<--- SIP read from UDP:195.138.91.18:5061 --->
SIP/2.0 200 OK
To: <sip:502@195.138.91.18:5061>;tag=910b0bdabdb5a207i1
From: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 102 INVITE
Via: SIP/2.0/UDP 78.24.78.252:5060;branch=z9hG4bK3284898e
Contact: 502 <sip:502@195.138.91.18:5061>
Server: Linksys/SPA8000-5.1.10
Remote-Party-ID: 502 <sip:502@78.24.78.252>;screen=yes;party=called
Content-Length: 257
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
Content-Type: application/sdp
v=0
o=- 1612186 1612186 IN IP4 195.138.91.18
s=-
c=IN IP4 195.138.91.18
t=0 0
m=audio 13522 RTP/AVP 8 100 101
a=rtpmap:8 PCMA/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
<------------->
--- (13 headers 13 lines) ---
Found RTP audio format 8
Found RTP audio format 100
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format NSE for ID 100
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 195.138.91.18:13522
list_route: hop: <sip:502@195.138.91.18:5061>
set_destination: Parsing <sip:502@195.138.91.18:5061> for address/port to send to
set_destination: set destination to 195.138.91.18, port 5061
Transmitting (NAT) to 195.138.91.18:5061:
ACK sip:502@195.138.91.18:5061 SIP/2.0
Via: SIP/2.0/UDP 78.24.78.252:5060;branch=z9hG4bK61d3b453;rport
Max-Forwards: 70
From: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
To: <sip:502@195.138.91.18:5061>;tag=910b0bdabdb5a207i1
Contact: <sip:977874501@78.24.78.252>
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.6
Content-Length: 0
SIP/502-00000032 answered SIP/7051622-00000030
<--- SIP read from UDP:91.210.116.35:5060 --->
OPTIONS sip:7051622@78.24.78.252 SIP/2.0
Via: SIP/2.0/UDP 91.210.116.35:5060;branch=z9hG4bK701375fd;rport
From: "asterisk" <sip:asterisk@91.210.116.35>;tag=as7a308602
To: <sip:7051622@78.24.78.252>
Contact: <sip:asterisk@91.210.116.35>
Call-ID: 092ba74e3e6bb99f5f23432d3b60ca9a@91.210.116.35
CSeq: 102 OPTIONS
Max-Forwards: 70
Date: Mon, 04 Oct 2010 16:33:25 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Looking for 7051622 in default (domain 78.24.78.252)
<--- Transmitting (NAT) to 91.210.116.35:5060 --->
Via: SIP/2.0/UDP 91.210.116.35:5060;branch=z9hG4bK701375fd;received=91.210.116.35;rport=5060
From: "asterisk" <sip:asterisk@91.210.116.35>;tag=as7a308602
To: <sip:7051622@78.24.78.252>;tag=as095c1c65
Call-ID: 092ba74e3e6bb99f5f23432d3b60ca9a@91.210.116.35
CSeq: 102 OPTIONS
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0
<--- SIP read from UDP:195.138.91.18:5061 --->
BYE sip:977874501@78.24.78.252 SIP/2.0
Via: SIP/2.0/UDP 195.138.91.18:5061;branch=z9hG4bK-d8b6fd68
From: <sip:502@195.138.91.18:5061>;tag=910b0bdabdb5a207i1
To: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 101 BYE
Max-Forwards: 70
User-Agent: Linksys/SPA8000-5.1.10
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
Sending to 195.138.91.18 : 5061 (NAT)
<--- Transmitting (NAT) to 195.138.91.18:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 195.138.91.18:5061;branch=z9hG4bK-d8b6fd68;received=195.138.91.18
From: <sip:502@195.138.91.18:5061>;tag=910b0bdabdb5a207i1
To: "977874501" <sip:977874501@78.24.78.252>;tag=as7d15dead
Call-ID: 63f9828c2a9f946e351f308b5cfcd689@78.24.78.252
CSeq: 101 BYE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0