summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 95819e5b5..d57c35b8c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2680,8 +2680,9 @@ static int sip_indicate(struct ast_channel *ast, int condition)
switch(condition) {
case AST_CONTROL_RINGING:
if (ast->_state == AST_STATE_RING) {
- if (!ast_test_flag(p, SIP_PROGRESS_SENT) ||
- (ast_test_flag(p, SIP_PROG_INBAND) == SIP_PROG_INBAND_NEVER)) {
+ if ((!ast_test_flag(p, SIP_PROGRESS_SENT) ||
+ (ast_test_flag(p, SIP_PROG_INBAND) == SIP_PROG_INBAND_NEVER)) &&
+ ast_test_flag(p, SIP_PROG_INBAND) != SIP_PROG_INBAND_YES) {
/* Send 180 ringing if out-of-band seems reasonable */
transmit_response(p, "180 Ringing", &p->initreq);
ast_set_flag(p, SIP_RINGING);