Kamailio
1 program
Added 2026-02-16T12:00:00Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Kamailio Script, SER Script
Provenance: commit 405cf84609 · authored 2026-02-16T17:18:08+01:00 · agent claude-code · model sonnet
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Basic SIP Routing Script
Provenance: commit 405cf84609 · authored 2026-02-16T17:18:08+01:00 · agent claude-code · model sonnet · WebSearch disabled
# Basic Kamailio routing script
request_route {
# per request initial checks
route(REQINIT);
# handle requests within SIP dialogs
route(WITHINDLG);
# handle registrations
route(REGISTRAR);
# handle routing
if (!route(RELAY)) {
sl_send_reply("500", "Server Error");
}
}
route[REQINIT] {
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
exit;
}
if (!sanity_check("1511", "7")) {
xlog("Malformed SIP message from $si:$sp\n");
exit;
}
}
route[WITHINDLG] {
if (has_totag()) {
if (loose_route()) {
route(RELAY);
} else {
if (is_method("ACK")) {
if (t_check_trans()) {
route(RELAY);
exit;
}
}
sl_send_reply("404", "Not here");
}
exit;
}
}
route[REGISTRAR] {
if (is_method("REGISTER")) {
if (!save("location")) {
sl_reply_error();
}
exit;
}
}
route[RELAY] {
if (!t_relay()) {
sl_reply_error();
}
exit;
}