Reputation: 573
I am using FreePBX. While trying to login I am getting
[2017-09-12 12:09:03] VERBOSE[5545] chan_sip.c:
<--- SIP read from UDP:83.245.241.98:34479 --->
SUBSCRIBE sip:[email protected];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:[email protected]:34479>
To: <sip:[email protected]>
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:[email protected]: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:[email protected]>;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
On registering device it shows
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:[email protected]>;tag=6390922e-056e-4421-a55f-13e76117593e
09-12 19:27:20.483 I/System.out: To: <sip:[email protected]>
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:[email protected]: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..
From device logs I see the domain name, but in error message it's empty. Why can it be so?
Registering device is Android, but when I try desktop Zoiper, the error is the same.
I can show any settings from FreePBX, but I don't know which ones to show. If you feel that you need some of them to help me, feel free to request, and I'll post them as update
UPD
Here are new log portion
<--- 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:[email protected]:34479;transport=UDP;rinstance=5ffbd839a509bdb2>;expires=0
To: <sip:[email protected]>
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:[email protected]>;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:[email protected];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:[email protected]:34479;transport=UDP>
To: <sip:[email protected]>
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:[email protected]: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
I changed client's wifi to another and it worked. Then I changed it back and it did not work again. The local subnet of wifi in which it worked has the same subnet address and mask (although it's another subnet), can it be the reason?
Upvotes: 0
Views: 1542
Reputation: 9
Have you set your network on sip.conf?
Example:
[general]
externip = 83.245.241.98
localnet=192.168.43.0/255.255.255.0
Upvotes: 1
Reputation: 2734
Your REGISTER message looks valid - and contains correct domain name set in proper places. But it has no Authenticatioon header.
According to the logs registration failed due to timeout - but I see no response 408 - so probably timeout is on the client. Nobody responded to the REGISTER.
So you need to find a reason for failure to handle REGISTER on the server, or to transfer request to the Server, or to deliver response to the client.
Even if you post SUBSCRIBE message first - I suppose the SUBSCRIBE should follow the REGISTER. But since registration was not finished properly - some variables in the client were not initialized. And client created invalid SUBSCRIBE request. Domain in request URI and in the to is 0.0.0.0 in the From is missing.
So this message probaby will never be delivered properly. And even if it is delivered - will fail the parsing. So it is rejected. This message should never be sent - it is bug of the client. It should check the registration state before trying to subscribe to the message-summary event.
Upvotes: 1