I need help on PJSIP realtime inbound authentication by IP

I am unable to configure a host based IP authentication for a SIP provider. The SIP provider is delivering me calls with no authentication and I need to authenticate it just using the IP. I am using PJSIP realtime.

I have a provider named “pbxdev” sending me calls from IP 88.99.39.9

In sorcery.conf I have:

[res_pjsip]
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact=realtime,ps_contacts
identify=realtime,ps_endpoint_id_ips

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips

[res_pjsip_publish_asterisk]
asterisk-publication=realtime,ps_asterisk_publications

[res_pjsip_outbound_publish]
outbound-publish=realtime,ps_outbound_publishes

[res_pjsip_pubsub]
inbound-publication=realtime,ps_inbound_publications

In extconfig.conf

ps_endpoints => odbc,asterisk1,ps_endpoints,1
ps_auths => odbc,asterisk1,ps_auths,1
ps_aors => odbc,asterisk1,ps_aors,1
ps_domain_aliases => odbc,asterisk1,ps_domain_aliases,1
ps_endpoint_id_ips => odbc,asterisk1,ps_endpoint_id_ips,1
ps_contacts => odbc,asterisk1,ps_contacts,1

In ps_endpoints table I have:

id - pbxdev
aors - pbxdev
auth - NULL

In ps_endpoints_id_ips table I have:

id - pbxdev
endpoint - pbxdev
match - 88.99.39.9/32

When the calls are arriving, asterisk replies with a “401 Unauthorized” and in the asterisk console I see:

[2020-11-22 23:52:04] NOTICE[31929]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘sip:13022023344@88.99.39.9’ failed for ‘88.99.39.9:5060’ (callid: 0aa73eb471e8634b02a0e66d7d25c8d4@88.99.39.9:5060) - No matching endpoint found

Where is my mistake?

Thank you

A netmask of /32 is degenerate. Maybe it doesn’t know how to construct /255.255.255.255 from that.

Configure the endpoint on the table ps_endpoint_id_ips

I suppose to have configured the endpoing “pbxdev” in both the ps_endpoints and ps_endpoint_id_ips, am I wrong?