[asterisk-commits] branch crichter/0.3.0 r36186 - in /team/crichter/0.3.0/channels: ./ misdn/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 28 07:11:30 MST 2006


Author: crichter
Date: Wed Jun 28 09:11:29 2006
New Revision: 36186

URL: http://svn.digium.com/view/asterisk?rev=36186&view=rev
Log:
fixed a few state problems when hanging up the call. also changed a few debug messages to higher log level

Modified:
    team/crichter/0.3.0/channels/chan_misdn.c
    team/crichter/0.3.0/channels/misdn/isdn_lib.c

Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=36186&r1=36185&r2=36186&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Wed Jun 28 09:11:29 2006
@@ -2036,6 +2036,8 @@
 				misdn_lib_send_event(bc, EVENT_DISCONNECT);
 			}
 		}
+
+		p->state=MISDN_CLEANING;
     
 	}
 	
@@ -2842,13 +2844,6 @@
 		release_unlock;
 		
 		chan_misdn_log(1, bc->port, "release_chan: bc with l3id: %x\n",bc->l3_id);
-#if 0
-		if (ch->dummy) {
-			ast_hangup(ast);
-			ch->ast=NULL;
-			ast=NULL;
-		}
-#endif
 		
 		/*releaseing jitterbuffer*/
 		if (ch->jb ) {
@@ -2863,6 +2858,7 @@
 			
 			close(ch->pipe[0]);
 			close(ch->pipe[1]);
+
 			
 			if (ast && MISDN_ASTERISK_TECH_PVT(ast)) {
 				chan_misdn_log(1, bc->port, "* RELEASING CHANNEL pid:%d ctx:%s dad:%s oad:%s state: %s\n",bc?bc->pid:-1, ast->context, ast->exten,AST_CID_P(ast),misdn_get_ch_state(ch));
@@ -2893,8 +2889,6 @@
 				case MISDN_PROCEEDING:
 					chan_misdn_log(2,  bc->port, "* --> In State Dialin\n");
 					chan_misdn_log(2,  bc->port, "* --> Queue Hangup\n");
-					
-					ch->state=MISDN_CLEANING;
 					ast_queue_hangup(ast);
 					
 					break;
@@ -2928,6 +2922,7 @@
 					}
 				}
 			}
+			ch->state=MISDN_CLEANING;
 			cl_dequeue_chan(&cl_te, ch);
 			
 			free(ch);
@@ -3087,14 +3082,14 @@
 		ch=find_chan_by_l3id(cl_te, bc->l3_id);
 	
 	if (event != EVENT_BCHAN_DATA && event != EVENT_TONE_GENERATE) { /*  Debug Only Non-Bchan */
-		chan_misdn_log(1, bc->port, "I IND :%s oad:%s dad:%s pid:%d\n", manager_isdn_get_info(event), bc->oad, bc->dad, bc->pid);
+		chan_misdn_log(1, bc->port, "I IND :%s oad:%s dad:%s pid:%d state:%s\n", manager_isdn_get_info(event), bc->oad, bc->dad, bc->pid, ch?misdn_get_ch_state(ch):"none");
 		misdn_lib_log_ies(bc);
 		chan_misdn_log(2,bc->port," --> bc_state:%s\n",bc_state2str(bc->bc_state));
 	}
 	
 	if (event != EVENT_SETUP) {
 		if (!ch) {
-			if (event != EVENT_CLEANUP )
+			if (event != EVENT_CLEANUP && event != EVENT_TONE_GENERATE && event != EVENT_BCHAN_DATA)
 				ast_log(LOG_NOTICE, "Chan not existing at the moment bc->l3id:%x bc:%p event:%s port:%d channel:%d\n",bc->l3_id, bc, manager_isdn_get_info( event), bc->port,bc->channel);
 			return -1;
 		}
@@ -3598,7 +3593,8 @@
 			   dialled number, or perhaps even giving an
 			   alternative number, then play it instead of
 			   immediately releasing the call */
-			chan_misdn_log(0,bc->port, " --> Inband Info Avail, not sending RELEASE\n");
+			chan_misdn_log(1,bc->port, " --> Inband Info Avail, not sending RELEASE\n");
+		
 			ch->state=MISDN_DISCONNECTED;
 			start_bc_tones(ch);
 			break;
@@ -3616,6 +3612,7 @@
 		stop_bc_tones(ch);
 		bc->out_cause=-1;
 		
+		release_chan(bc);
 		misdn_lib_send_event(bc,EVENT_RELEASE);
 	}
 	break;
@@ -3634,6 +3631,8 @@
 				*/
 				
 				/*return RESPONSE_OK;*/
+				if (!bc->nt) release_chan(bc);
+
 				break;
 			}
 			

Modified: team/crichter/0.3.0/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_lib.c?rev=36186&r1=36185&r2=36186&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib.c Wed Jun 28 09:11:29 2006
@@ -2094,7 +2094,7 @@
 		flip_buf_bits( data, jlen);
 		
 		if (jlen < len) {
-			cb_log(5,bc->port,"Jitterbuffer Underrun.\n");
+			cb_log(7,bc->port,"Jitterbuffer Underrun.\n");
 		}
 		
 		txfrm->prim = DL_DATA|REQUEST;



More information about the asterisk-commits mailing list