[SR-Users] problem with rewriteuri

Henning Westerholt hw at kamailio.org
Sun Aug 12 10:16:56 CEST 2018


Am Freitag, 10. August 2018, 23:43:05 CEST schrieb Eric Hosch:
> If I manually pass a string value to rewriteuri it works, but if I pass the
> same string from a database value it doesn't:
> 
> if ($dbr(ra=>[0,4]) == "callfwd_noanswer") {    $
> does not work --> rewriteuri("$dbr(ra=>[0,6])");
> works -->                rewriteuri("sip:someone at somewhere");
>                                 append_branch();

Hello Eric,

the rewriteuri function is a rather old core function, and I think not support 
this pseudo-variable functionality that you use for the DB value.

Use the appropriate PV $ru should work:

https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#ru_-_request_uri

Best regards,

Henning

-- 
Henning Westerholt
https://skalatan.de/blog/



More information about the sr-users mailing list