summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorAlexandr Anikin <may@telecom-service.ru>2013-05-31 10:42:19 +0000
committerAlexandr Anikin <may@telecom-service.ru>2013-05-31 10:42:19 +0000
commit12548000dc1f754e29e91b44243204465dd35e72 (patch)
tree74e4743e587128488733c8bcdf0d6aeed744bd12 /addons
parent390b994fce8d349646ef998333dd352f71855a31 (diff)
Multiple revisions 390228-390229
........ r390228 | may | 2013-05-31 14:19:52 +0400 (Fri, 31 May 2013) | 14 lines 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 ........ r390229 | may | 2013-05-31 14:34:20 +0400 (Fri, 31 May 2013) | 4 lines remove unnecessary declarations (issue ASTERISK-21800) ........ Merged revisions 390228-390229 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'addons')
-rw-r--r--addons/chan_ooh323.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 61d9245fe..a4f62acd8 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -307,6 +307,8 @@ int onCallEstablished(ooCallData *call);
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 */
@@ -642,6 +644,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
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;
}
@@ -689,6 +692,10 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
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;
p->dtmfmode = gDTMFMode;
@@ -2615,8 +2622,6 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
static int ooh323_do_reload(void)
{
- extern OOH323EndPoint gH323ep;
-
if (gH323Debug) {
ast_verb(0, "--- ooh323_do_reload\n");
}
@@ -3369,7 +3374,6 @@ static int ooh323_show_channels(int fd, int argc, char *argv[])
static char *handle_cli_ooh323_show_gk(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char value[FORMAT_STRING_SIZE];
- extern OOH323EndPoint gH323ep;
switch (cmd) {
case CLI_INIT: