On 18.10.2021 12:08, Alain Bieuzent wrote:

When I try to concatenate with $var(result) = $avp(id_asterisk) + "|" + $avp(codecs);) I got this error message :

ERROR:core:eval_elem: invalid numeric operands

WARNING:core:do_assign: no value in right expression at /usr/local//etc/opensips/opensips.cfg:881

Hi,

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:

$var(result) = "" + $avp(id_asterisk) + "|" + $avp(codecs);

Best Regards,

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS eBootcamp 2021: www.opensips.org/training

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to