diff options
author | Alexander Anikin <may213@yandex.ru> | 2018-04-20 22:07:21 +0300 |
---|---|---|
committer | Alexander Anikin <may213@yandex.ru> | 2018-04-20 22:17:31 +0300 |
commit | c481afe8732ea89f92603b50326dcc632e013968 (patch) | |
tree | d9a7412d66b51387067f320f998de12e73466019 | |
parent | a9c74fdc0462349bd9ae6f25ae72f071c95d1e76 (diff) |
chan_ooh323: fix ooManualProgress/ooManualRingback on ooh323 debuggin on
Call ooManualProgress/Ringback outside of ast_debug function
when ooh323 debugging is on
ASTERISK-27812 #close
ASTERISK-26893 #close
Reported by: Dimos, Marco Giordani
Change-Id: I5873762e4f05824e7b6e94a19dd4eb56adbbbb79
-rw-r--r-- | addons/chan_ooh323.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index ffdbf6721..bcec8e4a2 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -1281,7 +1281,7 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d struct ooh323_pvt *p = (struct ooh323_pvt *) ast_channel_tech_pvt(ast); char *callToken = (char *)NULL; - int res = -1; + int res = -1, rres; if (!p) return -1; @@ -1328,11 +1328,9 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d case AST_CONTROL_PROGRESS: if (ast_channel_state(ast) != AST_STATE_UP) { if (!p->progsent) { + rres = ooManualProgress(callToken); if (gH323Debug) { - ast_debug(1, "Sending manual progress for %s, res = %u\n", callToken, - ooManualProgress(callToken)); - } else { - ooManualProgress(callToken); + ast_debug(1, "Sending manual progress for %s, res = %u\n", callToken, rres); } p->progsent = 1; } @@ -1341,12 +1339,9 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d case AST_CONTROL_RINGING: if (ast_channel_state(ast) == AST_STATE_RING || ast_channel_state(ast) == AST_STATE_RINGING) { if (!p->alertsent) { + rres = ooManualRingback(callToken); if (gH323Debug) { - ast_debug(1, "Sending manual ringback for %s, res = %u\n", - callToken, - ooManualRingback(callToken)); - } else { - ooManualRingback(callToken); + ast_debug(1, "Sending manual ringback for %s, res = %u\n", callToken, rres); } p->alertsent = 1; } |