Try if (!allow_trusted("$si")) { xlog("L_INFO","\n\n--NOT trusted! - $si - $proto"); sl_send_reply("403", "Forbidden"); exit; }
________________________________ Alexandru Covalschi VoIP Engineer and System Administrator tel: +373 673 98 493
27 нояб. 2017 г., в 11:48, voipspace voipspace voipspace@yandex.com написал(а):
}
Hi,
On Tue, Nov 28, 2017 at 1:47 AM, voipspace voipspace voipspace@yandex.com wrote:
Unfortunately that does not work. Second argument is required
Try it with only if (!allow_trusted()) { ... }
If you check against the source address, you don't need an argument at all.
I don't know if some pattern is needed for the trusted entry to work. In our setup the trusted entries look like this:
item: { ip: w.x.y.z proto: 0 pattern: ^sip:.*$ ruri_pattern: NULL tag: NULL priority: 0 }
Regards, Sebastian
Hello,
one more thing to check -- the comparison is done by comparing the string values, be sure there is no whitespace around.
On the other hand, if you do not need the pattern matching, I suggest to use address table instead of trusted table, it is better optimized for ip and network address matching.
Cheers, Daniel
On 28.11.17 09:41, Sebastian Damm wrote:
Hi,
On Tue, Nov 28, 2017 at 1:47 AM, voipspace voipspace voipspace@yandex.com wrote:
Unfortunately that does not work. Second argument is required
Try it with only if (!allow_trusted()) { ... }
If you check against the source address, you don't need an argument at all.
I don't know if some pattern is needed for the trusted entry to work. In our setup the trusted entries look like this:
item: { ip: w.x.y.z proto: 0 pattern: ^sip:.*$ ruri_pattern: NULL tag: NULL priority: 0 }
Regards, Sebastian
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users