No matching End point issue fixing

This message Show in my Asterisk CLI


[Feb 20 11:03:36] NOTICE[28271]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '"7708xxxxx" <sip:7708xxxxx@172.20.xx.xx;user=phone>' failed for '172.16.x.x:5060' (callid: isbc78i6wj7ctwcmcsjewn5s77w6s8sttcic@10.18.5.64) - No matching endpoint found


[Feb 20 11:03:16] NOTICE[28271]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '"07720xxxxx" <sip:07720xxxxx@172.20.xx.xx;user=phone>' failed for '172.16.x.x:5060' (callid: isbc7cewntite75esentt6t6578uieemspun@10.18.5.64) - No matching endpoint found

In here 7708xxxxx and 07720xxxxx both are customer numbers. In Every time I need to create endpoint for play the IVR. Can I fix this issue from Asterisk? Or how fix this?

It appears that the Asterisk CLI is indicating that incoming calls from specific numbers (e.g., “7708xxxxx” and “07720xxxxx”) are failing because there are no matching endpoints found. This typically happens when Asterisk receives a call for which it doesn’t have a corresponding endpoint definition.

To resolve this issue, you need to ensure that you have endpoint configurations in your Asterisk configuration that match the SIP addresses (URIs) from which these calls are originating. You can create endpoint definitions for these numbers so that Asterisk can properly handle incoming calls from them.

  1. Navigate to your Asterisk configuration directory, usually located at /etc/asterisk/.
  2. Open or create the file where you define your SIP endpoints. This file is typically named pjsip.conf or sip.conf, depending on the SIP channel driver you’re using (PJSIP or SIP).
  3. Add an endpoint configuration for each SIP address (URI) from which you expect incoming calls. The configuration should include the necessary parameters such as type, context, host, secret, etc. Here’s a basic example:
[7708xxxxx]
type=endpoint
context=my-incoming-context ; Define the context where incoming calls will be handled
host=dynamic ; Set to 'dynamic' if the IP address can change
secret=yourpassword ; Set a secure password for authentication

Hello @danishhafeez , I already created endpoints. But the calls not went through out the IVR path. The Sip line directly configure with my Linux server ( which is installed the Asterisk).

can you share the sip log. it will be easy for us to debug the error

This is logger

[Feb 20 15:44:23] NOTICE[30739]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '"7708xxxxx" <sip:7708xxxxx@172.20.xx.xx;user=phone>' failed for '172.16.x.x:5060' (callid: isbc4iunifw7fxw7dfnf7d6dnfpiid8uujwx@10.18.5.64) - No matching endpoint found
<--- Transmitting SIP response (748 bytes) to UDP:172.16.x.x:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.16.x.x:5060;rport=5060;received=172.16.x.x;branch=z9hG4bKmb5jjnmabbdypzzuycyjgdnay;Role=3;Hpt=8ea8_16
Record-Route: <sip:172.16.x.x:5060;transport=udp;lr;Hpt=8ea8_16;CxtId=4;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=1913>
Call-ID: isbc4iunifw7fxw7dfnf7d6dnfpiid8uujwx@10.18.5.64
From: "7708xxxxx" <sip:7708xxxxx@172.20.xx.xx;user=phone>;tag=vf6otd7w-CC-1004-OFC-1391
To: "01120xxxxx" <sip:01120xxxxx@172.20.xx.xx;user=phone>;tag=z9hG4bKmb5jjnmabbdypzzuycyjgdnay
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1708424063/27781b38517b3c0f2ea4251ea6e38cb1",opaque="6d3a8f626dc1516e",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0

[Feb 20 15:44:23] NOTICE[30739]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“7708xxxxx” sip:7708xxxxx@172.20.xx.xx;user=phone’ failed for ‘172.16.x.x:5060’ (callid: isbc4iunifw7fxw7dfnf7d6dnfpiid8uujwx@10.18.5.64) - No matching endpoint found
<— Transmitting SIP response (748 bytes) to UDP:172.16.x.x:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.16.x.x:5060;rport=5060;received=172.16.x.x;branch=z9hG4bKmb5jjnmabbdypzzuycyjgdnay;Role=3;Hpt=8ea8_16
Record-Route: sip:172.16.x.x:5060;transport=udp;lr;Hpt=8ea8_16;CxtId=4;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=1913
Call-ID: isbc4iunifw7fxw7dfnf7d6dnfpiid8uujwx@10.18.5.64
From: “7708xxxxx” sip:7708xxxxx@172.20.xx.xx;user=phone;tag=vf6otd7w-CC-1004-OFC-1391
To: “01120xxxxx” sip:01120xxxxx@172.20.xx.xx;user=phone;tag=z9hG4bKmb5jjnmabbdypzzuycyjgdnay
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1708424063/27781b38517b3c0f2ea4251ea6e38cb1”,opaque=“6d3a8f626dc1516e”,algorithm=md5,qop=“auth”
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length: 0

first of all they are giving error of no matching endpoint. so you have to check your endpoint again may be it has bug.

second: SIP/2.0 401 Unauthorized
its mean issue of caller id may be your sip provider not allowed this caller id to send call.contact from your sip provider

Thank you @danishhafeez. I will contact SIP provider and try again.

Generally for SIP providers you match based on source IP address using a “type=identify” section. If you aren’t doing that, then that would explain it.

This is my endpoint.

[general]
context=public
allowoverlap=no
udpbindaddr=0.0.0.0:5061
tcpenable=yes
tcpbindaddr=0.0.0.0:5061
transport=udp
srvlookup=yes
qualify=yes

[authentication]
[basic-options](!)
dtmfmode=rfc2833
context=from-office
type=friend
[natted-phone](!,basic-options)
directmedia=no
host=dynamic
[public-phone](!,basic-options)
directmedia=yes
[my-codecs](!)
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
[ulaw-phone](!)
disallow=all
allow=ulaw


[01120xxxxx]
type=registration
outbound_auth=01120xxxxx
server_uri=sip:172.16.x.x
client_uri=sip:*@172.16.x.x
auth_rejection_permanent=no

[01120xxxxx]
type=auth
auth_type=userpass
username=Admin
password=xxxxx

[01120xxxxx]
type=aor
contact=sip:172.16.x.x
qualify_frequency=30
max_contacts = 10

[01120xxxxx]
type=endpoint
context=my_number
disallow=all
allow=alaw,ulaw
auth=01120xxxxx
outbound_auth=01120xxxxx
aors=01120xxxxx
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
from_user=01120xxxxx
from_domain=172.16.x.x

Is this Ok or are there any issue?

This is endpoint registration


 Endpoint:  01120xxxxx                                          Unavailable   0 of inf
    OutAuth:  01120xxxxx/Admin
     InAuth:  01120xxxxx/Admin
        Aor:  01120xxxxx                                        10
      Contact:  01120xxxxx/sip:172.16.x.x                  5699d0500e NonQual         nan

we made discussion with our sip provider they said like they do not have any authentication to reach they end point and also they advice us if we do configuration from asterisk we have to do trunk configuration to reach the end point.

we can ping endpoint ip 172.16.x.x from our Linux which install at asterisk
we can not understand why we can not reach the endpoint from our side?

this is sip show peers


Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description
01120xxxxx/01120xxxxx     172.16.x.x                                 Auto (No)  No             5060     OK (21 ms)

You seem to not have a type=idnentify

Can you give me an example ?

https://docs.asterisk.org/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/res_pjsip-Configuration-Examples/

I fixed this issue adding following code for pjsip.conf. Then Solved my problem

[registrar]
type=identify
endpoint=registrar
match=172.16.x.x.
match=172.20.xx.xx

[registrar]
type=aor
contact=sip:*@172.20.xx.xx:5060

[registrar]
type=endpoint
transport=transport-udp
context=from_external    ;dmse_IVR
disallow=all
allow=ulaw,alaw
aors=registrar
force_rport=yes
direct_media=no
rtp_symmetric=yes
rtp_timeout=120


[remote_atx]
type=identify
endpoint=remote_atx
match_header=X-Remote-Atx: true

[remote_atx]
type=endpoint
transport=transport-udp
context=from_external    ;dmse_IVR
disallow=all
allow=ulaw,alaw
aors=registrar
force_rport=yes
direct_media=no
rtp_symmetric=yes
refer_blind_progress=no
rtp_timeout=120
identify_by=header

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