[asterisk-commits] rmudgett: trunk r376953 - in /trunk: ./ channels/misdn/isdn_lib.c

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


Author: rmudgett
Date: Fri Nov 30 15:38:01 2012
New Revision: 376953

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376953
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
........

Merged revisions 376950 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 376951 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 376952 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/misdn/isdn_lib.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/misdn/isdn_lib.c?view=diff&rev=376953&r1=376952&r2=376953
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Fri Nov 30 15:38:01 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