On Mon, Sep 24, 2007 at 01:32:10PM +0200, Andreas Sikkema wrote:
Is there a way for an OpenSER instance to detect
if an incoming INVITE message has earlier been
processed by itself? Record-Route is on, so there
should be a Route message, but I suppose the Via
headers could also contain the information.
OpenSER is protected to infinite loops vith maxfwd testing in default
config.
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
Another way is testing msg length also from default config:
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
I think it's enough, but you can write your own test based on
regular expression, for example:
if (search("Via: .*myip")) {
}
or something similiar. I don't know, if these loops are not normal in
special situations. I think maxfwd is better idea.
SAL