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])+@thirdtower.com" && !lookup()) { seturi("sip:voicemail@thirdtower.com/$1"); }
Which would mean "if someone calls to "sip:someone@thirdtower.com" but "someone" is unknown / unregistered, forward to "sip:voicemail@thirdtower.com/someone".
Greetings, Sybren
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])+@thirdtower.com" && !lookup()) { seturi("sip:voicemail@thirdtower.com/$1"); }
Which would mean "if someone calls to "sip:someone@thirdtower.com" but "someone" is unknown / unregistered, forward to "sip:voicemail@thirdtower.com/someone".
Greetings, Sybren