SIP Trunking not authorize

I want to do SIP trunking through Volans( equipment provided by a VOIP service provider. However, upon receiving an INVITE, Asterisk returns 401 Unathorized, sending No matching endpoint found twice and Fail to authenticate once.

Looking for someone who knows a solution to this.
If necessary, sip.conf can be provided.

–fail message —

[2023-01-03 14:40:29] NOTICE[679078]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“----------” sip:----------@---.---.---.---’ failed for ‘—.—.—.—:----’ (callid: ---------8b29-11ed-a469-a94f9ceb063a) - No matching endpoint found

[2023-01-03 14:40:29] NOTICE[679078]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“----------” sip:-----------@---.---.---.---’ failed for ‘—.—.—.-:----’ (callid: ----------8b29-11ed-a469-a94f9ceb063a) - No matching endpoint found

[2023-01-03 14:40:29] NOTICE[679078]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“-----------” sip:------------@---.---.---.---’ failed for ‘—.—.—.—:----’ (callid: -----------8b29-11ed-a469-a94f9ceb063a) - Failed to authenticate

“No matching endpoint found” may cause by no any incoming route for DID sent by remote trunk.

Thanks for response. Where should I touch the DID settings? The number, ip, and host are set in sip.conf. Please refer to the two images uploaded above.

DID is: PBX_070… , your server can’t find out where PBX_070… is, so it respond “No matching endpoint”

1 Like

You mention sip.conf but this is for chan_sip, while the message is from chan_pjsip. Which channel driver are you actually using?

We are using chan_sip. We don’t use pjsip, so this puzzled us.

The chan_pjsip module is configured then for SIP traffic, and your traffic is arriving to it instead of chan_sip.

Then configuration with pjsip will solve it?
Or is it possible to disable pjsip?

Either is an option, but you should first try to determine WHY PJSIP is listening for SIP traffic. It WILL NOT do that by default. By default it won’t do anything. This means something has configured it to do so.

Thank you for your reply. If the other party is a pjsip protocol driver, can it be solved by changing to pjsip? Is it because we use chan_sip? Or is it because the pjsip driver works by default due to the use of version 18?

PJSIP implements SIP. It works with anything SIP. You should be able to use it with the provider if configured.

The PJSIP driver by default will build, but it has to be configured to actually be active. It won’t just accept SIP traffic without configuration - so something or someone has configured it to do so.

1 Like

Incoming route and DID are FreePBX terms. If the OP really is using FreePBX, they should use the FreePBX peer support forum. (DID is (mis)used more commonly in the VoIP world, but is not meaningful to Asterisk. FreePBX DIDs are just Asterisk extensions.)

You should be, fairly urgently, planning to move everything to chan_pjsip, as this Autumn’s release of Asterisk will not include chan_sip, at all, and bugs in chan_sip are unlikely to be worked on. chan_pjsip is an alternative implementation of the protocol, not a different protocol.

thank you.
After moving to pjsip, inbound works. We’re still struggling with outbound.
Thank you again.

thank you We are not using FreePBX because of its GUI interface. After migrating to pjsip, inbound was resolved. Converting to pjsip was one solution.

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