--- Functionality changes from Asterisk 10 to Asterisk 11 --------------------
------------------------------------------------------------------------------
+Core
+----
+ * The expression parser now recognizes the ABS() absolute value function,
+ which will convert negative floating point values to positive values.
+
ConfBridge
-------------------
* Added menu action admin_toggle_mute_participants. This will mute / unmute
return make_number(0.0);
}
#endif
+ } else if (strcmp(funcname->u.s, "ABS") == 0) {
+ if (arglist && !arglist->right && arglist->val) {
+ to_number(arglist->val);
+ result = make_number(arglist->val->u.i < 0 ? arglist->val->u.i * -1 : arglist->val->u.i);
+ return result;
+ } else {
+ ast_log(LOG_WARNING, "Wrong args to %s() function\n", funcname->u.s);
+ return make_number(0.0);
+ }
} else {
/* is this a custom function we should execute and collect the results of? */
#if !defined(STANDALONE) && !defined(STANDALONE2)
return make_number(0.0);
}
#endif
+ } else if (strcmp(funcname->u.s, "ABS") == 0) {
+ if (arglist && !arglist->right && arglist->val) {
+ to_number(arglist->val);
+ result = make_number(arglist->val->u.i < 0 ? arglist->val->u.i * -1 : arglist->val->u.i);
+ return result;
+ } else {
+ ast_log(LOG_WARNING, "Wrong args to %s() function\n", funcname->u.s);
+ return make_number(0.0);
+ }
} else {
/* is this a custom function we should execute and collect the results of? */
#if !defined(STANDALONE) && !defined(STANDALONE2)