Inbound calls not working , but outbound calls working without issue using PJSIP

Hello all

I am recently configuring my freepbx based setup(PJSIP), am able to place outgoing calls using SIP trunk(connected to TSP using private network) but inbound calls not working. when I explicitly set allow Anonymous inbound SIP call & allow SIP guests to YES it works, doing sngrep I get output when above are set to NO and call drops the below thing is observed
^Idx Method SIP From SIP To Msgs Source Destination Call State
5 INVITE caller@domain callee@domain 3 source_ip:5060 destination_ip:5060 REJECTED

Do i need to keep allowing the anonymous thing as before to have inbound calls(any concern with mentioned method ?) or any other way…Thanks

One of the advantages of chan_pjsip is that it has the Match/Permit setting, in which you can set multiple addresses and address ranges for the source IP. Just get the full list from the provider and enter them there.

in sngrep only the data was getting shown when trying an inbound call, the latter part domain in sip from, sip to and source as well as an ip in destination(private ip) was already there in the match permit, still i’ll co-ordinate with them on this

Match permit has to be the source IP address, not anything from an application level header.

yes it’s the source ip used in match that permits csv, also the destination address in inbound call is the same proxy address that was set in trunk, two parameters were used the domain and proxy in match permit