[Serusers] Expressions in config file

Daniel-Constantin Mierla Daniel-Constantin.Mierla at fokus.fraunhofer.de
Wed Nov 24 11:45:58 CET 2004


You can use subst_uri() from textops module -- it does perl-like regexp 
operations over request uri.

Daniel


On 11/24/04 00:59, Sybren Stüvel wrote:

>Hi there,
>
>Is there any way to use expressions in the route configuration? I'd
>love to use something like:
>
>if(uri=~"sip:([a-z])+ at thirdtower.com" && !lookup()) {
>    seturi("sip:voicemail at thirdtower.com/$1");
>}
>
>Which would mean "if someone calls to "sip:someone at thirdtower.com" but
>"someone" is unknown / unregistered, forward to
>"sip:voicemail at thirdtower.com/someone".
>
>Greetings,
>Sybren
>  
>




More information about the sr-users mailing list