diff --git a/apps/app_disa.c b/apps/app_disa.c
index 081abe60369e6deaaade7288cecb347fa36c3799..3756c3d5ecaafc3847390cfbc7a2d722f713434c 100644
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -283,6 +283,10 @@ static int disa_exec(struct ast_channel *chan, void *data)
 					ast_debug(1,"Successful DISA log-in on chan %s\n", chan->name);
 					continue;
 				}
+			} else {
+				if (j == '#') { /* end of extension */
+					break;
+				}
 			}
 
 			exten[i++] = j;  /* save digit */