Поставил астериск, схема такая: Проблема: нет входящего звука при звонке через сипнет.
При звонке 101 -> 102 звук в обе стороны.
конфиги:
# cat sip.conf:
Код: Выделить всё
[general]
port=5060
bindaddr=0.0.0.0
srvlookup=yes
dtmfmode=RFC2833
nat=no
externip=ExtIP_A
[101]
host=dynamic
context=default
type=friend
username=101
nat=yes
secret=secret101
callerid=phone1 <101>
allow=gsm
allow=ulaw
allow=alaw
[102]
host=dynamic
context=default
type=friend
username=102
nat=yes
secret=s102
callerid=phone2 <102>
allow=gsm
allow=ulaw
allow=alaw
[sipnet_101]
host=sipnet.net
username=SIP-ID
secret=SIP-PASSWORD
fromuser=SIP-ID
fromdomain=sipnet.net
type=peer
context=local
disallow=all
allow=alaw
allow=ulaw
allow=g729
nat=no
canreinvite=nonat
insecure=invite
dtmfmode=RFC2833
Код: Выделить всё
[default]
exten => 101,1,Dial(SIP/101)
exten => 102,1,Dial(SIP/102)
exten => _7./101,1,Dial(SIP/${EXTEN}@sipnet_101,40)
Код: Выделить всё
-- Executing [79031234567@default:1] Dial("SIP/101-0000000a", "SIP/79031234567@sipnet_101,40") in new stack
-- Called SIP/79031234567@sipnet_101
-- SIP/sipnet_101-0000000b is ringing
-- SIP/sipnet_101-0000000b is making progress passing it to SIP/101-0000000a
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000166, ts 2140701764, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030067, ts 2140701760, len 000033)
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000167, ts 2140701924, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030068, ts 2140701920, len 000033)
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000168, ts 2140702084, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030069, ts 2140702080, len 000033)
[skip]
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000275, ts 2140719204, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030176, ts 2140719200, len 000033)
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000276, ts 2140719364, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030177, ts 2140719360, len 000033)
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000277, ts 2140719524, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030178, ts 2140719520, len 000033)
Got RTP packet from 212.53.40.86:30784 (type 08, seq 000278, ts 2140719684, len 000160)
Sent RTP packet to ExtIP_GW:40042 (type 03, seq 030179, ts 2140719680, len 000033)
-- SIP/sipnet_101-00000009 answered SIP/101-00000008
-- Remotely bridging SIP/101-00000008 and SIP/sipnet_101-00000009
Sent RTP P2P packet to ExtIP_GW:40042 (type 08, len 000160)
Sent RTP P2P packet to ExtIP_GW:40042 (type 08, len 000160)
Sent RTP P2P packet to ExtIP_GW:40042 (type 08, len 000160)
Got RTP packet from ExtIP_GW:47725 (type 03, seq 021726, ts 112775, len 000033)
Sent RTP packet to 212.53.40.86:30784 (type 08, seq 053130, ts 112768, len 000160)
Got RTP packet from ExtIP_GW:47725 (type 03, seq 021727, ts 112935, len 000033)
Sent RTP packet to 212.53.40.86:30784 (type 08, seq 053131, ts 112928, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
Got RTP packet from ExtIP_GW:47725 (type 03, seq 021728, ts 113095, len 000033)
Sent RTP packet to 212.53.40.86:30784 (type 08, seq 053132, ts 113088, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
Got RTP packet from ExtIP_GW:47725 (type 03, seq 021729, ts 113255, len 000033)
Sent RTP packet to 212.53.40.86:30784 (type 08, seq 053133, ts 113248, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
Sent RTP P2P packet to ExtIP_GW:47725 (type 08, len 000160)
== Spawn extension (default, 79031234567, 1) exited non-zero on 'SIP/101-00000008'
tcpdump на шлюзе
внешний интерфейс
# tcpdump -n -i fxp0 host 212.53.40.86
Код: Выделить всё
22:31:47.834968 IP 212.53.40.86.30784 > ExtIP_GW.40042: UDP, length 172
22:31:47.847984 IP ExtIP_GW.35045 > 212.53.40.86.30784: UDP, length 172
22:31:47.854584 IP 212.53.40.86.30784 > ExtIP_GW.40042: UDP, length 172
22:31:47.867955 IP ExtIP_GW.35045 > 212.53.40.86.30784: UDP, length 172
22:31:47.888026 IP ExtIP_GW.35045 > 212.53.40.86.30784: UDP, length 172
локальный интерфейс
# tcpdump -n -i sk0 host 212.53.40.86
Код: Выделить всё
22:31:47.827983 IP 192.168.10.101.40042 > 212.53.40.86.30784: UDP, length 172
22:31:47.847957 IP 192.168.10.101.40042 > 212.53.40.86.30784: UDP, length 172
22:31:47.867924 IP 192.168.10.101.40042 > 212.53.40.86.30784: UDP, length 172
22:31:47.887996 IP 192.168.10.101.40042 > 212.53.40.86.30784: UDP, length 172
Это NATопроблемы?
Может быть в конфигах косяк?
Что означает строка "Sent RTP P2P packet to"?
Как сделать debug из консоли в файл для разбора полетов?