Allow manager originate to specifiy more than one variable to be set.
[asterisk/asterisk.git] / funcs / func_cdr.c
index 0e9a13e..1220a82 100755 (executable)
@@ -77,7 +77,12 @@ static void builtin_function_cdr_write(struct ast_channel *chan, char *cmd, char
                        recursive = 1;
        }
 
-       ast_cdr_setvar(chan->cdr, argv[0], value, recursive);
+       if (!strcasecmp(argv[0], "accountcode"))
+               ast_cdr_setaccount(chan, value);
+       else if (!strcasecmp(argv[0], "userfield"))
+               ast_cdr_setuserfield(chan, value);
+       else
+               ast_cdr_setvar(chan->cdr, argv[0], value, recursive);
 }
 
 #ifndef BUILTIN_FUNC