# SIP - Failed to Authenticate

**URL:** <https://community.asterisk.org/t/sip-failed-to-authenticate/105191>\
**Category:** Asterisk SIP\
**Created:** [October 31, 2024, 5:37pm UTC](https://community.asterisk.org/t/sip-failed-to-authenticate/105191 "2024-10-31T17:37:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chad15](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@chad15](https://community.asterisk.org/u/chad15)\
**Post date:** [October 31, 2024, 5:37pm UTC](https://community.asterisk.org/t/sip-failed-to-authenticate/105191/1 "2024-10-31T17:37:02Z")

</div>

Hi All -

I am struggling to allow inbound calls from my GSM gateway to make it through. Outbound works fine. When I attempt an inbound call I receive “Failed to Authenticate” and a 401 Unauthorized SIP response. I would like the authentication to happen only by IP address and that is how I have configured using the Permit field. Despite this, I still receive the following response:

[2024-10-29 22:12:22] NOTICE[8868]: res\_pjsip/pjsip\_distributor.c:673 log\_failed\_request: Request ‘INVITE’ from ‘“+1XXXXXXXXXX” sip:+1XXXXXXXXXX@XXX.XXX.XXX.66’ failed for ‘XXX.XXX.XXX.110:5060’ (callid: baa56301d7e9955286d1c02badc62ad0@XXX.XXX.XXX.132) - Failed to authenticate  
\<— Transmitting SIP response (578 bytes) to UDP:XXX.XXX.XXX.110:5060 —\>  
SIP/2.0 401 Unauthorized  
Via: SIP/2.0/UDP XXX.XXX.XXX.132;rport=5060;received=XXX.XXX.XXX.110;branch=z9hG4bKdb7f2a52a60341313e1aa45e69eb1fa7  
Call-ID: baa56301d7e9955286d1c02badc62ad0@XXX.XXX.XXX.132  
From: “+1XXXXXXXXXX” sip:+17025047207@XXX.XXX.XXX.66;tag=371c1b9179fc601acd09debcab6d2118  
To: sip:3@XXX.XXX.XXX.66;tag=z9hG4bKdb7f2a52a60341313e1aa45e69eb1fa7  
CSeq: 1613055234 INVITE  
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1730239942/0be16cc846dda3f2132da06fca1da4f1”,opaque=“7d2817342db1024d”,algorithm=MD5,qop=“auth”  
Server: FPBX-17.0.19.16(21.4.3)  
Content-Length: 0

Any ideas? Please let me know if you need any additional information.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [October 31, 2024, 6:20pm UTC](https://community.asterisk.org/t/sip-failed-to-authenticate/105191/2 "2024-10-31T18:20:04Z")

</div>

Your configuration is wrong. You have’t provided it, so we can’t look at it to work out what is wrong.

Check that you don’t have auth= set.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [October 31, 2024, 6:25pm UTC](https://community.asterisk.org/t/sip-failed-to-authenticate/105191/3 "2024-10-31T18:25:35Z")

</div>

> [@chad15](#):
>
> that is how I have configured using the Permit field

Are you using FreePBX?

---

<div class="post-metadata">

**Author:** ![sedwards](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sedwards](https://community.asterisk.org/u/sedwards)\
**Post date:** [October 31, 2024, 9:24pm UTC](https://community.asterisk.org/t/sip-failed-to-authenticate/105191/4 "2024-10-31T21:24:00Z")

</div>

This may be a clue:

> [@chad15](#):
>
> Server: FPBX-17.0.19.16(21.4.3)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [November 30, 2024, 9:24pm UTC](https://community.asterisk.org/t/sip-failed-to-authenticate/105191/5 "2024-11-30T21:24:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
