Initial LisgloSIPS V2 implementation

This commit is contained in:
hectorzhao
2026-06-22 10:56:38 +08:00
commit 5fa1bd35e9
303 changed files with 35644 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
#### LisgloSIPS S18 OpenSIPS baseline ####
log_level=3
xlog_level=3
stderror_enabled=no
syslog_enabled=yes
syslog_facility=LOG_LOCAL0
udp_workers=4
auto_aliases=no
socket=udp:100.90.90.90:15060
socket=hep_udp:127.0.0.1:9061
mpath="/usr/lib/x86_64-linux-gnu/opensips/modules/"
loadmodule "proto_udp.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
modparam("tm", "fr_timeout", 5)
modparam("tm", "fr_inv_timeout", 30)
loadmodule "maxfwd.so"
loadmodule "sipmsgops.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/run/opensips/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0660)
loadmodule "httpd.so"
modparam("httpd", "ip", "127.0.0.1")
modparam("httpd", "port", 8888)
loadmodule "mi_http.so"
modparam("mi_http", "root", "mi")
loadmodule "auth.so"
modparam("auth", "nonce_expire", 300)
modparam("auth", "disable_nonce_check", 0)
loadmodule "pike.so"
modparam("pike", "sampling_time_unit", 2)
modparam("pike", "reqs_density_per_unit", 16)
modparam("pike", "remove_latency", 120)
loadmodule "ratelimit.so"
loadmodule "cachedb_redis.so"
loadmodule "proto_hep.so"
modparam("proto_hep", "hep_id", "[homer] 100.90.90.91:9060; transport=udp; version=3")
loadmodule "tracer.so"
modparam("tracer", "trace_on", 1)
modparam("tracer", "trace_id", "[s18_hep]uri=hep:homer")
route {
if (!mf_process_maxfwd_header(10)) {
send_reply(483, "Too Many Hops");
exit;
}
trace("s18_hep", "m", "sip|xlog");
if (!pike_check_req()) {
xlog("L_WARN", "S18 pike blocked source=$si method=$rm callid=$ci\n");
send_reply(403, "Rate Limited");
exit;
}
if (has_totag()) {
send_reply(481, "Dialog Not Found");
exit;
}
if (is_method("OPTIONS") && $rU == NULL) {
send_reply(200, "Keepalive");
exit;
}
if (is_method("REGISTER")) {
append_to_reply("WWW-Authenticate: Digest realm=\"lisglosips.local\", nonce=\"s18-baseline\", algorithm=MD5, qop=\"auth\"\r\n");
send_reply(401, "Authentication Required");
exit;
}
if (is_method("INVITE")) {
xlog("L_INFO", "S18 route placeholder rejected INVITE source=$si callid=$ci\n");
send_reply(503, "Routing Not Ready");
exit;
}
send_reply(405, "Method Not Allowed");
exit;
}
@@ -0,0 +1,8 @@
# LisgloSIPS S18 OpenSIPS startup options
RUN_OPENSIPS=yes
USER=opensips
GROUP=opensips
S_MEMORY=128
P_MEMORY=16
DUMP_CORE=no
OPTIONS=""