[Serusers] log

Andres andres at telesip.net
Wed Feb 4 22:39:44 CET 2004


Dinesh wrote:

>For a REGISTER will the below be true if the UA that is registering has
>a 5 in the 4th digit
>
>ie  1115999 true
>    1114999 false
>
>if (uri=~"[0-9][0-9][0-9]5") 
>
>I saw some where in the docs that "User name is optional (it is for
>example never included in REGISTER requests)"
>
>Thanks,
>Dinesh
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>  
>
So I take you are simply trying to centrally manage whether a user is to 
be foced through the RTPProxy or not.  Seems your are trying to do this 
with a numbering scheme which is quite cumbersom.  We are testing a more 
flexible approach based on acl groups.  We simply defined a new acl 
group called "rtp_proxy".  On a request like REGISTER or INVITE, Ser 
will check if either the "From" or "To" usernames belong to the group 
and apply the RTPProxy.  Something like:

        # Check if caller is on the rtp_proxy group
        if (is_user_in("From", "rtp_proxy")) {
                setflag(2); 
                force_rport();
                fix_nated_contact();
                exec_msg("echo `date` - Caller is in rtp_proxy group - 
From: $SIP_HF_FROM To: $SIP_HF_TO  Contact: $SIP_HF_CONTACT >> 
/var/log/ser/rtp_proxy.log");
        };

        # Check if called user is on the rtp_proxy group
        if ((is_user_in("To", "rtp_proxy")) & !(isflagset(2)) {
                setflag(2); 
                force_rport();
                fix_nated_contact();
                exec_msg("echo `date` - Called User is in rtp_proxy 
group - From: $SIP_HF_FROM To: $SIP_HF_TO  Contact: $SIP_HF_CONTACT >> 
/var/log/ser/rtp_proxy.log");
        };
.
.
.
        if (method=="INVITE") {
                if (isflagset(2)) { # rtp_proxy group ?
                         force_rtp_proxy();

               };
         #       /* set up reply processing */
                t_on_reply("1");
        };


-- 
Andres
Network Admin
http://www.telesip.net





More information about the sr-users mailing list