diff --git a/mod_fix.c b/mod_fix.c index 6a431a4a5e7..7b5ab4418af 100644 --- a/mod_fix.c +++ b/mod_fix.c @@ -165,10 +165,20 @@ int fix_cmd(struct cmd_param *params, action_elem_t *elems) goto error; } } else { + if (param->flags & CMD_PARAM_STATIC) { + LM_ERR("Param [%d] does not support formatted strings\n",i); + return E_CFG; + } + gp->pval = pve; gp->type = GPARAM_TYPE_PVE; } } else if (elems[i].type == SCRIPTVAR_ST) { + if (param->flags & CMD_PARAM_STATIC) { + LM_ERR("Param [%d] does not support variables\n",i); + return E_CFG; + } + gp->pval = elems[i].u.data; gp->type = GPARAM_TYPE_PVS; } else { diff --git a/sr_module.h b/sr_module.h index 5e4232ef75d..a02b327e24e 100644 --- a/sr_module.h +++ b/sr_module.h @@ -118,6 +118,7 @@ typedef int (*mod_proc_wrapper)(); #define CMD_PARAM_OPT (1<<4) /* optional parameter */ #define CMD_PARAM_FIX_NULL (1<<5) /* run fixup even if optional parameter is omitted */ #define CMD_PARAM_NO_EXPAND (1<<6) /* TMPHACK: do not pv-expand strings */ +#define CMD_PARAM_STATIC (1<<7) /* don't accept variables or formatted string */ struct cmd_param { int flags; /* parameter flags */