我正在使用FreePBX。在尝试登录时我正在
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c:
<--- SIP read from UDP:83.245.241.98:34479 --->
SUBSCRIBE sip:5666@0.0.0.0;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 83.245.241.98:34479;branch=z9hG4bK-524287-1---e49547006939fc6c
Max-Forwards: 70
Contact: <sip:5666@83.245.241.98:34479>
To: <sip:5666@0.0.0.0>
From: <sip:5666@>;tag=b9144d7a
Call-ID: wDigYoT9KjWu52sD4lFLTQ..
CSeq: 1 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 3.9.32144 r32121
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0
<------------->
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c: --- (15 headers 0 lines) ---
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c: Sending to 83.245.241.98:34479 (NAT)
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c: Creating new subscription
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c: Sending to 83.245.241.98:34479 (NAT)
[2017-09-12 12:09:03] VERBOSE[5545] sip/route.c: sip_route_dump: route/path hop: <sip:5666@83.245.241.98:34479>
[2017-09-12 12:09:03] ERROR[5545] chan_sip.c: Empty domain name in FROM header
[2017-09-12 12:09:03] NOTICE[5545] chan_sip.c: Failed to authenticate device <sip:5666@>;tag=b9144d7a for SUBSCRIBE
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c:
<--- Transmitting (NAT) to 83.245.241.98:34479 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 83.245.241.98:34479;branch=z9hG4bK-524287-1---e49547006939fc6c;received=83.245.241.98;rport=34479
From: <sip:5666@>;tag=b9144d7a
To: <sip:5666@0.0.0.0>;tag=as03163a1a
Call-ID: wDigYoT9KjWu52sD4lFLTQ..
CSeq: 1 SUBSCRIBE
Server: FPBX-13.0.192.16(14.6.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c: Really destroying SIP dialog 'wDigYoT9KjWu52sD4lFLTQ..' Method: SUBSCRIBE
在注册设备时显示
09-12 19:27:20.483 I/System.out: 19:27:20.484 pjsua_core.c .TX 645 bytes Request msg REGISTER/cseq=54664 (tdta0x78c4c36c) to UDP 35.162.177.84:5060:
09-12 19:27:20.483 I/System.out: REGISTER sip:mydomain.com SIP/2.0
09-12 19:27:20.483 I/System.out: Via: SIP/2.0/UDP 192.168.43.224:6000;rport;branch=z9hG4bKPj8a5802d4-1b9a-49f0-b3c1-b38a23e51299
09-12 19:27:20.483 I/System.out: Max-Forwards: 70
09-12 19:27:20.483 I/System.out: From: <sip:5666@mydomain.com>;tag=6390922e-056e-4421-a55f-13e76117593e
09-12 19:27:20.483 I/System.out: To: <sip:5666@mydomain.com>
09-12 19:27:20.483 I/System.out: Call-ID: 63b10417-58a5-44b5-83a3-1fc1febab86b
09-12 19:27:20.483 I/System.out: CSeq: 54664 REGISTER
09-12 19:27:20.483 I/System.out: User-Agent: Pjsua2 Android 2.6-svn
09-12 19:27:20.483 I/System.out: Contact: <sip:5666@192.168.43.224:6000;ob>
09-12 19:27:20.483 I/System.out: Expires: 300
09-12 19:27:20.483 I/System.out: Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
09-12 19:27:20.483 I/System.out: Content-Length: 0
09-12 19:27:20.483 I/System.out: --end msg--
09-12 19:27:20.973 I/System.out: 19:27:20.981 pjsua_acc.c ...SIP registration failed, status=408 (Request Timeout)
09-12 19:27:20.973 I/System.out: 19:27:20.982 pjsua_acc.c ...Scheduling re-registration retry for acc 0 in 297 seconds..
从设备日志中我看到了域名,但在错误消息中它是空的。为什么会如此?
注册设备是Android,但是当我尝试使用桌面Zoiper时,错误是一样的。
我可以显示FreePBX的任何设置,但我不知道要显示哪些设置。如果您觉得需要其中一些来帮助我,请随时提出要求,我会将其发布为更新
UPD
以下是新的日志部分
<--- SIP read from UDP:83.245.241.98:34479 --->
REGISTER sip:0.0.0.0;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 83.245.241.98:34479;branch=z9hG4bK-524287-1---42d9af389a67cbe0
Max-Forwards: 70
Contact: <sip:5666@83.245.241.98:34479;transport=UDP;rinstance=5ffbd839a509bdb2>;expires=0
To: <sip:5666@0.0.0.0>
From: <sip:5666@>;tag=99170228
Call-ID: mH4uHh2CI96Kfv9h6c1uHA..
CSeq: 3 REGISTER
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 3.9.32144 r32121
Allow-Events: presence, kpml
Content-Length: 0
<------------->
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: --- (13 headers 0 lines) ---
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: Sending to 83.245.241.98:34479 (NAT)
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c:
<--- Transmitting (NAT) to 83.245.241.98:34479 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 83.245.241.98:34479;branch=z9hG4bK-524287-1---42d9af389a67cbe0;received=83.245.241.98;rport=34479
From: <sip:5666@>;tag=99170228
To: <sip:5666@0.0.0.0>;tag=as718e8353
Call-ID: mH4uHh2CI96Kfv9h6c1uHA..
CSeq: 3 REGISTER
Server: FPBX-13.0.192.16(14.6.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 0
Date: Tue, 12 Sep 2017 17:30:02 GMT
Content-Length: 0
<------------>
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: Scheduling destruction of SIP dialog 'mH4uHh2CI96Kfv9h6c1uHA..' in 32000 ms (Method: REGISTER)
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c:
<--- SIP read from UDP:83.245.241.98:34479 --->
SUBSCRIBE sip:5666@0.0.0.0;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 83.245.241.98:34479;branch=z9hG4bK-524287-1---5d5c7b4cc8b27f1c
Max-Forwards: 70
Contact: <sip:5666@83.245.241.98:34479;transport=UDP>
To: <sip:5666@0.0.0.0>
From: <sip:5666@>;tag=134c433d
Call-ID: 9Fo9pY2cNfL9I3ZcT_rE1w..
CSeq: 1 SUBSCRIBE
Expires: 3600
Accept: application/simple-message-summary
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 3.9.32144 r32121
Event: message-summary
Allow-Events: presence, kpml
Content-Length: 0
<------------->
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: --- (16 headers 0 lines) ---
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: Sending to 83.245.241.98:34479 (NAT)
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: Creating new subscription
[2017-09-12 13:30:02] VERBOSE[5545] chan_sip.c: Sending to 83.245.241.98:34479 (NAT)
[2017-09-12 13:30:02] VERBOSE[5545] sip/route.c: sip_route_dump: route/path hop: <sip:5666@83.245.241.98:34479;transport=UDP>
[2017-09-12 13:30:02] ERROR[5545] chan_sip.c: Empty domain name in FROM header
[2017-09-12 13:30:02] NOTICE[5545] chan_sip.c: Failed to authenticate device <sip:5666@>;tag=134c433d for SUBSCRIBE
UPD2
我将客户端的wifi更改为另一个并且它有效。然后我把它改回来了,它再也没用了。它工作的wifi的本地子网具有相同的子网地址和掩码(虽然它是另一个子网),这可能是原因吗?
答案 0 :(得分:1)
您的REGISTER消息看起来有效 - 并且包含在适当位置设置的正确域名。但它没有Authenticatioon标题。
根据日志注册因超时而失败 - 但我看不到响应408 - 所以可能是客户端超时。没有人回应REGISTER。
因此,您需要找到无法在服务器上处理REGISTER,或将请求转移到服务器或向客户端发送响应的原因。
即使您首先发布SUBSCRIBE消息 - 我认为SUBSCRIBE应该遵循REGISTER。但由于注册没有正确完成 - 客户端中的一些变量未初始化。并且客户端创建了无效的SUBSCRIBE请求。请求URI中的域和from中的0.0.0.0缺少。
因此,此消息probaby永远不会正确传递。即使它已经交付 - 将无法解析。所以它被拒绝了。永远不应该发送此消息 - 这是客户端的错误。它应该在尝试订阅message-summary事件之前检查注册状态。
答案 1 :(得分:1)
您是否在sip.conf上设置了网络?
示例:
<强> [一般] 强>
externip = 83.245.241.98
<强> localnet的= 192.168.43.0 / 255.255.255.0 强>