[asterisk-commits] rmudgett: branch 1.8 r376950 - /branches/1.8/channels/misdn/isdn_lib.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 30 15:30:52 CST 2012


Author: rmudgett
Date: Fri Nov 30 15:30:48 2012
New Revision: 376950

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376950
Log:
chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.

Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does
not have a B channel available to assign to the call.

(closes issue ABE-2869)
Reported by: Guenther Kelleter
Patches:
      setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter
      Modified

........

Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

Modified:
    branches/1.8/channels/misdn/isdn_lib.c

Modified: branches/1.8/channels/misdn/isdn_lib.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/misdn/isdn_lib.c?view=diff&rev=376950&r1=376949&r2=376950
==============================================================================
--- branches/1.8/channels/misdn/isdn_lib.c (original)
+++ branches/1.8/channels/misdn/isdn_lib.c Fri Nov 30 15:30:48 2012
@@ -2700,6 +2700,10 @@
 			dummybc.l3_id = frm->dinfo;
 			bc = &dummybc;
 
+			/* set a reasonable cause */
+			bc->out_cause = AST_CAUSE_REQUESTED_CHAN_UNAVAIL;
+			/* if we want to send something the flag must be set! */
+			bc->need_release_complete = 1;
 			misdn_lib_send_event(bc, EVENT_RELEASE_COMPLETE);
 
 			free_msg(msg);
@@ -4066,14 +4070,19 @@
 					if (bc)
 						send_msg(glob_mgr->midev, bc, msg);
 					else  {
+						struct misdn_bchannel dummybc;
+
+						misdn_make_dummy(&dummybc, stack->port, frm->dinfo, stack->nt, 0);
 						if (frm->dinfo == MISDN_ID_GLOBAL || frm->dinfo == MISDN_ID_DUMMY ) {
-							struct misdn_bchannel dummybc;
 							cb_log(5,0," --> GLOBAL/DUMMY\n");
-							misdn_make_dummy(&dummybc, stack->port, frm->dinfo, stack->nt, 0);
-							send_msg(glob_mgr->midev, &dummybc, msg);
 						} else {
-							cb_log(0,0,"No bc for Message\n");
+							/*
+							 * We need to be able to at least answer with RELEASE_COMPLETE
+							 * on SETUP|INDICATION errors so use a dummy bc.
+							 */
+							cb_log(0,0,"No bc for Message.  Using dummy_bc\n");
 						}
+						send_msg(glob_mgr->midev, &dummybc, msg);
 					}
 				}
 			}




More information about the asterisk-commits mailing list