[SR-Users] Avoiding to send 603 DECLINED to un-trusted IPs - Is that possible with Kamilio?

Andrade Ricardo (CI/AFU1) Ricardo.Keigo at br.bosch.com
Mon Jul 25 18:44:43 CEST 2011


Hello Bruce,

Strangely, I've never gotten an Anonymous INVITE rejected by Asterisk with 603, but that was the version 1.4.
Let me try to help with your request for a solution with Kamailio.

These few lines could be added to your main route, after the place where your handle the registration. It will block any request from unregistered users:
Route {
...
                if (!registered("location")) {
                {
                        exit;
                }
...
}

I am assuming that you refer to the subscribers registered in the location table as "peers", I mean, they should be registered in Kamailio, not in asterisk. If not, you can do something similar with some database query. But let us know if that is the case.

Perhaps you'd be interested in these next ones as well, they helped me a short while ago to workaround on some issues with the code 603:

Module configurations:
modparam("tm", "disable_6xx_block", 1)

onreply_route
{
        if ($T_reply_code == "603")
        {
                drop;
        }
}

Best regards,
Ricardo.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110725/63e2d579/attachment.htm>


More information about the sr-users mailing list