ast_log(AST_LOG_WARNING,"The 'peeraccount' setting is not supported. Please set the 'accountcode' on the appropriate channel using the CHANNEL function.\n");
ast_log(LOG_WARNING,"No channel was provided to %s function.\n",cmd);
ast_log(LOG_WARNING,"No channel was provided to %s function.\n",cmd);
return-1;
return-1;
}
}
if(ast_strlen_zero(arguments)){
if(!router){
ast_log(LOG_WARNING,"%s requires a variable (%s(variable)=value)\n)",
ast_log(AST_LOG_WARNING,"Failed to manipulate CDR for channel %s: no message router\n",
cmd,cmd);
ast_channel_name(chan));
return-1;
}
if(!value){
ast_log(LOG_WARNING,"%s requires a value (%s(variable)=value)\n)",
cmd,cmd);
return-1;
return-1;
}
}
parse=ast_strdupa(arguments);
AST_STANDARD_APP_ARGS(args,parse);
/* These CDR variables are no longer supported or set directly on the channel */
if(!strcasecmp(args.variable,"accountcode")){
ast_log(LOG_WARNING,"Using the %s function to set 'accountcode' is deprecated. Please use the CHANNEL function instead.\n",
cmd);
ast_channel_lock(chan);
ast_channel_accountcode_set(chan,value);
ast_channel_unlock(chan);
return0;
}
if(!strcasecmp(args.variable,"amaflags")){
intamaflags;
ast_log(LOG_WARNING,"Using the %s function to set 'amaflags' is deprecated. Please use the CHANNEL function instead.\n",
cmd);
if(isdigit(*value)){
if(sscanf(value,"%30d",&amaflags)!=1){
amaflags=AST_AMA_NONE;
}
}else{
amaflags=ast_channel_string2amaflag(value);
}
ast_channel_lock(chan);
ast_channel_amaflags_set(chan,amaflags);
ast_channel_unlock(chan);
return0;
}
if(!strcasecmp(args.variable,"peeraccount")){
ast_log(LOG_WARNING,"The 'peeraccount' setting is not supported. Please set the 'accountcode' on the appropriate channel using the CHANNEL function.\n");
return0;
}
/* The remaining CDR variables are handled by CDR processing code */
if(!cdr_write_message_type()){
if(!cdr_write_message_type()){
ast_log(AST_LOG_WARNING,"Failed to manipulate CDR for channel %s: message type not available\n",
ast_log(LOG_WARNING,"Failed to manipulate CDR for channel %s: message type not available\n",