<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 18.10.2021 12:08, Alain Bieuzent
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:EBBDA0F5-E44F-4FD6-B11D-CB167432A7A1@free.fr">
<p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">When
I try to concatenate with $var(result) = $avp(id_asterisk) +
"|" + $avp(codecs);) I got this error message :<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">ERROR:core:eval_elem:
invalid numeric operands<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt" lang="EN-US">WARNING:core:do_assign:
no value in right expression at
/usr/local//etc/opensips/opensips.cfg:881<o:p></o:p></span></p>
</blockquote>
<p><font face="monospace">Hi,</font></p>
<p><font face="monospace">The issue is that $avp(id_asterisk)
contains an integer, so you cannot do "integer + string"
concatenation in OpenSIPS. However, what's interesting is that
the OpenSIPS config language actually allows "string + integer"
concatenation! So just fix it like this:<span
style="font-size:11.0pt" lang="EN-US"><br>
</span></font></p>
<p><font face="monospace"><span style="font-size:11.0pt"
lang="EN-US">$var(result) = "" + $avp(id_asterisk) + "|" +
$avp(codecs);</span></font><font face="monospace"></font></p>
<p></p>
<p><span style="font-size:11.0pt" lang="EN-US"><font
face="monospace">Best Regards,</font><br>
</span></p>
<pre class="moz-signature" cols="72">--
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021: <a class="moz-txt-link-abbreviated" href="http://www.opensips.org/training">www.opensips.org/training</a></pre>
</body>
</html>