Index: apps/app_dial.c =================================================================== --- apps/app_dial.c (revision 172508) +++ apps/app_dial.c (working copy) @@ -380,12 +380,19 @@ struct ast_cdr *cdr = num->chan->cdr; switch(cause) { +//AST_CAUSE_INVALID_NUMBER_FORMAT case AST_CAUSE_BUSY: if (cdr) ast_cdr_busy(cdr); num->busy++; break; + case AST_CAUSE_INVALID_NUMBER_FORMAT: + if (cdr) + ast_cdr_failed(cdr); + num->congestion++; + break; + case AST_CAUSE_CONGESTION: if (cdr) ast_cdr_failed(cdr); @@ -712,6 +719,14 @@ ast_clear_flag64(o, DIAL_STILLGOING); handle_cause(AST_CAUSE_CONGESTION, &num); break; + case AST_CAUSE_INVALID_NUMBER_FORMAT: + ast_verb(3, "%s is Number invalid\n", c->name); + in->hangupcause = c->hangupcause; + ast_hangup(c); + c = o->chan = NULL; + ast_clear_flag64(o, DIAL_STILLGOING); + handle_cause(AST_CAUSE_CONGESTION, &num); + break; case AST_CONTROL_RINGING: ast_verb(3, "%s is ringing\n", c->name); /* Setup early media if appropriate */