[asterisk-commits] may: branch 11 r390228 - in /branches/11: ./ addons/chan_ooh323.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 31 05:19:55 CDT 2013


Author: may
Date: Fri May 31 05:19:52 2013
New Revision: 390228

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390228
Log:
reject call attempts when gatekeeper is configured but not registered

(closes issue ASTERISK-21800)
Reported by: Dmitry Melekhov
Patches:
        ASTERISK-21800-1.patch
Tested by: Dmitry Melekhov
........

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

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

Modified:
    branches/11/   (props changed)
    branches/11/addons/chan_ooh323.c

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

Modified: branches/11/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/addons/chan_ooh323.c?view=diff&rev=390228&r1=390227&r2=390228
==============================================================================
--- branches/11/addons/chan_ooh323.c (original)
+++ branches/11/addons/chan_ooh323.c Fri May 31 05:19:52 2013
@@ -308,6 +308,8 @@
 int onCallCleared(ooCallData *call);
 void onModeChanged(ooCallData *call, int t38mode);
 
+extern OOH323EndPoint gH323ep;
+
 static char gLogFile[256] = DEFAULT_LOGFILE;
 static int  gPort = 1720;
 static char gIP[2+8*4+7];	/* Max for IPv6 addr */
@@ -644,6 +646,7 @@
 		ooh323_destroy(p);
 		ast_mutex_unlock(&iflock);
 		ast_log(LOG_ERROR, "Destination format is not supported\n");
+		*cause = AST_CAUSE_INVALID_NUMBER_FORMAT;
 		return NULL;
 	}
 
@@ -690,6 +693,10 @@
 			ast_mutex_unlock(&p->lock);
 			ooh323_destroy(p);
 			ast_mutex_unlock(&iflock);
+			return NULL;
+		} else if (gH323ep.gkClient && gH323ep.gkClient->state != GkClientRegistered) {
+			ast_log(LOG_ERROR, "Gatekeeper client is configured but not registered\n");
+			*cause = AST_CAUSE_NORMAL_TEMPORARY_FAILURE;
 			return NULL;
 		}
 		p->g729onlyA = g729onlyA;




More information about the asterisk-commits mailing list