2 个星号服务器的 Sip Trunk Peer 问题

2 个星号服务器的 Sip Trunk Peer 问题

我在尝试拨打电话时收到未经授权的错误:

[Sep  3 16:20:19] Asterisk 13.27.0-vici, Copyright (C) 1999 - 2014, Digium, Inc. and others.
[Sep  3 16:20:19] Created by Mark Spencer <[email protected]>
[Sep  3 16:20:19] Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
[Sep  3 16:20:19] This is free software, with components licensed under the GNU General Public
[Sep  3 16:20:19] License version 2 and other licenses; you are welcome to redistribute it under
[Sep  3 16:20:19] certain conditions. Type 'core show license' for details.
[Sep  3 16:20:19] =========================================================================
[Sep  3 16:20:19] Connected to Asterisk 13.27.0-vici currently running on vicibox81 (pid = 1481)
vicibox81*CLI> sip debug on
No such command 'sip debug on' (type 'core show help sip debug on' for other possible commands)
vicibox81*CLI> set sip debug on
No such command 'set sip debug on' (type 'core show help set sip' for other possible commands)
vicibox81*CLI> set sip debug 1
No such command 'set sip debug 1' (type 'core show help set sip' for other possible commands)
vicibox81*CLI> sip debug 1
No such command 'sip debug 1' (type 'core show help sip debug 1' for other possible commands)
[Sep  3 16:21:01]   == Manager 'sendcron' logged on from 127.0.0.1
[Sep  3 16:21:01]   == Manager 'sendcron' logged on from 127.0.0.1
[Sep  3 16:21:01]   == Manager 'sendcron' logged off from 127.0.0.1
[Sep  3 16:21:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Sep  3 16:21:06]   == Manager 'sendcron' logged on from 127.0.0.1
[Sep  3 16:21:06]   == Manager 'sendcron' logged off from 127.0.0.1
vicibox81*CLI> sip set debug on
SIP Debugging enabled
[Sep  3 16:21:19]
[Sep  3 16:21:19] <--- SIP read from UDP:172.16.16.170:1024 --->
[Sep  3 16:21:19] INVITE sip:[email protected]:5060;transport=udp SIP/2.0
[Sep  3 16:21:19] Via: SIP/2.0/UDP 172.16.16.170:1024;rport;branch=z9hG4bKPjc716d194-a3cc-42e3-adb0-570e09e6e731
[Sep  3 16:21:19] From: "Mina" <sip:[email protected]>;tag=cde0a28e-7cad-4d8a-8036-84b255f2c2fd
[Sep  3 16:21:19] To: <sip:[email protected]>
[Sep  3 16:21:19] Contact: <sip:[email protected]:1024>
[Sep  3 16:21:19] Call-ID: 09b5725f-cd25-4347-91a0-d6bc7e43c5af
[Sep  3 16:21:19] CSeq: 17026 INVITE
[Sep  3 16:21:19] Allow: OPTIONS, NOTIFY, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, REFER, MESSAGE, REGISTER
[Sep  3 16:21:19] Supported: timer, replaces, norefersub
[Sep  3 16:21:19] Session-Expires: 1800
[Sep  3 16:21:19] Min-SE: 90
[Sep  3 16:21:19] Diversion: "1008" <sip:[email protected]>
[Sep  3 16:21:19] Remote-Party-ID: "1008" <sip:[email protected]>
[Sep  3 16:21:19] P-Asserted-Identity: "1008" <sip:[email protected]>
[Sep  3 16:21:19] P-Preferred-Identity: "1008" <sip:[email protected]>
[Sep  3 16:21:19] Max-Forwards: 70
[Sep  3 16:21:19] User-Agent: Yeastar S412-30.11.0.7
[Sep  3 16:21:19] Content-Type: application/sdp
[Sep  3 16:21:19] Content-Length: 308
[Sep  3 16:21:19]
[Sep  3 16:21:19] v=0
[Sep  3 16:21:19] o=- 541947639 541947639 IN IP4 172.16.16.170
[Sep  3 16:21:19] s=Asterisk
[Sep  3 16:21:19] c=IN IP4 172.16.16.170
[Sep  3 16:21:19] t=0 0
[Sep  3 16:21:19] m=audio 10356 RTP/AVP 0 8 18 101
[Sep  3 16:21:19] a=rtpmap:0 PCMU/8000
[Sep  3 16:21:19] a=rtpmap:8 PCMA/8000
[Sep  3 16:21:19] a=rtpmap:18 G729/8000
[Sep  3 16:21:19] a=fmtp:18 annexb=no
[Sep  3 16:21:19] a=rtpmap:101 telephone-event/8000
[Sep  3 16:21:19] a=fmtp:101 0-16
[Sep  3 16:21:19] a=ptime:20
[Sep  3 16:21:19] a=maxptime:150
[Sep  3 16:21:19] a=sendrecv
[Sep  3 16:21:19] <------------->
[Sep  3 16:21:19] --- (19 headers 15 lines) ---
[Sep  3 16:21:19] Sending to 172.16.16.170:1024 (NAT)
[Sep  3 16:21:19] Sending to 172.16.16.170:1024 (NAT)
[Sep  3 16:21:19] Using INVITE request as basis request - 09b5725f-cd25-4347-91a0-d6bc7e43c5af
[Sep  3 16:21:19] No matching peer for '1008' from '172.16.16.170:1024'
[Sep  3 16:21:19]
[Sep  3 16:21:19] <--- Reliably Transmitting (NAT) to 172.16.16.170:1024 --->
[Sep  3 16:21:19] SIP/2.0 401 Unauthorized
[Sep  3 16:21:19] Via: SIP/2.0/UDP 172.16.16.170:1024;branch=z9hG4bKPjc716d194-a3cc-42e3-adb0-570e09e6e731;received=172.16.16.170;rport=1024
[Sep  3 16:21:19] From: "Mina" <sip:[email protected]>;tag=cde0a28e-7cad-4d8a-8036-84b255f2c2fd
[Sep  3 16:21:19] To: <sip:[email protected]>;tag=as1e178ae8
[Sep  3 16:21:19] Call-ID: 09b5725f-cd25-4347-91a0-d6bc7e43c5af
[Sep  3 16:21:19] CSeq: 17026 INVITE
[Sep  3 16:21:19] Server: Asterisk PBX 13.27.0-vici
[Sep  3 16:21:19] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Sep  3 16:21:19] Supported: replaces, timer
[Sep  3 16:21:19] WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="228ff25f"
[Sep  3 16:21:19] Content-Length: 0
[Sep  3 16:21:19]
[Sep  3 16:21:19]
[Sep  3 16:21:19] <------------>
[Sep  3 16:21:19] Scheduling destruction of SIP dialog '09b5725f-cd25-4347-91a0-d6bc7e43c5af' in 32000 ms (Method: INVITE)
[Sep  3 16:21:19]
[Sep  3 16:21:19] <--- SIP read from UDP:172.16.16.170:1024 --->
[Sep  3 16:21:19] ACK sip:[email protected]:5060;transport=udp SIP/2.0
[Sep  3 16:21:19] Via: SIP/2.0/UDP 172.16.16.170:1024;rport;branch=z9hG4bKPjc716d194-a3cc-42e3-adb0-570e09e6e731
[Sep  3 16:21:19] From: "Mina" <sip:[email protected]>;tag=cde0a28e-7cad-4d8a-8036-84b255f2c2fd
[Sep  3 16:21:19] To: <sip:[email protected]>;tag=as1e178ae8
[Sep  3 16:21:19] Call-ID: 09b5725f-cd25-4347-91a0-d6bc7e43c5af
[Sep  3 16:21:19] CSeq: 17026 ACK
[Sep  3 16:21:19] Max-Forwards: 70
[Sep  3 16:21:19] User-Agent: Yeastar S412-30.11.0.7
[Sep  3 16:21:19] Content-Length: 0
[Sep  3 16:21:19]
[Sep  3 16:21:19] <------------->
[Sep  3 16:21:19] --- (9 headers 0 lines) ---
[Sep  3 16:21:21]
[Sep  3 16:21:21] <--- SIP read from UDP:172.16.16.170:1024 --->
[Sep  3 16:21:21] OPTIONS sip:[email protected]:5060;transport=udp SIP/2.0
[Sep  3 16:21:21] Via: SIP/2.0/UDP 172.16.16.170:1024;rport;branch=z9hG4bKPjf0b266fe-eeb7-440f-bdc3-c314a194cbaa
[Sep  3 16:21:21] From: <sip:[email protected]:1024>;tag=1cf40bd4-973c-47cc-8f4c-7ccde01435a2
[Sep  3 16:21:21] To: <sip:[email protected]>
[Sep  3 16:21:21] Contact: <sip:[email protected]:1024>
[Sep  3 16:21:21] Call-ID: f5ca7b3e-03b3-4705-ba23-4b726e201f7f
[Sep  3 16:21:21] CSeq: 29258 OPTIONS
[Sep  3 16:21:21] Max-Forwards: 70
[Sep  3 16:21:21] User-Agent: Yeastar S412-30.11.0.7
[Sep  3 16:21:21] Content-Length: 0
[Sep  3 16:21:21]
[Sep  3 16:21:21] <------------->
[Sep  3 16:21:21] --- (10 headers 0 lines) ---
[Sep  3 16:21:21] Sending to 172.16.16.170:1024 (NAT)
[Sep  3 16:21:21] Looking for 20e79d92 in trunkinbound (domain 172.16.17.101)
[Sep  3 16:21:21]
[Sep  3 16:21:21] <--- Transmitting (NAT) to 172.16.16.170:1024 --->
[Sep  3 16:21:21] SIP/2.0 200 OK
[Sep  3 16:21:21] Via: SIP/2.0/UDP 172.16.16.170:1024;branch=z9hG4bKPjf0b266fe-eeb7-440f-bdc3-c314a194cbaa;received=172.16.16.170;rport=1024
[Sep  3 16:21:21] From: <sip:[email protected]:1024>;tag=1cf40bd4-973c-47cc-8f4c-7ccde01435a2
[Sep  3 16:21:21] To: <sip:[email protected]>;tag=as73f7407e
[Sep  3 16:21:21] Call-ID: f5ca7b3e-03b3-4705-ba23-4b726e201f7f
[Sep  3 16:21:21] CSeq: 29258 OPTIONS
[Sep  3 16:21:21] Server: Asterisk PBX 13.27.0-vici
[Sep  3 16:21:21] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Sep  3 16:21:21] Supported: replaces, timer
[Sep  3 16:21:21] Contact: <sip:172.16.17.101:5060>
[Sep  3 16:21:21] Accept: application/sdp
[Sep  3 16:21:21] Content-Length: 0
[Sep  3 16:21:21]
[Sep  3 16:21:21]
[Sep  3 16:21:21] <------------>
[Sep  3 16:21:21] Scheduling destruction of SIP dialog 'f5ca7b3e-03b3-4705-ba23-4b726e201f7f' in 32000 ms (Method: OPTIONS)
[Sep  3 16:21:21]
[Sep  3 16:21:21] <--- SIP read from UDP:172.16.17.62:64674 --->
[Sep  3 16:21:21]
[Sep  3 16:21:21]
[Sep  3 16:21:21] <------------->
[Sep  3 16:21:51] Really destroying SIP dialog '09b5725f-cd25-4347-91a0-d6bc7e43c5af' Method: ACK
[Sep  3 16:21:51]
[Sep  3 16:21:51] <--- SIP read from UDP:172.16.17.62:64674 --->
[Sep  3 16:21:51]
[Sep  3 16:21:51]
[Sep  3 16:21:51] <------------->
[Sep  3 16:21:53] Really destroying SIP dialog 'f5ca7b3e-03b3-4705-ba23-4b726e201f7f' Method: OPTIONS
[Sep  3 16:21:54] Reliably Transmitting (NAT) to 172.16.17.52:5709:
[Sep  3 16:21:54] OPTIONS sip:[email protected]:5709 SIP/2.0
[Sep  3 16:21:54] Via: SIP/2.0/UDP 172.16.17.101:5060;branch=z9hG4bK4eca1917;rport
[Sep  3 16:21:54] Max-Forwards: 70
[Sep  3 16:21:54] From: "asterisk" <sip:[email protected]>;tag=as27e320ad
[Sep  3 16:21:54] To: <sip:[email protected]:5709>
[Sep  3 16:21:54] Contact: <sip:[email protected]:5060>
[Sep  3 16:21:54] Call-ID: [email protected]:5060
[Sep  3 16:21:54] CSeq: 102 OPTIONS
[Sep  3 16:21:54] User-Agent: Asterisk PBX 13.27.0-vici
[Sep  3 16:21:54] Date: Tue, 03 Sep 2019 14:21:54 GMT
[Sep  3 16:21:54] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Sep  3 16:21:54] Supported: replaces, timer
[Sep  3 16:21:54] Content-Length: 0
[Sep  3 16:21:54]
[Sep  3 16:21:54]
[Sep  3 16:21:54] ---
[Sep  3 16:21:54]
[Sep  3 16:21:54] <--- SIP read from UDP:172.16.17.52:5709 --->
[Sep  3 16:21:54] SIP/2.0 200 OK
[Sep  3 16:21:54] Via: SIP/2.0/UDP 172.16.17.101:5060;branch=z9hG4bK4eca1917;rport=5060
[Sep  3 16:21:54] From: "asterisk" <sip:[email protected]>;tag=as27e320ad
[Sep  3 16:21:54] To: <sip:[email protected]:5709>;tag=1805614165
[Sep  3 16:21:54] Call-ID: [email protected]:5060
[Sep  3 16:21:54] CSeq: 102 OPTIONS
[Sep  3 16:21:54] Contact: <sip:[email protected]:5709>
[Sep  3 16:21:54] Supported: 100rel, replaces, timer
[Sep  3 16:21:54] Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
[Sep  3 16:21:54] Accept: application/sdp, message/sipfrag, application/dtmf-relay
[Sep  3 16:21:54] Content-Length: 0
[Sep  3 16:21:54]
[Sep  3 16:21:54] <------------->
[Sep  3 16:21:54] --- (11 headers 0 lines) ---
[Sep  3 16:21:54] Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
[Sep  3 16:21:54] Reliably Transmitting (NAT) to 172.16.16.170:5060:
[Sep  3 16:21:54] OPTIONS sip:172.16.16.170 SIP/2.0
[Sep  3 16:21:54] Via: SIP/2.0/UDP 172.16.17.101:5060;branch=z9hG4bK0e8fe141;rport
[Sep  3 16:21:54] Max-Forwards: 70
[Sep  3 16:21:54] From: "asterisk" <sip:[email protected]>;tag=as3728903f
[Sep  3 16:21:54] To: <sip:172.16.16.170>
[Sep  3 16:21:54] Contact: <sip:[email protected]:5060>
[Sep  3 16:21:54] Call-ID: [email protected]:5060
[Sep  3 16:21:54] CSeq: 102 OPTIONS
[Sep  3 16:21:54] User-Agent: Asterisk PBX 13.27.0-vici
[Sep  3 16:21:54] Date: Tue, 03 Sep 2019 14:21:54 GMT
[Sep  3 16:21:54] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Sep  3 16:21:54] Supported: replaces, timer
[Sep  3 16:21:54] Content-Length: 0

    [Sep  3 16:20:19] Asterisk 13.27.0-vici, Copyright (C) 1999 - 2014, Digium, Inc. and others.
    [Sep  3 16:20:19] Created by Mark Spencer <[email protected]>
    [Sep  3 16:20:19] Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
    [Sep  3 16:20:19] This is free software, with components licensed under the GNU General Public
    [Sep  3 16:20:19] License version 2 and other licenses; you are welcome to redistribute it under
    [Sep  3 16:20:19] certain conditions. Type 'core show license' for details.
    [Sep  3 16:20:19] =========================================================================
    [Sep  3 16:20:19] Connected to Asterisk 13.27.0-vici currently running on vicibox81 (pid = 1481)
    vicibox81*CLI> sip debug on
    No such command 'sip debug on' (type 'core show help sip debug on' for other possible commands)
    vicibox81*CLI> set sip debug on
    No such command 'set sip debug on' (type 'core show help set sip' for other possible commands)
    vicibox81*CLI> set sip debug 1
    No such command 'set sip debug 1' (type 'core show help set sip' for other possible commands)
    vicibox81*CLI> sip debug 1
    No such command 'sip debug 1' (type 'core show help sip debug 1' for other possible commands)
    [Sep  3 16:21:01]   == Manager 'sendcron' logged on from 127.0.0.1
    [Sep  3 16:21:01]   == Manager 'sendcron' logged on from 127.0.0.1
    [Sep  3 16:21:01]   == Manager 'sendcron' logged off from 127.0.0.1
    [Sep  3 16:21:02]   == Manager 'sendcron' logged off from 127.0.0.1
    [Sep  3 16:21:06]   == Manager 'sendcron' logged on from 127.0.0.1
    [Sep  3 16:21:06]   == Manager 'sendcron' logged off from 127.0.0.1
    vicibox81*CLI> sip set debug on
    SIP Debugging enabled
    [Sep  3 16:21:19]
    [Sep  3 16:21:19] <--- SIP read from UDP:172.16.16.170:1024 --->
    [Sep  3 16:21:19] INVITE sip:[email protected]:5060;transport=udp SIP/2.0
    [Sep  3 16:21:19] Via: SIP/2.0/UDP 172.16.16.170:1024;rport;branch=z9hG4bKPjc716d194-a3cc-42e3-adb0-570e09e6e731
    [Sep  3 16:21:19] From: "Mina" <sip:[email protected]>;tag=cde0a28e-7cad-4d8a-8036-84b255f2c2fd
    [Sep  3 16:21:19] To: <sip:[email protected]>
    [Sep  3 16:21:19] Contact: <sip:[email protected]:1024>
    [Sep  3 16:21:19] Call-ID: 09b5725f-cd25-4347-91a0-d6bc7e43c5af
    [Sep  3 16:21:19] CSeq: 17026 INVITE
    [Sep  3 16:21:19] Allow: OPTIONS, NOTIFY, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, REFER, MESSAGE, REGISTER
    [Sep  3 16:21:19] Supported: timer, replaces, norefersub
    [Sep  3 16:21:19] Session-Expires: 1800
    [Sep  3 16:21:19] Min-SE: 90
    [Sep  3 16:21:19] Diversion: "1008" <sip:[email protected]>
    [Sep  3 16:21:19] Remote-Party-ID: "1008" <sip:[email protected]>
    [Sep  3 16:21:19] P-Asserted-Identity: "1008" <sip:[email protected]>
    [Sep  3 16:21:19] P-Preferred-Identity: "1008" <sip:[email protected]>
    [Sep  3 16:21:19] Max-Forwards: 70
    [Sep  3 16:21:19] User-Agent: Yeastar S412-30.11.0.7
    [Sep  3 16:21:19] Content-Type: application/sdp
    [Sep  3 16:21:19] Content-Length: 308
    [Sep  3 16:21:19]
    [Sep  3 16:21:19] v=0
    [Sep  3 16:21:19] o=- 541947639 541947639 IN IP4 172.16.16.170
    [Sep  3 16:21:19] s=Asterisk
    [Sep  3 16:21:19] c=IN IP4 172.16.16.170
    [Sep  3 16:21:19] t=0 0
    [Sep  3 16:21:19] m=audio 10356 RTP/AVP 0 8 18 101
    [Sep  3 16:21:19] a=rtpmap:0 PCMU/8000
    [Sep  3 16:21:19] a=rtpmap:8 PCMA/8000
    [Sep  3 16:21:19] a=rtpmap:18 G729/8000
    [Sep  3 16:21:19] a=fmtp:18 annexb=no
    [Sep  3 16:21:19] a=rtpmap:101 telephone-event/8000
    [Sep  3 16:21:19] a=fmtp:101 0-16
    [Sep  3 16:21:19] a=ptime:20
    [Sep  3 16:21:19] a=maxptime:150
    [Sep  3 16:21:19] a=sendrecv
    [Sep  3 16:21:19] <------------->
    [Sep  3 16:21:19] --- (19 headers 15 lines) ---
    [Sep  3 16:21:19] Sending to 172.16.16.170:1024 (NAT)
    [Sep  3 16:21:19] Sending to 172.16.16.170:1024 (NAT)
    [Sep  3 16:21:19] Using INVITE request as basis request - 09b5725f-cd25-4347-91a0-d6bc7e43c5af
    [Sep  3 16:21:19] No matching peer for '1008' from '172.16.16.170:1024'
    [Sep  3 16:21:19]
    [Sep  3 16:21:19] <--- Reliably Transmitting (NAT) to 172.16.16.170:1024 --->
    [Sep  3 16:21:19] SIP/2.0 401 Unauthorized
    [Sep  3 16:21:19] Via: SIP/2.0/UDP 172.16.16.170:1024;branch=z9hG4bKPjc716d194-a3cc-42e3-adb0-570e09e6e731;received=172.16.16.170;rport=1024
    [Sep  3 16:21:19] From: "Mina" <sip:[email protected]>;tag=cde0a28e-7cad-4d8a-8036-84b255f2c2fd
    [Sep  3 16:21:19] To: <sip:[email protected]>;tag=as1e178ae8
    [Sep  3 16:21:19] Call-ID: 09b5725f-cd25-4347-91a0-d6bc7e43c5af
    [Sep  3 16:21:19] CSeq: 17026 INVITE
    [Sep  3 16:21:19] Server: Asterisk PBX 13.27.0-vici
    [Sep  3 16:21:19] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    [Sep  3 16:21:19] Supported: replaces, timer
    [Sep  3 16:21:19] WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="228ff25f"
    [Sep  3 16:21:19] Content-Length: 0
    [Sep  3 16:21:19]
    [Sep  3 16:21:19]
    [Sep  3 16:21:19] <------------>
    [Sep  3 16:21:19] Scheduling destruction of SIP dialog '09b5725f-cd25-4347-91a0-d6bc7e43c5af' in 32000 ms (Method: INVITE)
    [Sep  3 16:21:19]
    [Sep  3 16:21:19] <--- SIP read from UDP:172.16.16.170:1024 --->
    [Sep  3 16:21:19] ACK sip:[email protected]:5060;transport=udp SIP/2.0
    [Sep  3 16:21:19] Via: SIP/2.0/UDP 172.16.16.170:1024;rport;branch=z9hG4bKPjc716d194-a3cc-42e3-adb0-570e09e6e731
    [Sep  3 16:21:19] From: "Mina" <sip:[email protected]>;tag=cde0a28e-7cad-4d8a-8036-84b255f2c2fd
    [Sep  3 16:21:19] To: <sip:[email protected]>;tag=as1e178ae8
    [Sep  3 16:21:19] Call-ID: 09b5725f-cd25-4347-91a0-d6bc7e43c5af
    [Sep  3 16:21:19] CSeq: 17026 ACK
    [Sep  3 16:21:19] Max-Forwards: 70
    [Sep  3 16:21:19] User-Agent: Yeastar S412-30.11.0.7
    [Sep  3 16:21:19] Content-Length: 0
    [Sep  3 16:21:19]
    [Sep  3 16:21:19] <------------->
    [Sep  3 16:21:19] --- (9 headers 0 lines) ---
    [Sep  3 16:21:21]
    [Sep  3 16:21:21] <--- SIP read from UDP:172.16.16.170:1024 --->
    [Sep  3 16:21:21] OPTIONS sip:[email protected]:5060;transport=udp SIP/2.0
    [Sep  3 16:21:21] Via: SIP/2.0/UDP 172.16.16.170:1024;rport;branch=z9hG4bKPjf0b266fe-eeb7-440f-bdc3-c314a194cbaa
    [Sep  3 16:21:21] From: <sip:[email protected]:1024>;tag=1cf40bd4-973c-47cc-8f4c-7ccde01435a2
    [Sep  3 16:21:21] To: <sip:[email protected]>
    [Sep  3 16:21:21] Contact: <sip:[email protected]:1024>
    [Sep  3 16:21:21] Call-ID: f5ca7b3e-03b3-4705-ba23-4b726e201f7f
    [Sep  3 16:21:21] CSeq: 29258 OPTIONS
    [Sep  3 16:21:21] Max-Forwards: 70
    [Sep  3 16:21:21] User-Agent: Yeastar S412-30.11.0.7
    [Sep  3 16:21:21] Content-Length: 0
    [Sep  3 16:21:21]
    [Sep  3 16:21:21] <------------->
    [Sep  3 16:21:21] --- (10 headers 0 lines) ---
    [Sep  3 16:21:21] Sending to 172.16.16.170:1024 (NAT)
    [Sep  3 16:21:21] Looking for 20e79d92 in trunkinbound (domain 172.16.17.101)
    [Sep  3 16:21:21]
    [Sep  3 16:21:21] <--- Transmitting (NAT) to 172.16.16.170:1024 --->
    [Sep  3 16:21:21] SIP/2.0 200 OK
    [Sep  3 16:21:21] Via: SIP/2.0/UDP 172.16.16.170:1024;branch=z9hG4bKPjf0b266fe-eeb7-440f-bdc3-c314a194cbaa;received=172.16.16.170;rport=1024
    [Sep  3 16:21:21] From: <sip:[email protected]:1024>;tag=1cf40bd4-973c-47cc-8f4c-7ccde01435a2
    [Sep  3 16:21:21] To: <sip:[email protected]>;tag=as73f7407e
    [Sep  3 16:21:21] Call-ID: f5ca7b3e-03b3-4705-ba23-4b726e201f7f
    [Sep  3 16:21:21] CSeq: 29258 OPTIONS
    [Sep  3 16:21:21] Server: Asterisk PBX 13.27.0-vici
    [Sep  3 16:21:21] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    [Sep  3 16:21:21] Supported: replaces, timer
    [Sep  3 16:21:21] Contact: <sip:172.16.17.101:5060>
    [Sep  3 16:21:21] Accept: application/sdp
    [Sep  3 16:21:21] Content-Length: 0
    [Sep  3 16:21:21]
    [Sep  3 16:21:21]
    [Sep  3 16:21:21] <------------>
    [Sep  3 16:21:21] Scheduling destruction of SIP dialog 'f5ca7b3e-03b3-4705-ba23-4b726e201f7f' in 32000 ms (Method: OPTIONS)
    [Sep  3 16:21:21]
    [Sep  3 16:21:21] <--- SIP read from UDP:172.16.17.62:64674 --->
    [Sep  3 16:21:21]
    [Sep  3 16:21:21]
    [Sep  3 16:21:21] <------------->
    [Sep  3 16:21:51] Really destroying SIP dialog '09b5725f-cd25-4347-91a0-d6bc7e43c5af' Method: ACK
    [Sep  3 16:21:51]
    [Sep  3 16:21:51] <--- SIP read from UDP:172.16.17.62:64674 --->
    [Sep  3 16:21:51]
    [Sep  3 16:21:51]
    [Sep  3 16:21:51] <------------->
    [Sep  3 16:21:53] Really destroying SIP dialog 'f5ca7b3e-03b3-4705-ba23-4b726e201f7f' Method: OPTIONS
    [Sep  3 16:21:54] Reliably Transmitting (NAT) to 172.16.17.52:5709:
    [Sep  3 16:21:54] OPTIONS sip:[email protected]:5709 SIP/2.0
    [Sep  3 16:21:54] Via: SIP/2.0/UDP 172.16.17.101:5060;branch=z9hG4bK4eca1917;rport
    [Sep  3 16:21:54] Max-Forwards: 70
    [Sep  3 16:21:54] From: "asterisk" <sip:[email protected]>;tag=as27e320ad
    [Sep  3 16:21:54] To: <sip:[email protected]:5709>
    [Sep  3 16:21:54] Contact: <sip:[email protected]:5060>
    [Sep  3 16:21:54] Call-ID: [email protected]:5060
    [Sep  3 16:21:54] CSeq: 102 OPTIONS
    [Sep  3 16:21:54] User-Agent: Asterisk PBX 13.27.0-vici
    [Sep  3 16:21:54] Date: Tue, 03 Sep 2019 14:21:54 GMT
    [Sep  3 16:21:54] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    [Sep  3 16:21:54] Supported: replaces, timer
    [Sep  3 16:21:54] Content-Length: 0
    [Sep  3 16:21:54]
    [Sep  3 16:21:54]
    [Sep  3 16:21:54] ---
    [Sep  3 16:21:54]
    [Sep  3 16:21:54] <--- SIP read from UDP:172.16.17.52:5709 --->
    [Sep  3 16:21:54] SIP/2.0 200 OK
    [Sep  3 16:21:54] Via: SIP/2.0/UDP 172.16.17.101:5060;branch=z9hG4bK4eca1917;rport=5060
    [Sep  3 16:21:54] From: "asterisk" <sip:[email protected]>;tag=as27e320ad
    [Sep  3 16:21:54] To: <sip:[email protected]:5709>;tag=1805614165
    [Sep  3 16:21:54] Call-ID: [email protected]:5060
    [Sep  3 16:21:54] CSeq: 102 OPTIONS
    [Sep  3 16:21:54] Contact: <sip:[email protected]:5709>
    [Sep  3 16:21:54] Supported: 100rel, replaces, timer
    [Sep  3 16:21:54] Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
    [Sep  3 16:21:54] Accept: application/sdp, message/sipfrag, application/dtmf-relay
    [Sep  3 16:21:54] Content-Length: 0
    [Sep  3 16:21:54]
    [Sep  3 16:21:54] <------------->
    [Sep  3 16:21:54] --- (11 headers 0 lines) ---
    [Sep  3 16:21:54] Really destroying SIP dialog '[email protected]:5060' Method: OPTIONS
    [Sep  3 16:21:54] Reliably Transmitting (NAT) to 172.16.16.170:5060:
    [Sep  3 16:21:54] OPTIONS sip:172.16.16.170 SIP/2.0
    [Sep  3 16:21:54] Via: SIP/2.0/UDP 172.16.17.101:5060;branch=z9hG4bK0e8fe141;rport
    [Sep  3 16:21:54] Max-Forwards: 70
    [Sep  3 16:21:54] From: "asterisk" <sip:[email protected]>;tag=as3728903f
    [Sep  3 16:21:54] To: <sip:172.16.16.170>
    [Sep  3 16:21:54] Contact: <sip:[email protected]:5060>
    [Sep  3 16:21:54] Call-ID: [email protected]:5060
    [Sep  3 16:21:54] CSeq: 102 OPTIONS
    [Sep  3 16:21:54] User-Agent: Asterisk PBX 13.27.0-vici
    [Sep  3 16:21:54] Date: Tue, 03 Sep 2019 14:21:54 GMT
    [Sep  3 16:21:54] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    [Sep  3 16:21:54] Supported: replaces, timer
    [Sep  3 16:21:54] Content-Length: 0

我该如何修复它?

答案1

“401 未授权”响应是每次呼叫时都会发生的正常 SIP 行为。这意味着您的设备现在必须发送包含您的身份验证详细信息的新 INVITE。

您必须在特定设备的适当位置设置用户名和密码。这些必须与 sip.conf 中星号处的“username=”和“secret=”匹配。

相关内容