401 Unauthorized

166 views
Skip to first unread message

Yossef Haim

unread,
Dec 19, 2020, 4:41:10 PM12/19/20
to dSIPRouter
every carrier i add, with user password, i receive answer 401 Unauthorized 
is there some adjustment to do in configuration?
thanks

Mack Hendricks

unread,
Dec 19, 2020, 4:58:21 PM12/19/20
to Yossef Haim, dSIPRouter
I just reviewed the last capture you sent for Telynx - sorry about the delay.  But, the realm is probably wrong.  In the following picture the realm being sent back is 163.172.177.221.  If that realm isn't setup in dSIP then it will ignore 407 proxy auth.  What realm is defined for the carrier?

image.png


--
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/f827dd7b-175d-4b64-b554-ad4549305c32n%40googlegroups.com.

Yossef Haim

unread,
Dec 19, 2020, 5:14:54 PM12/19/20
to Mack Hendricks, dSIPRouter
Thanks for your answer. 
what means realm?
163.172.177.221 is my server ip
the endpoint of telnyx carrier is sip.telnyx.com


--
           
Yossef Haim Manageri-call
052-769-57-57 | ad...@i-call.me                   

Mack Hendricks

unread,
Dec 19, 2020, 7:06:38 PM12/19/20
to Yossef Haim, dSIPRouter
Can you screenshot your username/password tab in carrier settings for Telnyx

Yossef Haim

unread,
Dec 29, 2020, 12:16:00 PM12/29/20
to Mack Hendricks, dSIPRouter
hi
it's not only a problem in telnyx
every carrier that require registration, return error 403

--
           
Yossef Haim Manageri-call
052-769-57-57 | ad...@i-call.me                   

Mailtrack Sender notified by
Mailtrack 29/12/20 à 19:15:14

Mack Hendricks

unread,
Dec 29, 2020, 12:29:41 PM12/29/20
to Yossef Haim, dSIPRouter
Can you screenshot your Username/Password Auth settings.  If the carrier uses a realm other than the value in Registration Server or Domain field we have to change the Registration Server or Domain field to be that value.  In your case, they send back your IP address as the realm.  So, you need to modify the  Registration Server or Domain  and place 163.172.177.221 in the field, but keep the outbound proxy field the same




On Dec 29, 2020, at 12:15 PM, Yossef Haim <yoss...@gmail.com> wrote:

hi
it's not only a problem in telnyx
every carrier that require registration, return error 403

--
           
Yossef Haim Manageri-call
052-769-57-57 | ad...@i-call.me                   

Mailtrack Sender notified by
Mailtrack 29/12/20 à 19:15:14

Le dim. 20 déc. 2020 à 02:06, Mack Hendricks <ma...@goflyball.com> a écrit :
Can you screenshot your username/password tab in carrier settings for Telnyx
On Sat, Dec 19, 2020 at 5:14 PM Yossef Haim <yoss...@gmail.com> wrote:
Thanks for your answer. 
what means realm?
163.172.177.221 is my server ip
the endpoint of telnyx carrier is sip.telnyx.com


--
           
Yossef Haim Manageri-call
052-769-57-57 | ad...@i-call.me                   

Le sam. 19 déc. 2020 à 23:58, Mack Hendricks <ma...@goflyball.com> a écrit :
I just reviewed the last capture you sent for Telynx - sorry about the delay.  But, the realm is probably wrong.  In the following picture the realm being sent back is 163.172.177.221.  If that realm isn't setup in dSIP then it will ignore 407 proxy auth.  What realm is defined for the carrier?

<image.png>


On Sat, Dec 19, 2020 at 4:41 PM Yossef Haim <yoss...@gmail.com> wrote:
every carrier i add, with user password, i receive answer 401 Unauthorized 
is there some adjustment to do in configuration?
thanks

--
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/f827dd7b-175d-4b64-b554-ad4549305c32n%40googlegroups.com.

Mack Hendricks

unread,
Dec 29, 2020, 12:44:21 PM12/29/20
to Yossef Haim, dSIPRouter
I want to see how you have it defined in dSIP.  So, can you screenshot your dSIP Carrier Settings under Username/Password Auth?

Charles Berghuis

unread,
Jan 5, 2021, 12:17:18 PM1/5/21
to dSIPRouter
Hi Guys
 I'm having a similar problem. I can't get it to register with voip.ms. The question I had, is why is the dSIPRouter automatically filling in the "Optional Credentials" . If I remove it, the dSIPRouter keeps putting it back. I've tried using both domain and the IP for the "Registration Server" and I still get "401 Unauthorized" in sngrep. 





Mack Hendricks

unread,
Jan 5, 2021, 12:39:47 PM1/5/21
to Charles Berghuis, dSIPRouter
Hey Charles,

We take the username, password and domain/realm and create the register request URI.  We display it to you when you click edit because we want to give you the ability to make a change if need.  For example, the domain/realm may be different then the registration server IP.  

In your case, what realm is voip.ms sending back in the 401.  That realm needs to replace sanjose1.voip.ms

Charles Berghuis

unread,
Jan 5, 2021, 12:57:40 PM1/5/21
to dSIPRouter
This is my setup and what sngrep is showing. Also I'm using dSIPRouter behind a firewall. I've tried editing and I can't get it right.


carrier config.JPGsngrep carrier 401.JPG

Mack Hendricks

unread,
Jan 5, 2021, 1:11:50 PM1/5/21
to Charles Berghuis, dSIPRouter
Can you show the 401 unauthorized sip message.  That message contains the realm

On Jan 5, 2021, at 12:57 PM, Charles Berghuis <two...@gmail.com> wrote:

This is my setup and what sngrep is showing. Also I'm using dSIPRouter behind a firewall. I've tried editing and I can't get it right.


<carrier config.JPG><sngrep carrier 401.JPG>
To view this discussion on the web visit https://groups.google.com/d/msgid/dSIPRouter/cd7aaa1c-b4f8-42b7-a8f0-19dddb6f78b4n%40googlegroups.com.
<carrier config.JPG><sngrep carrier 401.JPG>

Charles Berghuis

unread,
Jan 5, 2021, 1:33:32 PM1/5/21
to dSIPRouter

Like this?


sngrep carrier 401 a.JPG

Mack Hendricks

unread,
Jan 5, 2021, 1:35:27 PM1/5/21
to Charles Berghuis, dSIPRouter
Yup…so the realm is sanjose.voip.ms versus sanjose1.voip.ms

On Jan 5, 2021, at 1:33 PM, Charles Berghuis <two...@gmail.com> wrote:


Like this?
To view this discussion on the web visit https://groups.google.com/d/msgid/dSIPRouter/0bec4936-16b7-4d1d-a50f-248a105e254an%40googlegroups.com.
<sngrep carrier 401 a.JPG>

Charles Berghuis

unread,
Jan 5, 2021, 2:57:37 PM1/5/21
to dSIPRouter
Thanks for your help Mack. I got it registered now and I'm able to make incoming calls. On out going calls I have no audio in ether direction. I did a packet capture on the PBX and audio is leaving but not coming in. I'm behind a firewall and need to get the help of a friend to to a capture at that point. I'm using a Mikrotik. If you have any suggestions I would appreciate it. I'll let you know if I figure anything out.

Samuel

unread,
Aug 24, 2023, 4:03:00 PM8/24/23
to dSIPRouter
Hi.
I have a very similar problem. My carrier needs to auth with e NONCE. But dsiprouter doesn't answer after 401 from my carrier. Any idea to fix?
carrier.png

REGISTER sip:pro1.voipgateway.org SIP/2.0 Via: SIP/2.0/UDP 45.84.199.41;branch=z9hG4bK1dec.f684c094000000000000000000000000.0 To: <sip:4133X...@pro1.voipgateway.org> From: <sip:4133...@pro1.voipgateway.org>;tag=3393f0703fb0ccaca74109ff37de39f5-23ad2b04 CSeq: 10 REGISTER Call-ID: 3567ed9350e...@127.0.0.1 Max-Forwards: 70 Content-Length: 0 Contact: <sip:17@uranus2:5060> Expires: 60


SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 45.84.199.41;branch=z9hG4bK1dec.f684c094000000000000000000000000.0 To: <sip:4133X...@pro1.voipgateway.org>;tag=67cb5903 From: <sip:4133X...@pro1.voipgateway.org>;tag=3393f0703fb0ccaca74109ff37de39f5-23ad2b04 CSeq: 10 REGISTER Call-ID: 3567ed9350e...@127.0.0.1 WWW-Authenticate: Digest nonce="1692907069:72fdf56f94976836266221a00c914d84e6d49d4b",algorithm=MD5,realm="sip-1.pb" Content-Length: 0


THX so much
Samuel

Mack Hendricks

unread,
Aug 24, 2023, 4:11:40 PM8/24/23
to Samuel, dSIPRouter
It might be because the realm being sent back from the carrier is different from what’s in the UI.  Change the UI to the realm: sip-1.pb

Bjorn

unread,
Nov 7, 2023, 12:29:35 PM11/7/23
to dSIPRouter
I can also confirm the same issue and do not seem to be able to find a solution through the ui.

i have my username and password, then the registration server set to sip1.myprovider, auth username matching the username, and the proxy string is sip:user...@sip1.myprovider:5060

these settings prevent kamailio from responding to the challenge (as the realm does not match)

if in the ui i change the registration server/domain, it turns into a 403 because the provider does not accept registrations from that realm

if i manually change the realm in the uacreg table (leaving alone the r_domain) everything works, ofcourse, but in every other case it fails.

is it in any way, in the current ui, possible to have a realm that is completely different from both the registration domain and the proxy? (as i need those 2 to be sip1.myprovider to be allowed to register)
if not, can we send in a feature request to separate the realm into its own field in the carrier settings ?

Op donderdag 24 augustus 2023 om 22:11:40 UTC+2 schreef Mack Hendricks:
Reply all
Reply to author
Forward
0 new messages