Re: [asterisk-users] 401 error
On Thu, Mar 9, 2023 at 10:43 PM Jerry Geis wrote: > I have a SIP trunk - calls going out work fine. > > Trying to setup an incoming call with a DNIS > > When I dial the number - I see nothing on the CLI. > The person says the server is returning 401 > > How do I debug that. Using asterisk 18.8.0 > There are two different SIP channel drivers. If using chan_sip then "sip set debug on" will show you the SIP traffic, if using chan_pjsip then "pjsip set logger on" will. After confirming it you then look at the configuration. You would need to ensure that you are matching the incoming traffic against either a peer for chan_sip (host= in a peer), or an endpoint in chan_pjsip (identify section). You'd also need to confirm that you haven't configured it to challenge those calls for authentication (insecure=very in chan_sip, and not having auth or inbound_auth set on endpoint in chan_pjsip). -- Joshua C. Colp Asterisk Project Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] 401 error
On Fri, Mar 10, 2023 at 10:50 AM Jerry Geis wrote: > > > On Thu, Mar 9, 2023 at 9:42 PM Jerry Geis wrote: > >> I have a SIP trunk - calls going out work fine. >> >> Trying to setup an incoming call with a DNIS >> >> When I dial the number - I see nothing on the CLI. >> The person says the server is returning 401 >> >> How do I debug that. Using asterisk 18.8.0 >> >> Thanks >> >> Jerry >> > > Thanks I am using chan_sip. Turning on "sip set debug on" I do se it. > > > > Using INVITE request as basis request - > 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP > Found peer 'JJ' for 'phone' from IP:5060 > > <--- Reliably Transmitting (no NAT) to IP:5060 ---> > SIP/2.0 401 Unauthorized^M > Via: SIP/2.0/UDP > IP:5060;branch=z9hG4bK+13778ac6c6ac51ac853b3fb4a387e5b71+sip+3+ae5ab1a2;received=IP^M > From: "Caller" ;tag=IP+3+67d18b6f+9e6ad02d^M > To: ;tag=as128621a0^M > Call-ID: > 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP^M > CSeq: 503124310 INVITE^M > Server: Asterisk PBX 18.14.0^M > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH, MESSAGE^M > Supported: replaces, timer^M > WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", > nonce="6cbb5c2f"^M > Content-Length: 0^M > > I dont see a reason why it failed. > I tried nat=yes, made no difference. > I tried insecure=very, made no difference. > > I do have: > externip=X > localnet=Y > localnet=Z > set in sip.conf > > As I mentioned - I can call out over this SIP trunk. > What next ? > It matched peer 'JJ'. That peer would need to have insecure=very set, and chan_sip then reloaded. Providing the actual peer would also be faster for anyone to provide help. -- Joshua C. Colp Asterisk Project Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] 401 error
That's the extent of my vague memories of chan_sip then, someone else may be able to answer. On Fri, Mar 10, 2023 at 11:05 AM Jerry Geis wrote: > > > On Fri, Mar 10, 2023 at 9:49 AM Jerry Geis wrote: > >> >> >> On Thu, Mar 9, 2023 at 9:42 PM Jerry Geis wrote: >> >>> I have a SIP trunk - calls going out work fine. >>> >>> Trying to setup an incoming call with a DNIS >>> >>> When I dial the number - I see nothing on the CLI. >>> The person says the server is returning 401 >>> >>> How do I debug that. Using asterisk 18.8.0 >>> >>> Thanks >>> >>> Jerry >>> >> >> Thanks I am using chan_sip. Turning on "sip set debug on" I do se it. >> >> >> >> Using INVITE request as basis request - >> 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP >> Found peer 'JJ' for 'phone' from IP:5060 >> >> <--- Reliably Transmitting (no NAT) to IP:5060 ---> >> SIP/2.0 401 Unauthorized^M >> Via: SIP/2.0/UDP >> IP:5060;branch=z9hG4bK+13778ac6c6ac51ac853b3fb4a387e5b71+sip+3+ae5ab1a2;received=IP^M >> From: "Caller" ;tag=IP+3+67d18b6f+9e6ad02d^M >> To: ;tag=as128621a0^M >> Call-ID: >> 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP^M >> CSeq: 503124310 INVITE^M >> Server: Asterisk PBX 18.14.0^M >> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, >> PUBLISH, MESSAGE^M >> Supported: replaces, timer^M >> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", >> nonce="6cbb5c2f"^M >> Content-Length: 0^M >> >> I dont see a reason why it failed. >> I tried nat=yes, made no difference. >> I tried insecure=very, made no difference. >> >> I do have: >> externip=X >> localnet=Y >> localnet=Z >> set in sip.conf >> >> As I mentioned - I can call out over this SIP trunk. >> What next ? >> Jerry >> > > > Just added insecure=very again, stopped and started. > > > [JJ] > type=friend > dtmfmode=rfc2833 > secret=yes > username=NUMBER > defaultuser=NUMBER > disallow=all > allow=ulaw > allow=alaw > context=smvoice-incoming > host=dnsname > canreinvite=yes > qualify=yes > insecure=very > > Got the same 401. > Thanks > > Jerry > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users -- Joshua C. Colp Asterisk Project Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] 401 error
On Thu, Mar 9, 2023 at 9:42 PM Jerry Geis wrote: > I have a SIP trunk - calls going out work fine. > > Trying to setup an incoming call with a DNIS > > When I dial the number - I see nothing on the CLI. > The person says the server is returning 401 > > How do I debug that. Using asterisk 18.8.0 > > Thanks > > Jerry > Thanks I am using chan_sip. Turning on "sip set debug on" I do se it. Using INVITE request as basis request - 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP Found peer 'JJ' for 'phone' from IP:5060 <--- Reliably Transmitting (no NAT) to IP:5060 ---> SIP/2.0 401 Unauthorized^M Via: SIP/2.0/UDP IP:5060;branch=z9hG4bK+13778ac6c6ac51ac853b3fb4a387e5b71+sip+3+ae5ab1a2;received=IP^M From: "Caller" ;tag=IP+3+67d18b6f+9e6ad02d^M To: ;tag=as128621a0^M Call-ID: 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP ^M CSeq: 503124310 INVITE^M Server: Asterisk PBX 18.14.0^M Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE^M Supported: replaces, timer^M WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6cbb5c2f"^M Content-Length: 0^M I dont see a reason why it failed. I tried nat=yes, made no difference. I tried insecure=very, made no difference. I do have: externip=X localnet=Y localnet=Z set in sip.conf As I mentioned - I can call out over this SIP trunk. What next ? Jerry -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] 401 error
On Fri, Mar 10, 2023 at 10:04 AM Jerry Geis wrote: > > > On Fri, Mar 10, 2023 at 9:49 AM Jerry Geis wrote: > >> >> >> On Thu, Mar 9, 2023 at 9:42 PM Jerry Geis wrote: >> >>> I have a SIP trunk - calls going out work fine. >>> >>> Trying to setup an incoming call with a DNIS >>> >>> When I dial the number - I see nothing on the CLI. >>> The person says the server is returning 401 >>> >>> How do I debug that. Using asterisk 18.8.0 >>> >>> Thanks >>> >>> Jerry >>> >> >> Thanks I am using chan_sip. Turning on "sip set debug on" I do se it. >> >> >> >> Using INVITE request as basis request - >> 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP >> Found peer 'JJ' for 'phone' from IP:5060 >> >> <--- Reliably Transmitting (no NAT) to IP:5060 ---> >> SIP/2.0 401 Unauthorized^M >> Via: SIP/2.0/UDP >> IP:5060;branch=z9hG4bK+13778ac6c6ac51ac853b3fb4a387e5b71+sip+3+ae5ab1a2;received=IP^M >> From: "Caller" ;tag=IP+3+67d18b6f+9e6ad02d^M >> To: ;tag=as128621a0^M >> Call-ID: >> 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP^M >> CSeq: 503124310 INVITE^M >> Server: Asterisk PBX 18.14.0^M >> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, >> PUBLISH, MESSAGE^M >> Supported: replaces, timer^M >> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", >> nonce="6cbb5c2f"^M >> Content-Length: 0^M >> >> I dont see a reason why it failed. >> I tried nat=yes, made no difference. >> I tried insecure=very, made no difference. >> >> I do have: >> externip=X >> localnet=Y >> localnet=Z >> set in sip.conf >> >> As I mentioned - I can call out over this SIP trunk. >> What next ? >> Jerry >> > > > Just added insecure=very again, stopped and started. > > > [JJ] > type=friend > dtmfmode=rfc2833 > secret=yes > username=NUMBER > defaultuser=NUMBER > disallow=all > allow=ulaw > allow=alaw > context=smvoice-incoming > host=dnsname > canreinvite=yes > qualify=yes > insecure=very > > Got the same 401. > Thanks > > Jerry > > Thank you for the suggestions - it got me to this insecure=port,invite This worked. Jerry -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] 401 error
On Fri, Mar 10, 2023 at 9:49 AM Jerry Geis wrote: > > > On Thu, Mar 9, 2023 at 9:42 PM Jerry Geis wrote: > >> I have a SIP trunk - calls going out work fine. >> >> Trying to setup an incoming call with a DNIS >> >> When I dial the number - I see nothing on the CLI. >> The person says the server is returning 401 >> >> How do I debug that. Using asterisk 18.8.0 >> >> Thanks >> >> Jerry >> > > Thanks I am using chan_sip. Turning on "sip set debug on" I do se it. > > > > Using INVITE request as basis request - > 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP > Found peer 'JJ' for 'phone' from IP:5060 > > <--- Reliably Transmitting (no NAT) to IP:5060 ---> > SIP/2.0 401 Unauthorized^M > Via: SIP/2.0/UDP > IP:5060;branch=z9hG4bK+13778ac6c6ac51ac853b3fb4a387e5b71+sip+3+ae5ab1a2;received=IP^M > From: "Caller" ;tag=IP+3+67d18b6f+9e6ad02d^M > To: ;tag=as128621a0^M > Call-ID: > 0gQAAC8WAAACBAAALxYAAJJTfs5d3xOERBazRh4eM17uDp4m3CsM7ZnaEtaSRzwP@IP^M > CSeq: 503124310 INVITE^M > Server: Asterisk PBX 18.14.0^M > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH, MESSAGE^M > Supported: replaces, timer^M > WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", > nonce="6cbb5c2f"^M > Content-Length: 0^M > > I dont see a reason why it failed. > I tried nat=yes, made no difference. > I tried insecure=very, made no difference. > > I do have: > externip=X > localnet=Y > localnet=Z > set in sip.conf > > As I mentioned - I can call out over this SIP trunk. > What next ? > Jerry > Just added insecure=very again, stopped and started. [JJ] type=friend dtmfmode=rfc2833 secret=yes username=NUMBER defaultuser=NUMBER disallow=all allow=ulaw allow=alaw context=smvoice-incoming host=dnsname canreinvite=yes qualify=yes insecure=very Got the same 401. Thanks Jerry -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users