Got it working by setting:

 $var(account)=$(au{s.select,0,-}{s.toupper}) + "-" + $(au{s.select,1,-});

Thanks

În mie., 10 iul. 2019 la 15:13, Ilie Soltanici <iliusha.md@gmail.com> a scris:
Hello,

Could someone help me to set a variable as a string in Kamailio?

At the moment i'm using the following statement: 

$var(account)=$(au{s.substr,0,8}); 
xlogl("L_INFO", "[1234] Account: $var( account)\n");

which is working fine, but i need to change it into:

$var(account)=$(au{s.select,0,-}{s.toupper})-$(au{s.select,1,-});  

By doing this I'm getting the error:

[core/rvalue.c:1007]: rval_get_int(): automatic string to int conversion for "AT" failed
[core/rvalue.c:1912]: rval_expr_eval_int(): rval expression conversion to int failed (729,30-729,59)

I tried also: 

$var(account)="" + "$(au{s.select,0,-}{s.toupper})-$(au{s.select,1,-})";

But, then I'm getting:
Account = $(au{s.select,0,-}{s.toupper})-$(au{s.select,1,-})
instead of the value.

What is the correct way to set it?

Thank you.