[Serusers] ser.cfg: location matching

Eduard San Anselmo Mateu esananselmo at albasoft.com
Wed Feb 25 18:51:02 CET 2004


Hi all.

My problem is a configuring one.

Let's say that I want to log every INVITE request from user 'alice at foo.bar' at
network 192.168.0, to user 'bob at 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 at 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




More information about the sr-users mailing list