[asterisk-commits] may: branch 10 r390223 - in /branches/10: ./ addons/chan_ooh323.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 31 04:00:07 CDT 2013


Author: may
Date: Fri May 31 04:00:01 2013
New Revision: 390223

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

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

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

Modified: branches/10/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/chan_ooh323.c?view=diff&rev=390223&r1=390222&r2=390223
==============================================================================
--- branches/10/addons/chan_ooh323.c (original)
+++ branches/10/addons/chan_ooh323.c Fri May 31 04:00:01 2013
@@ -295,6 +295,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 */
@@ -623,6 +625,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;
 	}
 
@@ -666,6 +669,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