Looks more comprehensive than mine. Thanks!
Sean O'Donnell
---- On Wed, 8 Jun 2011, Klaus Darilion (klaus.mailinglists(a)pernau.at) wrote:
Anyway - not standard conform but efficient (put somewhere in the beginning)
force_rport();
if (is_method("OPTIONS")) {
sl_send_reply("200","OK");
exit;
}
# sipura/linksys keepalive
if (is_method("NOTIFY")) {
if ( search("^Event: keep-alive") ) {
sl_send_reply("200","Keep Alive");
exit;
}
}
# ignore requests generated by sipvicious
# User-Agent: friendly-scanner
if ($ua == "friendly-scanner") {
exit;
}
regards
Klaus
Am 08.06.2011 18:28, schrieb Sean O'Donnell:
Hi:
We're running kamailio 1.5.5 as part of our VoIP infrastructure. One of our
service providers
has an SBC that sends an OPTIONS messages with a Max-Forwards of 0.
Looking at RFC 3261 section 11, this seems to be a valid method of forcing the
proxy to respond to the OPTIONS.
However, the standard initial sanity checks in most proxy configs will reject
this message. I fixed our script
by changing to this:
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
if( method != "OPTIONS" ) {
sl_send_reply("483","Too Many Hops");
return;
};
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
return;
};
but does anyone have a better solution?
Thanks,
Sean O'Donnell
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users