[asterisk-commits] branch crichter/0.3.0 r12314 - /team/crichter/0.3.0/channels/chan_misdn.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 7 05:16:41 MST 2006


Author: crichter
Date: Tue Mar  7 06:16:38 2006
New Revision: 12314

URL: http://svn.digium.com/view/asterisk?rev=12314&view=rev
Log:
when receiving disconnect with inband info, we don't send release immediately, we also don't inform asterisk with hangup or congestion, since we want to hear the inband message.

Modified:
    team/crichter/0.3.0/channels/chan_misdn.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=12314&r1=12313&r2=12314&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Tue Mar  7 06:16:38 2006
@@ -129,6 +129,7 @@
 	MISDN_ALERTING, /*!<  when Alerting */
 	MISDN_BUSY, /*!<  when BUSY */
 	MISDN_CONNECTED, /*!<  when connected */
+	MISDN_DISCONNECTED, /*!<  when connected */
 	MISDN_BRIDGED, /*!<  when bridged */
 	MISDN_CLEANING, /*!< when hangup from * but we were connected before */
 	MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
@@ -1926,6 +1927,11 @@
       
 			p->state=MISDN_CLEANING; /* MISDN_HUNGUP_FROM_AST; */
 			break;
+		case MISDN_DISCONNECTED:
+			chan_misdn_log(2, bc->port, " --> * State Disconnected\n");
+			misdn_lib_send_event( bc, EVENT_RELEASE);
+			p->state=MISDN_CLEANING; /* MISDN_HUNGUP_FROM_AST; */
+			break;
 
 		case MISDN_CLEANING:
 			break;
@@ -2932,9 +2938,14 @@
  	case 4:
  	case 22:
  	case 27:
+		/*
+		 * Not Queueing the Congestion anymore, since we want to hear
+		 * the inband message
+		 *
 		chan_misdn_log(1, bc?bc->port:0, " --> * SEND: Queue Congestion pid:%d\n", bc?bc->pid:-1);
 		
 		ast_queue_control(ast, AST_CONTROL_CONGESTION);
+		*/
 		break;
 		
 	case 21:
@@ -3420,6 +3431,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");
+			ch->state = MISDN_DISCONNECTED;
 			start_bc_tones(ch);
 			break;
 		}



More information about the asterisk-commits mailing list