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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 17 08:26:53 MST 2006


Author: crichter
Date: Wed May 17 10:26:52 2006
New Revision: 27769

URL: http://svn.digium.com/view/asterisk?rev=27769&view=rev
Log:
fixed bug that we've lost the orginator of the call.. now we can hear to disconnect indications again

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=27769&r1=27768&r2=27769&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Wed May 17 10:26:52 2006
@@ -2263,7 +2263,7 @@
 }
 
 
-static struct chan_list *init_chan_list(void)
+static struct chan_list *init_chan_list(int orig)
 {
 	struct chan_list *cl=malloc(sizeof(struct chan_list));
 	
@@ -2273,6 +2273,8 @@
 	}
 	
 	memset(cl,0,sizeof(struct chan_list));
+
+	cl->orginator=orig;
 	
 	return cl;
 	
@@ -2289,7 +2291,7 @@
 	int channel=0, port=0;
 	struct misdn_bchannel *newbc = NULL;
 	
-	struct chan_list *cl=init_chan_list();
+	struct chan_list *cl=init_chan_list(ORG_AST);
 	
 	sprintf(buf,"%s/%s",misdn_type,(char*)data);
 	ast_copy_string(buf2,data, 128);
@@ -3166,7 +3168,7 @@
 	print_bearer(bc);
     
 	{
-		struct chan_list *ch=init_chan_list();
+		struct chan_list *ch=init_chan_list(ORG_MISDN);
 		struct ast_channel *chan;
 
 		if (!ch) { chan_misdn_log(-1, bc->port, "cb_events: malloc for chan_list failed!\n"); return 0;}
@@ -3424,6 +3426,8 @@
 		
 		send_cause2ast(ch->ast,bc);
 
+
+		chan_misdn_log(0,bc->port," org:%d nt:%d, inbandavail:%d state:%d\n", ch->orginator, bc->nt, misdn_inband_avail(bc), ch->state);
 		if ( ch->orginator==ORG_AST && !bc->nt && misdn_inband_avail(bc) && ch->state != MISDN_CONNECTED) {
 			/* If there's inband information available (e.g. a
 			   recorded message saying what was wrong with the



More information about the asterisk-commits mailing list