diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 066c981f552c6b3f1589a86178aa33d18420cd53..ef7302be6d166806651fb6b8a3fb2a88304c8389 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -2655,6 +2655,7 @@ static int misdn_hangup(struct ast_channel *ast)
 		start_bc_tones(p);
 		hanguptone_indicate(p);
 		
+		p->state=MISDN_CLEANING;
 		if (bc->need_disconnect)
 			misdn_lib_send_event( bc, EVENT_DISCONNECT);
 		break;
@@ -2690,7 +2691,8 @@ static int misdn_hangup(struct ast_channel *ast)
 		/*p->state=MISDN_CLEANING;*/
 		break;
 	case MISDN_DISCONNECTED:
-		misdn_lib_send_event( bc, EVENT_RELEASE);
+		if (bc->need_release)
+			misdn_lib_send_event( bc, EVENT_RELEASE);
 		p->state = MISDN_CLEANING; /* MISDN_HUNGUP_FROM_AST; */
 		break;
 
@@ -2708,13 +2710,15 @@ static int misdn_hangup(struct ast_channel *ast)
 		chan_misdn_log(1, bc->port, " --> out_cause %d\n", bc->out_cause);
 
 		bc->out_cause = -1;
-		misdn_lib_send_event(bc, EVENT_RELEASE);
+		if (bc->need_release)
+			misdn_lib_send_event(bc, EVENT_RELEASE);
 		p->state = MISDN_CLEANING;
 		break;
 	default:
 		if (bc->nt) {
 			bc->out_cause = -1;
-			misdn_lib_send_event(bc, EVENT_RELEASE);
+			if (bc->need_release)
+				misdn_lib_send_event(bc, EVENT_RELEASE);
 			p->state = MISDN_CLEANING; 
 		} else {
 			if (bc->need_disconnect)
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 6171a5f06287327e65eea07e0c15cfba76b5a025..9625428a5b748af47a5ee7e57f6b359e26e377a0 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -779,15 +779,12 @@ static int misdn_lib_get_l1_down(struct misdn_stack *stack)
 	/* Pull Up L1 */ 
 	iframe_t act;
 	act.prim = PH_DEACTIVATE | REQUEST; 
-	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
-
-	
+	act.addr = stack->lower_id|FLG_MSG_DOWN;
 	act.dinfo = 0;
 	act.len = 0;
 
+	cb_log(1, stack->port, "SENDING PH_DEACTIVATE | REQ\n");
 	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
-
-
 }
 
 
@@ -2003,7 +2000,16 @@ handle_event_nt(void *dat, void *arg)
 				cb_log(0, stack->port, "%% GOT L2 Activate Info. but we're activated already.. this l2 is faulty, blocking port\n");
 				cb_event(EVENT_PORT_ALARM, &stack->bc[0], glob_mgr->user_data);
 			}
-			
+
+			if (stack->ptp && !stack->restart_sent) {
+				/* make sure we restart the interface of the 
+				 * other side */
+				stack->restart_sent=1;
+				misdn_lib_send_restart(stack->port, -1);
+
+			}
+		
+			/* when we get the L2 UP, the L1 is UP definitely too*/
 			stack->l2link = 1;
 			stack->l2upcnt=0;
 			
@@ -3699,30 +3705,29 @@ int misdn_lib_send_restart(int port, int channel)
 	struct misdn_stack *stack=find_stack_by_port(port);
 	struct misdn_bchannel dummybc;
 	/*default is all channels*/
-	int max = stack->pri ? 30 : 2;
-	int i = 1;
-	
 	cb_log(0, port, "Sending Restarts on this port.\n");
 	
 	misdn_make_dummy(&dummybc, stack->port, MISDN_ID_GLOBAL, stack->nt, 0);
 
-	/*if a channel is specified we restart only this one*/
-	if (channel > 0) {
-		i=channel;
-		max=channel;
+	/*default is all channels*/
+	if (channel <0) {
+		dummybc.channel=-1;
+		cb_log(0, port, "Restarting and all Interfaces\n");
+		misdn_lib_send_event(&dummybc, EVENT_RESTART);
+
+		return 0;
 	}
 
-	for (;i<=max;i++) {
+	/*if a channel is specified we restart only this one*/
+	if (channel >0) {
 		int cnt;
-		dummybc.channel=i;
-		cb_log(0, port, "Restarting and cleaning channel %d\n",i);
+		dummybc.channel=channel;
+		cb_log(0, port, "Restarting and cleaning channel %d\n",channel);
 		misdn_lib_send_event(&dummybc, EVENT_RESTART);
-		/*do we need to wait before we get an EVENT_RESTART_ACK ?*/
-
 		/* clean up chan in stack, to be sure we don't think it's
 		 * in use anymore */
 		for (cnt=0; cnt<=stack->b_num; cnt++) {
-			if (stack->bc[cnt].channel == i) {
+			if (stack->bc[cnt].channel == channel) {
 				empty_bc(&stack->bc[cnt]);
 				clean_up_bc(&stack->bc[cnt]);
 				stack->bc[cnt].in_use=0;
diff --git a/channels/misdn/isdn_lib_intern.h b/channels/misdn/isdn_lib_intern.h
index 06a9e7c43a83a3e38b537c29c32764c68ff0b1d2..725ef963f236c147bd82f7a6caaeefe69e0d7ac6 100644
--- a/channels/misdn/isdn_lib_intern.h
+++ b/channels/misdn/isdn_lib_intern.h
@@ -80,6 +80,9 @@ struct misdn_stack {
 	time_t l2establish;
   
 	int l1link;
+
+	int restart_sent;
+
 	int midev;
   
 	int nt;
diff --git a/channels/misdn/isdn_msg_parser.c b/channels/misdn/isdn_msg_parser.c
index d05540373065b630109252c848c0c377330cd064..720f43d0d383782eb7c1df0ab829215ceaddff10 100644
--- a/channels/misdn/isdn_msg_parser.c
+++ b/channels/misdn/isdn_msg_parser.c
@@ -840,8 +840,13 @@ static msg_t *build_restart (struct isdn_msg msgs[], struct misdn_bchannel *bc,
 #ifdef DEBUG 
 	printf("Building RESTART Msg\n"); 
 #endif
-	enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
-	enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc);
+
+	if (bc->channel > 0) {
+		enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
+		enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc);
+	} else {
+		enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x87, nt, bc);
+	}
 
 	cb_log(0,bc->port, "Restarting channel %d\n", bc->channel);
 	return msg;