[Serusers] ser.cfg: location matching
Hi all. My problem is a configuring one. Let's say that I want to log every INVITE request from user 'alice@foo.bar' at network 192.168.0, to user 'bob@foo.bar' at network !(192.168.0). Is this config excerpt right for my purposes?: if (uri==myself) { ... #basic config if (!lookup("location")) { sl_send_reply("404","Not Found"); break; }; if (method=="INVITE" && uri=~"@!(192\.168\.0).*") { log(1,"INVITE for a different network\n"); }; }; I might be mistaken on thinking that after doing the 'lookup("location")', the uri gets rewritten to 'bob@123.232.3.45', i.e. the Contact information of the callee. I'd appreciate anyone pointed me in the right direction. Thanks for your help. Eduard San Anselmo
On Feb 25, 2004 at 18:51, Eduard San Anselmo Mateu <esananselmo@albasoft.com> wrote:
Hi all.
My problem is a configuring one.
Let's say that I want to log every INVITE request from user 'alice@foo.bar' at network 192.168.0, to user 'bob@foo.bar' at network !(192.168.0). Is this config excerpt right for my purposes?:
if (uri==myself) {
... #basic config
if (!lookup("location")) { sl_send_reply("404","Not Found"); break; }; if (method=="INVITE" && uri=~"@!(192\.168\.0).*") { log(1,"INVITE for a different network\n"); };
};
I might be mistaken on thinking that after doing the 'lookup("location")', the uri gets rewritten to 'bob@123.232.3.45', i.e. the Contact information of the callee. I'd appreciate anyone pointed me in the right direction.
Yes, you are right the uri will be re-written, and subsequent uri=~something will work on the new uri. Andrei
participants (2)
-
Andrei Pelinescu-Onciul -
Eduard San Anselmo Mateu