[SR-Users] using forward() with variables

Pan B. Christensen pan at ibidium.no
Thu Dec 2 16:57:38 CET 2010


Hello,

We are running Kamailio 1.5.

I'm trying to use the forward() function with a variable like this:
    forward($shv(voip1-edge1));

That fails to parse.
I then tried this, which I thought would fail:
    forward("$shv(voip1-edge1)");

That parsed correctly, but it then failed to resolve the domain '$shv(voip1-edge1)' as expected. Why can this function not use variables?

I tried to make a workaround by doing this:
    $du=$ru;
    $dd=$shv(voip1-edge1);
    forward();

That also failed. Why is $du writable but $dd is not?

I then made a fourth attempt, which seems to work:
    $du="sip:" + $shv(voip1-edge1);
    forward();

With kind regards,
Pan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20101202/979c65b9/attachment.htm>


More information about the sr-users mailing list