[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sems
Subject:    [Sems] new stuff in sbc module (devel)
From:       Stefan Sayer <stefan.sayer () googlemail ! com>
Date:       2011-01-11 0:28:02
Message-ID: 4D2BA412.7060303 () googlemail ! com
[Download RAW message or body]

Hi,

for those who are not following commit logs, some new interesting 
functionality is available in the devel version of SEMS for the sbc 
module: src/destination IP address replacements, append_headers 
profile option, refuse_with profile option, regex maps, and much more 
flexible profile selection. Here follows short description:

1. src/destination IP address replacements
$si/$sp and $Ri/$Rp can be used to get the source/destination IP/port.

2. append_headers option
Using the append_headers option, some headers may be added to the 
initial INVITE. Those headers may also contain replacements, e.g.
append_headers="P-Source-IP: $si\r\nP-Source-Port: $sp\r\n"

3. refuse_with
If some calls should not be established, but refused with a certain 
response code, this can be achieved with refuse_with:
  refuse_with="403 Invalid Domain $rd"
append_headers works here, so that's possible:
  refuse_with="403 Forbidden"
  append_headers="Warning: 393 $rd \"Incoming calls not allowed\""

4. regex maps
In many cases, especially when selecting the active profile, it may be 
necessary to match some element of the message with some regular 
expression. For example, if all calls from a certain IP range should 
be blocked, or, if calls to a certain domain should get a special 
value in a header etc. For this, a regex=>string mapping, known from 
the application $(mapping), can be loaded and the regular expressions 
precompiled into the sbc, and then used with the $M pattern replacement.

5. Profile selection
The active_profile option now can be set as a comma-separated list - 
the first matching (non-empty) profile in that list will be used. For 
example, if a header P-SBCProfile is present, one should use the 
profile indicated there, if not present, use the 'refuse' profile:
  active_profile=$(P-SBCProfile),refuse
Combined with $si and regex maps, we can now select profiles depending 
on e.g. source IP/port of the message:
   active_profile=$$M($si=>ipmap),refuse


Any feedback on this is highly appreciated.

Stefan

-- 
Stefan Sayer
VoIP Services Consulting and Development

Warschauer Str. 24
10243 Berlin

tel:+491621366449
sip:sayer@iptel.org
email/xmpp:stefan.sayer@gmail.com


_______________________________________________
Sems mailing list
Sems@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/sems
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic