Endpoint (from Endpoints Group) registration to DSIPRouter raises 401 UNAUTHORIZED error

448 views
Skip to first unread message

Serge S

unread,
Jan 16, 2021, 12:08:54 PM1/16/21
to dSIPRouter
Hi all,

So I did followed this guide https://dsiprouter.readthedocs.io/en/latest/use-cases.html#using-pjsip-trunking-freepbx-example , got my DSIPRouter and FreePBX working and talking each other but then I saw a lot of errors in asterisk:

ERROR[1620]: res_pjsip_outbound_authenticator_digest.c:131 digest_create_request_with_auth: Host: '51.88.263.15:5060': Unable to find authenticate header in challenge.


Host: '51.88.263.15:5060' being my DSIPRouter.

Using SNGREP I've got a sequence of 4 message between DSIPRouter and my PBX in the same second.

PBX → DSIPRouter
213.54.27.116:5960 -> 51.88.263.15:5060

REGISTER sip:51.88.263.15:5060 SIP/2.0
Via: SIP/2.0/UDP 213.54.27.116:5960;rport;branch=z9hG4bKPjbea8a87f-210b-400d-835e-ac907afaa97f

From: <sip:pbx_...@51.88.263.15>;tag=8e28019a-84cd-48fc-b45d-38e4198953d7
To: <sip:pbx_...@51.88.263.15>
Call-ID: dd74b188-d701-4fb9-986b-a84ff99bec8c
CSeq: 16952 REGISTER
Contact: <sip:s...@213.54.27.116:5960;line=zeijaxv>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
Max-Forwards: 70
User-Agent: My_PBX
Content-Length:  0

DSIPRouter → PBX
51.88.263.15:5060 -> 213.54.27.116:5960
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 213.54.27.116:5960;rport=5960;branch=z9hG4bKPjbea8a87f-210b-400d-835e-ac907afaa97f;received=213.54.27.116
From: <sip:pbx_...@51.88.263.15>;tag=8e28019a-84cd-48fc-b45d-38e4198953d7
To: <sip:pbx_...@51.88.263.15>;tag=354bd3ec1f43c15adbcbb0688779a4f9.c6dc07b2
Call-ID: dd74b188-d701-4fb9-986b-a84ff99bec8c
CSeq: 16952 REGISTER
WWW-Authenticate: Digest realm="51.88.263.15", nonce="YAMWSmADFR4Mjy2BT2n89TOwZdgw+kSp"
Content-Length: 0


PBX → DSIPRouter
213.54.27.116:5960 -> 51.88.263.15:5060
REGISTER sip:51.88.263.15:5060 SIP/2.0
Via: SIP/2.0/UDP 213.54.27.116:5960;rport;branch=z9hG4bKPj1d89c172-7a1d-4785-b8d5-20fa97c263a5
From: <sip:pbx_...@51.88.263.15>;tag=8e28019a-84cd-48fc-b45d-38e4198953d7
To: <sip:pbx_...@51.88.263.15>
Call-ID: dd74b188-d701-4fb9-986b-a84ff99bec8c
CSeq: 16953 REGISTER
Contact: <sip:s...@213.54.27.116:5960;line=zeijaxv>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
Max-Forwards: 70
User-Agent: My_PBX
Authorization: Digest username="pbx_otce", realm="51.88.263.15", nonce="YAMWSmADFR4Mjy2BT2n89TOwZdgw+kSp", uri="sip:51.88.263.15:5060", response="be3ca478b72d3f1f0a6791b9c02ff107" 
Content-Length:  0


DSIPRouter → PBX
51.88.263.15:5060 -> 213.54.27.116:5960
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 213.54.27.116:5960;rport=5960;branch=z9hG4bKPj1d89c172-7a1d-4785-b8d5-20fa97c263a5;received=213.54.27.116
From: <sip:pbx_...@51.88.263.15>;tag=8e28019a-84cd-48fc-b45d-38e4198953d7
To: <sip:pbx_...@51.88.263.15>;tag=354bd3ec1f43c15adbcbb0688779a4f9.c6dc07b2
Call-ID: dd74b188-d701-4fb9-986b-a84ff99bec8c
CSeq: 16953 REGISTER
WWW-Authenticate: Digest realm="51.88.263.15", nonce="YAMWSmADFR4Mjy2BT2n89TOwZdgw+kSp"
Content-Length: 0


In the same time, I've got sequence of OPTIONS message from my PBX that are answered by DSIPRouter with 407 Proxy Authentication Required. Add the PBX or Carrier IP using GUI

which is weird because my PBX is already register in DSIPRouter.

Calls are working and flowing from my carrier through my DSIPRouter to my PBX way and back...

Is it just some annoying messages? Something I've missed in my PBX when I setup my trunk to the DSIPRouter?

If anyone got a clue, I'll be gratefull. Let me know.

Best regards

Serge

Mack Hendricks

unread,
Jan 16, 2021, 2:13:11 PM1/16/21
to Serge S, dSIPRouter
Make sure the IP address of the PBX is in the Endpoint tab of the Endpoint Group.  Otherwise, it will not  reply to the OPTION messages.

--
You received this message because you are subscribed to the Google Groups "dSIPRouter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dSIPRouter+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dSIPRouter/c4ac6dba-4098-4f63-8f9b-d7386510c100n%40googlegroups.com.

Serge S

unread,
Jan 16, 2021, 3:03:26 PM1/16/21
to dSIPRouter
Hi Mack !

Thank you for your message.

I'm sorry, I think I misguided you when I talked about the 407 Proxy Authentication Required message.
This is not my issue, it's just a redundant message that appears of nowhere at the same rate (60s) that the 401 Unauthorized error.

All  ip addresses are saved in the Endpoint tab of the endpoind Group. When I place a call, then the 407 Proxy Authentication Required is followed by an ACK then an INVITE from my PBX and it's all OK.

My real issue (more an annoying thing actually because everything works except these errors message ) is the 401 Unauthorized error.

Do you have an idea maybe?

Good day !

Serge S

unread,
Jan 19, 2021, 3:08:42 PM1/19/21
to dSIPRouter
Hi all,

Could it be related to this bug ? : https://github.com/dOpensource/dsiprouter/issues/322

Good day !

Mack Hendricks

unread,
Jan 20, 2021, 2:03:02 PM1/20/21
to Serge S, dSIPRouter, Courtney Griffith
I don’t think so…we had another user run into this.  I think it had something to do with how the domain name was set in PJSIP.

Courtney,

Do you remember what was the deal here.  I think we ran into this with integrating with Wazo.

Serge S

unread,
Jan 20, 2021, 3:48:42 PM1/20/21
to dSIPRouter
Hi Mack,

I've got this issue either with WAZO or FreePBX (followed this guide for FreePBX pjsip setting: https://dsiprouter.readthedocs.io/en/latest/use-cases.html#using-pjsip-trunking-freepbx-example)...

Do you need me to run some tests ?

Best regards

Mack Hendricks

unread,
Jan 21, 2021, 9:50:45 AM1/21/21
to dSIPRouter
Hey Serge,

Are you getting this message because PJSIP is sending OPTION messages and dSIP won't respond to them because the IP address is not in the address table.  So, a work around is to create another Endpoint group and put the IP address of the FreePBX or Wazo server in the endpoint list.

This is something we are working to resolve for the next release

Serge S

unread,
Jan 21, 2021, 4:54:49 PM1/21/21
to dSIPRouter
Hi Mack,

What do you mean by "address table" ?

My PBX is saved in the Endpoint tab of the Endpoint Group (have a look on the screenshot attached) . Is there another menu where it should be saved?

dsiprouter-endpoint.jpeg

Mack Hendricks

unread,
Jan 21, 2021, 7:31:04 PM1/21/21
to Serge S, dSIPRouter
Perhaps it’s a different problem.   I will put in a issue around this.  If you need this immediately you can engage our paid support.  

Sent from my iPhone

On Jan 21, 2021, at 4:54 PM, 'Serge S' via dSIPRouter <dSIPR...@googlegroups.com> wrote:

Hi Mack,


What do you mean by "address table" ?

My PBX is saved in the Endpoint tab of the Endpoint Group (have a look on the screenshot attached) . Is there another menu where it should be saved?

You received this message because you are subscribed to a topic in the Google Groups "dSIPRouter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dSIPRouter/c0jSXi19pro/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dSIPRouter+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dSIPRouter/bcf2a1f4-98d8-49b8-9ad1-b2cb62e04cf1n%40googlegroups.com.
<dsiprouter-endpoint.jpeg>

Serge S

unread,
Jan 23, 2021, 9:03:19 AM1/23/21
to dSIPRouter
Dear Mack,

Thank you for your help.

I find another user with same issue than me on Wazo Mattermost channel. Did find the solution either.

Maybe something to do with PJSIP ? I'll try your use case with ChanSIP instead of PJSIP just in case and I'll let you know.

Thank you again.

Best regards

Serge

Ps: By the way, I had an issue with System Backup from the web interface -> Error: permission denied to save sql database in /var/backups/dsiprouter/xxxxxxxxx.sql
Only Root was defined as Owner and Group. I had to change ownership so -> add dsiprouter as owner to this folder (and subfolders) and it works, backup can be created and available to download from the webinterface... Don't know if I was the only one with this issue?

Serge S

unread,
Jan 23, 2021, 9:04:28 AM1/23/21
to dSIPRouter
"I find another user with same issue than me on Wazo Mattermost channel. He didn't find the solution either."
Reply all
Reply to author
Forward
Message has been deleted
0 new messages