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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 24 00:53:27 MST 2006


Author: crichter
Date: Wed May 24 02:53:26 2006
New Revision: 29937

URL: http://svn.digium.com/view/asterisk?rev=29937&view=rev
Log:
fixed to early connect bug which came in yesterday..

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=29937&r1=29936&r2=29937&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Wed May 24 02:53:26 2006
@@ -131,6 +131,7 @@
 	MISDN_ALERTING, /*!<  when Alerting */
 	MISDN_BUSY, /*!<  when BUSY */
 	MISDN_CONNECTED, /*!<  when connected */
+	MISDN_PRECONNECTED, /*!<  when connected */
 	MISDN_DISCONNECTED, /*!<  when connected */
 	MISDN_BRIDGED, /*!<  when bridged */
 	MISDN_CLEANING, /*!< when hangup from * but we were connected before */
@@ -2925,7 +2926,6 @@
 	}
 }
 
-
 void import_ies(struct ast_channel *chan, struct misdn_bchannel *bc)
 {
 	char *tmp;
@@ -2943,7 +2943,6 @@
 
 	tmp=pbx_builtin_getvar_helper(chan,"PRI_PROGRESS_INDICATOR");
 	if (tmp) bc->progress_indicator=atoi(tmp);
-
 }
  
 void export_ies(struct ast_channel *chan, struct misdn_bchannel *bc)
@@ -3019,7 +3018,7 @@
 		ch->l3id=bc->l3_id;
 		ch->addr=bc->addr;
 
-		if (bc->nt) {
+		if (bc->nt && ch->state == MISDN_PRECONNECTED ) {
 			/* OK we've got the very new l3id so we can answer
 			   now */
 			start_bc_tones(ch);
@@ -3419,7 +3418,10 @@
 	}
 	
 	/*we answer when we've got our very new L3 ID from the NT stack */
-	if (bc->nt) break;
+	if (bc->nt) { 
+		ch->state=MISDN_PRECONNECTED;
+		break;
+	}
 	
 	/* notice that we don't break here!*/
 



More information about the asterisk-commits mailing list