I have set up Kamailio and am quite new to the process, I'm able to register with FQDN and IP directly to Kamailio but my main setup is Kamailio as edge proxy to asterisk to allow register only with FQDN and not IP ,using tls also, just for allowing registration with FQDN and relay all request directly to PBX.
route
{
if (!is_domain("$hdr(Contact:user)"))
{
sl_send_reply("403", "Forbidden");
exit;
}
t_relay();
}
I found this and implemented it on kamailio.cfg but not working, Appreciate to help point me in the right direction.
is_domain(is_domain_local in the currentr version) will match all domains of current host by default.
If your domain table is not set, it will be auto-discovery and IP also in the list.
You can give kamailio exact list of domain in table.
Another option is use regexp match.