[Serusers] ser.cfg: location matching

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Wed Feb 25 20:15:13 CET 2004


On Feb 25, 2004 at 18:51, Eduard San Anselmo Mateu <esananselmo at 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 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.

Yes, you are right the uri will be re-written, and subsequent
uri=~something will work on the new uri.

Andrei




More information about the sr-users mailing list