[Serusers] Is there any way to validate the RTP/media address?

Frank Durda IV frank.durda at hypercube-llc.com
Wed Aug 19 04:37:21 CEST 2009


I am receiving INVITEs from a specific source, and I have a need
to test the media IP address specified in the SDP payload against
a list of approved netblocks.   I'd like to catch this in the
INVITE and reject the call if a RTP address in the SDP payload is
out of a pre-defined range for that given source.

Is there a way to get this address into a variable that can be
used in "if" statements?  As in something like this?

    if (src_ip==17.18.19.20 && method=="INVITE") {  
        if (rtp_addr!=17.0.0.0/8) {
            sl_reply("502", "Rejected - Unauthorized RTP source");
            drop;
        }
    }

with rtp_addr being the made-up, hope-something-like-it-exists
thing.

Thanks in advance.



More information about the Serusers mailing list