diff --git a/apps/app_queue.c b/apps/app_queue.c index 4e960d2cbd07b236042e7b5341d85ee4be752406..4f5d3e33c3d23ebd5ae52b50bc1fe0b00705298c 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2365,13 +2365,14 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce mixmonapp = NULL; } + if (!monitor_options) + monitor_options = ast_strdupa(""); + if (mixmonapp) { if (!ast_strlen_zero(monitor_exec) && !ast_strlen_zero(monitor_options)) snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s|%s", tmpid2, monitor_options, monitor_exec); - else if (!ast_strlen_zero(monitor_options)) - snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s", tmpid2, monitor_options); else - snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b", tmpid2); + snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s", tmpid2, monitor_options); if (option_debug) ast_log(LOG_DEBUG, "Arguments being passed to MixMonitor: %s\n", mixmonargs);