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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 21 11:29:54 MST 2006


Author: crichter
Date: Tue Feb 21 12:29:49 2006
New Revision: 10648

URL: http://svn.digium.com/view/asterisk?rev=10648&view=rev
Log:
fixed a ETSI violation (after RELEASE we need to RELEASE_COMPLETE (network side) one needs to upgread mISDNuser for that fix as well. also fixed the reload issue

Modified:
    team/crichter/0.3.0/channels/chan_misdn.c
    team/crichter/0.3.0/channels/misdn/isdn_lib.c
    team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c
    team/crichter/0.3.0/channels/misdn_config.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=10648&r1=10647&r2=10648&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Tue Feb 21 12:29:49 2006
@@ -1917,14 +1917,16 @@
 			chan_misdn_log(1, bc->port, " --> cause %d\n",bc->cause);
 			chan_misdn_log(1, bc->port, " --> out_cause %d\n",bc->out_cause);
 			
+			bc->out_cause=-1;
 			misdn_lib_send_event(bc,EVENT_RELEASE);
 			break;
 		default:
 			/*  Alerting or Disconect */
 
-			if (bc->nt)
+			if (bc->nt) {
+				bc->out_cause=-1;
 				misdn_lib_send_event(bc, EVENT_RELEASE);
-			else
+			} else
 				misdn_lib_send_event(bc, EVENT_DISCONNECT);
 			p->state=MISDN_CLEANING; /* MISDN_HUNGUP_FROM_AST; */
 		}
@@ -3378,12 +3380,14 @@
 		}
 		
 		stop_bc_tones(ch);
-		bc->out_cause=16;
-		
-		//if (ch->state == MISDN_CONNECTED) 
-		//misdn_lib_send_event(bc,EVENT_RELEASE);
-		//else
-		//misdn_lib_send_event(bc,EVENT_RELEASE_COMPLETE);
+		/*bc->out_cause=16;*/
+		bc->out_cause=-1;
+		
+		/*if (ch->state == MISDN_CONNECTED) 
+		misdn_lib_send_event(bc,EVENT_RELEASE);
+		else
+		misdn_lib_send_event(bc,EVENT_RELEASE_COMPLETE);
+		*/
 		
 		misdn_lib_send_event(bc,EVENT_RELEASE);
 		
@@ -3402,15 +3406,18 @@
 				  before, so we should RELEASE_COMPLETE after that Disconnect
 				  (looks like ALERTING State at misdn_hangup !!
 				*/
-				return RESPONSE_OK;
+				
+				/*return RESPONSE_OK;*/
 				break;
 			}
 			
 			
 			bc->out_cause=16;
 			
-			stop_bc_tones(ch);
-			release_chan(bc);
+			/*stop_bc_tones(ch);
+			  release_chan(bc);*/
+			
+			misdn_lib_send_event(bc,EVENT_RELEASE_COMPLETE);
 		}
 		break;
 	case EVENT_RELEASE_COMPLETE:

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=10648&r1=10647&r2=10648&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_lib.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_lib.c Tue Feb 21 12:29:49 2006
@@ -1661,13 +1661,13 @@
 
 		case CC_RELEASE|CONFIRM:
 		{
-			struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
-			cb_log(3, stack->port, " --> RELEASE CONFIRM, doing nothin\n");
-			cb_event(EVENT_CLEANUP, bc, glob_mgr->user_data);
-			empty_chan_in_stack(stack,bc->channel);
-			empty_bc(bc);
-			free_msg(msg);
-			return 0;
+			/*struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
+			  cb_log(3, stack->port, " --> RELEASE CONFIRM, doing nothin\n");
+			  cb_event(EVENT_CLEANUP, bc, glob_mgr->user_data);
+			  empty_chan_in_stack(stack,bc->channel);
+			  empty_bc(bc);
+			  free_msg(msg);
+			  return 0;*/
 		}
 		break;  
 		case CC_RELEASE|INDICATION:
@@ -2038,7 +2038,7 @@
 				
 				int i=cb_event( EVENT_BCHAN_DATA, bc, glob_mgr->user_data);
 				if (i<0) {
-					cb_log(2,stack->port,"cb_event returned <0\n");
+					cb_log(5,stack->port,"cb_event returned <0\n");
 					/*clean_up_bc(bc);*/
 				}
 			}
@@ -2994,11 +2994,12 @@
 	glob_mgr = mgr;
   
 	msg_init();
-	debug_init(0 , NULL, NULL, NULL);
 #if 0
 	int flags=0xff;
 	flags &= ~DBGM_MSG;
 	debug_init( flags , NULL, NULL, NULL);
+#else
+	debug_init(0 , NULL, NULL, NULL);
 #endif	
 	if (!portlist || (*portlist == 0) ) return 1;
 	

Modified: team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c?rev=10648&r1=10647&r2=10648&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c (original)
+++ team/crichter/0.3.0/channels/misdn/isdn_msg_parser.c Tue Feb 21 12:29:49 2006
@@ -798,8 +798,8 @@
  
 	release=(RELEASE_t*)((msg->data+HEADER_LEN)); 
   
-  
-	enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
+	if (bc->out_cause>= 0)
+		enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
   
 #if DEBUG 
 	printf("Building RELEASE Msg\n"); 

Modified: team/crichter/0.3.0/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn_config.c?rev=10648&r1=10647&r2=10648&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn_config.c (original)
+++ team/crichter/0.3.0/channels/misdn_config.c Tue Feb 21 12:29:49 2006
@@ -214,7 +214,7 @@
 {
 	int i, j;
 	int gn = map[MISDN_CFG_GROUPNAME];
-	union misdn_cfg_pt* free_list[max_ports + 1];
+	union misdn_cfg_pt* free_list[max_ports + 2];
 	
 	memset(free_list, 0, sizeof(free_list));
 	free_list[0] = port_cfg[0];



More information about the asterisk-commits mailing list