[sr-dev] support r-uri pattern in lcr module

Juha Heinanen jh at tutpro.com
Thu Apr 19 19:23:21 CEST 2012


Andreas Granig writes:

> I'd like to intoduce a way to perform pattern matching on the R-URI in
> addition to the plain prefix matching of R-URI-User. The use case is for
> example to only allow numeric destinations on one gw, whereas another
> one could accept alphanumeric ones as well (e.g. plain SIP peers
> compared to peers towards PSTN gateways).
> 
> Any comments/opinions on that?

andreas,

regex matching has not been part of lcr module on purpose, because it is
difficult to determine, how one regex match is "better" than another
match.  also it is difficult to achieve O(logN) performance while doing
regex matching.

if your ruri user is not a phone number, but ruri is regular "userid"
style uri of some domain, then i would think that userpart of the uri
does not matter and routing should be done by the hostpart (= domain).
it hard to me to imagine that one gateway would serve some users of the
domain, but not some others.

if you need to do regex matching, then i would recommend using dialplan
module either alone or as the first step before using lcr module as is
as the second step.

-- juha






More information about the sr-dev mailing list