Handle variable substitution in dummy variables

When func_cdr is used for variable substitution, there is no channel name
and hence no run-time information available for CDR variable substitution.
In that case, the correct thing to do is to use the CDR object on the channel
passed to the function. This patch checks to see if the channel passed in
has a name - if not, it uses ast_cdr_format_var instead of ast_cdr_get_var.

This allows CDR backends to continue to use variable substitution in order to
resolve ast_cdr object properties.

git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@392214 f38db490-d61c-443f-a65b-d21fe96a405b