<div dir="ltr">Got it working by setting:<div><br></div><div> $var(account)=$(au{s.select,0,-}{s.toupper}) + "-" + $(au{s.select,1,-});<br></div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">În mie., 10 iul. 2019 la 15:13, Ilie Soltanici <<a href="mailto:iliusha.md@gmail.com">iliusha.md@gmail.com</a>> a scris:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>Could someone help me to set a variable as a string in Kamailio?</div><div><br></div><div>At the moment i'm using the following statement: </div><div><br></div><div><b>$var(account)=$(au{s.substr,0,8}); </b></div><div><b>xlogl("L_INFO", "[1234] Account: $var(</b>

<b>account</b><b>)\n");<br></b></div><div><br></div><div>which is working fine, but i need to change it into:</div><div><br></div><div><b>$var(account)=$(au{s.select,0,-}{s.toupper})-$(au{s.select,1,-});</b>  <br></div><div><br></div><div>By doing this I'm getting the error:</div><div><br></div><div><i>[core/rvalue.c:1007]: rval_get_int(): automatic string to int conversion for "AT" failed<br>[core/rvalue.c:1912]: rval_expr_eval_int(): rval expression conversion to int failed (729,30-729,59)<br></i></div><div><b><br></b></div><div><div>I tried also: </div><div><br></div><div><b>$var(account)="" + "$(au{s.select,0,-}{s.toupper})-$(au{s.select,1,-})";</b><br></div></div><div><br></div><div>But, then I'm getting:</div><div><i>Account = $(au{s.select,0,-}{s.toupper})-$(au{s.select,1,-})<br></i></div><div>instead of the value.</div><div><br></div><div>What is the correct way to set it?</div><div><br></div><div>Thank you.</div></div>
</blockquote></div>