Pjsip configuration for a SIP trunk

Hi all need some help.
I have installed Asterisks and the calls are coming through a SIP trunk.
But I get this error

[Feb 18 11:38:47] NOTICE[24082]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“761408069” sip:761408069@10.43.38.4;user=phone’ failed for ‘10.43.38.4:5077’ (callid: 069l410a245i4z97a89i30a462j26457@10.18.5.64) - No matching endpoint found

So when I add following to the pjsip.conf it works fine.

[761408069]
type=endpoint
context=from-internal
disallow=all
allow=alaw
aors=761408069

[761408069]
type=aor
max_contacts=2

But the problem is this works only for this specified number.
As it is not possible to create end points for every number, how can I configure to receive requests from any number?

Depending on the modules loaded, Asterisk can match SIP requests to an
; endpoint or aor in a few ways:
;
; 1) Match a section name for endpoint type sections to the username in the
; “From” header of inbound SIP requests.
; 2) Match a section name for aor type sections to the username in the “To”
; header of inbound SIP REGISTER requests.
; 3) With an identify type section configured, match an inbound SIP request of
; any type to an endpoint or aor based on the IP source address of the
; request.

You can do the match based on the source IP

1 Like

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