Equivalent for permit/deny in sip.conf for PJSIP

With chansip, you can use permit/deny in sip.conf to limit SIP traffic to and from a peer to a certain IP or network.

Is there an equivalent for pjsip as well?

Yes, it has the same permit and deny system[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Configuration_res_pjsip#Asterisk14Configuration_res_pjsip-endpoint_deny

In which configuration section do you set that parameter?

It can be configured on a per-endpoint basis or on a global basis[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip_acl

1 Like

One thing I couldn’t find.
Under what configuration section in pjsip.conf do I put those permit/deny parameters?

That depends on what exactly you want. If you want it to apply only to a specific endpoint, then in the configuration section for the endpoint. If you want it to be applied globally then you create an acl section with a “type=acl” option set and the configuration entries.