ded , спасибо за объяснение.
При внешнем вызове на медь ничего не происходит.
Дилог меж шлюзом и астрером такой:
Код: Выделить всё
Really destroying SIP dialog 'abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80' Method: REGISTER
<--- SIP read from UDP:192.168.0.80:5060 --->
REGISTER sip:192.168.0.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.80:5060;branch=z9hG4bKab594c00a4157
From: <sip:3001@192.168.0.9>;tag=ab594c00a4
To: sip:3001@192.168.0.9
Call-ID: abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80
CSeq: 157 REGISTER
Date: Fri, 12 May 2017 19:00:45 GMT
User-Agent: AddPac SIP Gateway
Authorization: Digest username="3001", realm="qweqwe", nonce="19b03cb5", uri="sip:192.168.0.9", response="fef6215c8b17e105a8fe967062011973", algorithm=MD5
Contact: <sip:3001@192.168.0.80>;expires=60
Expires: 60
Content-Length: 0
Max-Forwards: 70
<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.0.80:5060 (NAT)
Sending to 192.168.0.80:5060 (NAT)
<--- Transmitting (NAT) to 192.168.0.80:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.80:5060;branch=z9hG4bKab594c00a4157;received=192.168.0.80;rport=5060
From: <sip:3001@192.168.0.9>;tag=ab594c00a4
To: sip:3001@192.168.0.9;tag=as123ae0c4
Call-ID: abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80
CSeq: 157 REGISTER
Server: Asterisk PBX 11.25.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="qweqwe", nonce="4eb93c0f"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:192.168.0.80:5060 --->
REGISTER sip:192.168.0.9 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.80:5060;branch=z9hG4bKab594c00a4158
From: <sip:3001@192.168.0.9>;tag=ab594c00a4
To: sip:3001@192.168.0.9
Call-ID: abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80
CSeq: 158 REGISTER
Date: Fri, 12 May 2017 19:00:46 GMT
User-Agent: AddPac SIP Gateway
Authorization: Digest username="3001", realm="qweqwe", nonce="4eb93c0f", uri="sip:192.168.0.9", response="20cd8670220d5c2070cc936312fb415b", algorithm=MD5
Contact: <sip:3001@192.168.0.80>;expires=60
Expires: 60
Content-Length: 0
Max-Forwards: 70
<------------->
--- (13 headers 0 lines) ---
Sending to 192.168.0.80:5060 (NAT)
Reliably Transmitting (NAT) to 192.168.0.80:5060:
OPTIONS sip:3001@192.168.0.80 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.9:5060;branch=z9hG4bK6582d7f5;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.0.9>;tag=as159ce466
To: <sip:3001@192.168.0.80>
Contact: <sip:asterisk@192.168.0.9:5060>
Call-ID: 28f7c2de5c7c5f172c5ad0f279ddbe51@192.168.0.9:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.25.3
Date: Tue, 13 Feb 2018 08:57:58 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
---
<--- Transmitting (NAT) to 192.168.0.80:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.80:5060;branch=z9hG4bKab594c00a4158;received=192.168.0.80;rport=5060
From: <sip:3001@192.168.0.9>;tag=ab594c00a4
To: sip:3001@192.168.0.9;tag=as123ae0c4
Call-ID: abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80
CSeq: 158 REGISTER
Server: Asterisk PBX 11.25.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: <sip:3001@192.168.0.80>;expires=60
Date: Tue, 13 Feb 2018 08:57:58 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'abf91559-eecf-4ce4-8000-0002a4059fc4@192.168.0.80' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:192.168.0.80:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.9:5060;branch=z9hG4bK6582d7f5;rport
From: "asterisk" <sip:asterisk@192.168.0.9>;tag=as159ce466
To: <sip:3001@192.168.0.80>
Call-ID: 28f7c2de5c7c5f172c5ad0f279ddbe51@192.168.0.9:5060
CSeq: 102 OPTIONS
User-Agent: AddPac SIP Gateway
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '28f7c2de5c7c5f172c5ad0f279ddbe51@192.168.0.9:5060' Method: OPTIONS
genpbx*CLI>
Но во время вызова на медь ничего не происходит.
Если делать вызов на 3001 то видно установленное соединение, tcpdump показывает бегущие udp туда много, от туда мало и редко. Гудка нет.