Index: app_dial.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v retrieving revision 1.139 diff -u -r1.139 app_dial.c --- app_dial.c 9 Feb 2005 22:59:46 -0000 1.139 +++ app_dial.c 11 Feb 2005 05:28:56 -0000 @@ -819,18 +819,18 @@ mac++; /* Leave the "m" in the string */ while (*mac && (*mac != ')')) *(mac++) = 'X'; - if (*mac) + if (*mac) { *mac = 'X'; - else { + mac = strchr(mohclass, ')'); + if (mac) + *mac = '\0'; + else { + ast_log(LOG_WARNING, "Music on hold class specified without trailing ')'\n"); + mohclass = NULL; + } + } else { ast_log(LOG_WARNING, "Could not find music on hold class to use, assuming default.\n"); mohclass=NULL; - } - mac = strchr(macroname, ')'); - if (mac) - *mac = '\0'; - else { - ast_log(LOG_WARNING, "Music on hold class specified without trailing ')'\n"); - mohclass = NULL; } } /* Extract privacy info from transfer */