<div dir="ltr"><div><div><div><div><div><div>Hello,<br><br></div>I'm a a bit confused as to when string concatenation will work in kamailio config file. So far I have identified the following cases:<br><br></div>Working:<br><div style="margin-left:40px"><br></div><div style="margin-left:40px">As part of the right hand side of an assignment:<br></div><div style="margin-left:40px">$var(x) = "string1" + "string2";<br><br></div><div style="margin-left:40px">String argument of some functions:<br></div><div style="margin-left:40px">xlog("L_ERR", "string1" + "string2" + DEFINED_STRING + '\n');<br><br></div><div style="margin-left:40px">Conditional Statements:<br></div><div style="margin-left:40px">if ( ru =~ "$" + "sip:" + $var(user) ) {<br></div><div style="margin-left:40px"><br></div>Not Working:<br><div style="margin-left:40px"><br></div><div style="margin-left:40px">In string transformations (the fact that quotes is not part of the argument should give a hint though:<br></div><div style="margin-left:40px">$var(x) = $(var(y){s.replace,match,"repl1" + "repl2"});<br><br></div><div style="margin-left:40px">String argument of some other functions:<br>append_hf_value("P-Asserted-Identity", "<" + "$var(new_pai)" + ">");<br></div><div style="margin-left:40px">lookup("location", "sip:$var(username)@" + SIP_REALM_DEFINITION));<br></div><div style="margin-left:40px"><br></div><div style="margin-left:40px">In module parameter definitions:<br>modparam("nathelper", "sipping_from", "sip:keepalive@" + SIP_REALM_DEFINITION)<br></div><br></div>So far, I have found this to be fairly consistent, except for use within functions. For example, string concatenation works for the second argument of xlog, but not for the string arguments of append_hf_value() or lookup().<br><br></div>Is there anyway to know this for each function beforehand, or is my only choice to go through trial and error here? Thanks!<br><br></div>BR,<br></div>George<br></div>