<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18975">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hello,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>We are running Kamailio 1.5.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>I'm trying to use the forward() function with a 
variable like this:</FONT></DIV>
<DIV><FONT size=2 face=Arial>&nbsp;&nbsp;&nbsp; 
forward($shv(voip1-edge1));</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>That fails to parse.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I then tried this, which I thought would 
fail:</FONT></DIV>
<DIV><FONT size=2 face=Arial>
<DIV><FONT size=2 face=Arial>&nbsp;&nbsp;&nbsp; 
forward("$shv(voip1-edge1)");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>That parsed correctly, but it then failed to resolve the domain '<FONT 
size=2 face=Arial>$shv(voip1-edge1)' as expected. Why can this function not use 
variables?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I tried to make a workaround by doing this:</DIV>
<DIV>&nbsp;&nbsp;&nbsp; $du=$ru;<BR>&nbsp;&nbsp;&nbsp; 
$dd=$shv(voip1-edge1);<BR>&nbsp;&nbsp;&nbsp; forward();<BR></DIV>
<DIV>That also failed. Why is $du writable but $dd is not?</DIV>
<DIV>&nbsp;</DIV>
<DIV>I then made a fourth attempt, which seems to work:</DIV>
<DIV>&nbsp;&nbsp;&nbsp; $du="sip:" + $shv(voip1-edge1);<BR>&nbsp;&nbsp;&nbsp; 
forward();<BR></DIV>
<DIV>With kind regards,</DIV>
<DIV>Pan</DIV></FONT></DIV></BODY></HTML>