[asterisk-commits] may: branch 1.8 r390181 - /branches/1.8/addons/chan_ooh323.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 31 03:10:32 CDT 2013


Author: may
Date: Fri May 31 03:10:30 2013
New Revision: 390181

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


Modified:
    branches/1.8/addons/chan_ooh323.c

Modified: branches/1.8/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/chan_ooh323.c?view=diff&rev=390181&r1=390180&r2=390181
==============================================================================
--- branches/1.8/addons/chan_ooh323.c (original)
+++ branches/1.8/addons/chan_ooh323.c Fri May 31 03:10:30 2013
@@ -286,6 +286,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[20];
@@ -629,6 +631,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;
 	}
 
@@ -671,6 +674,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