簡體   English   中英

為什么我會收到兩個“需要 407 代理身份驗證”的 SIP 響應?

[英]Why do i get two "407 Proxy Authentication Required" SIP responses?

我正在使用 Golang 和 Freeswitch 開發軟件電話解決方案。 注冊有效,在 Freeswitch 上我可以看到我的軟電話代碼已注冊。 我還可以從其他軟件電話 (3CX) 向我的代碼發送邀請。 但是,如果我嘗試調用 3CX,我總是會收到兩個“需要 407 代理身份驗證”。3

我的期望:

  1. 發送邀請
  2. 接收所需的代理身份驗證
  3. 將 Auth 放入第二個 INVITE 並再次發送
  4. 將設置通話

我得到什么:

  1. 發送邀請
  2. 接收所需的代理身份驗證
  3. 將 Auth 放入第二個 INVITE 並再次發送
  4. 接收所需的代理身份驗證
  5. 沒有什么

(我刪除了 SIP Body (offer),因為它太大了)

2022/07/14 09:34:29.300373 invite.go:42: ↑↑↑
INVITE sip:41202@192.168.1.108:5066 SIP/2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE 
Content-Type: application/sdp
CSeq: 1 INVITE
Call-ID: b31a98fa-c7d2-46a0-9d3b-ffbe60331dcf
Via: SIP/2.0/WS 192.168.1.108;branch=z9hG4bKe92e138a-709b-4329-ac37-1ec2f88a5cb4
To: <sip:41202@192.168.1.108:5066>
Supported: replaces
User-Agent: Pion WebRTC SIP Client
From: "Agent 41201"<sip:41201@192.168.1.108:5066>;tag=1693e249-a531-4012-964e-f9b4133cf6e5
Contact: 41201 <sip:41201@192.168.1.108:5066>
Content-Length: 4265
Max-Forwards: 70

2022/07/14 09:34:29.327669 websocket_freeswitch.go:47: ↓↓↓
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/WS 192.168.1.108;branch=z9hG4bKe92e138a-709b-4329-ac37-1ec2f88a5cb4;received=192.168.1.110;rport=57576
From: "Agent 41201" <sip:41201@192.168.1.108:5066>;tag=1693e249-a531-4012-964e-f9b4133cf6e5
To: <sip:41202@192.168.1.108:5066>;tag=5He1p5m60a5DF
Call-ID: b31a98fa-c7d2-46a0-9d3b-ffbe60331dcf
CSeq: 1 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.6.20~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="192.168.1.108", nonce="81f85e27-b5d0-4b27-9358-5eded4524e3a", algorithm=MD5, qop="auth"
Content-Length: 0

2022/07/14 09:34:29.328234 invite.go:42: ↑↑↑
INVITE sip:41202@192.168.1.108:5066 SIP/2.0
Call-ID: b31a98fa-c7d2-46a0-9d3b-ffbe60331dcf
Via: SIP/2.0/WS 192.168.1.108;branch=z9hG4bK69967eaa-911f-4b89-8566-7b835b4d3b32
To: <sip:41202@192.168.1.108:5066>
Supported: timer, path, replaces
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE 
Content-Type: application/sdp
CSeq: 4 INVITE
From: "Agent 41201"<sip:41201@192.168.1.108:5066>;tag=1693e249-a531-4012-964e-f9b4133cf6e5
Contact: 41201 <sip:41201@192.168.1.108:5066>
Proxy-Authenticate: Digest username="41201", realm="192.168.1.108", nonce="81f85e27-b5d0-4b27-9358-5eded4524e3a", uri="sip:41202@192.168.1.108:5066", response="b7aae35c040dc1f25484eb96d725d6f3",algorithm=MD5,cnonce="0e6758e1adfccffbd0ad9ffdde3ef655",qop=auth,nc=00000001
User-Agent: Pion WebRTC SIP Client
Content-Length: 4265
Max-Forwards: 70


2022/07/14 09:34:29.348968 websocket_freeswitch.go:47: ↓↓↓
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/WS 192.168.1.108;branch=z9hG4bK69967eaa-911f-4b89-8566-7b835b4d3b32;received=192.168.1.110;rport=57576
From: "Agent 41201" <sip:41201@192.168.1.108:5066>;tag=1693e249-a531-4012-964e-f9b4133cf6e5
To: <sip:41202@192.168.1.108:5066>;tag=6t7Sr059XKU0a
Call-ID: b31a98fa-c7d2-46a0-9d3b-ffbe60331dcf
CSeq: 4 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.6.20~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="192.168.1.108", nonce="edbe6f39-3aa5-4034-8df8-aae050b77e1a", algorithm=MD5, qop="auth"
Content-Length: 0

好的。 現在我發現了我的錯誤。 我寫的是 Proxy-Authenticate 而不是 Proxy-Authorization。 但現在我收到了一個請求合並響應。 因此,Freeswitch 將其視為重復請求。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM