[SR-Users] auth by IP

Yu Boot yu at yu-boot.ru
Fri Apr 19 08:44:14 CEST 2019


Following code snippet from default kamailio.cfg never gives 403 if you 
smart enough to set "fromdomain" parameter on Asterisk to Kamailio's IP. 
How to fix it? I want password-based registration (which is OK now) and 
permit calls via Kamailio only from permitted IPs.


         # if caller is not local subscriber, then check if it calls
         # a local destination, otherwise deny, not an open relay here
         if (from_uri!=myself && uri!=myself) {
                 sl_send_reply("403","Not relaying");
                 exit;
         }




More information about the sr-users mailing list