etc/kamailio.cfg: do not relay to foreign network if auth is not enabled
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 15 Mar 2018 07:55:22 +0000 (08:55 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 15 Mar 2018 07:55:22 +0000 (08:55 +0100)
- anyone can use a local account and flood external systems

etc/kamailio.cfg

index eb46863..b55e06b 100644 (file)
@@ -750,6 +750,14 @@ route[AUTH] {
                exit;
        }
 
+#!else
+
+       # authentication not enabled - do not relay at all to foreign networks
+       if(uri!=myself) {
+               sl_send_reply("403","Not relaying");
+               exit;
+       }
+
 #!endif
        return;
 }