Skip to content
Snippets Groups Projects
Commit a8e6a330 authored by Grzegorz Sluja's avatar Grzegorz Sluja
Browse files

Do not send Alert-Info header if callwaiting is disabled

parent 30838c86
No related branches found
No related tags found
1 merge request!54Do not send Alert-Info header if callwaiting is disabled
...@@ -1015,14 +1015,21 @@ static int brcm_call(struct ast_channel *chan, const char *dest, int timeout) ...@@ -1015,14 +1015,21 @@ static int brcm_call(struct ast_channel *chan, const char *dest, int timeout)
p->tech->signal_ringing_callerid_pending(p); p->tech->signal_ringing_callerid_pending(p);
p->tech->signal_callerid(chan, sub); p->tech->signal_callerid(chan, sub);
} }
if (has_call_in_sip_client(p->context)) { if (has_call_in_sip_client(p->context)) {
sub->cw_timer_id = ast_sched_add(sched, cwtimeout*1000, cwtimeout_cb, sub); sub->cw_timer_id = ast_sched_add(sched, cwtimeout*1000, cwtimeout_cb, sub);
ast_setstate(chan, AST_STATE_RINGING_CW); if (is_call_waiting_enabled(p->context)) {
ast_queue_control(chan, AST_CONTROL_RINGING_CW); ast_setstate(chan, AST_STATE_RINGING_CW);
ast_queue_control(chan, AST_CONTROL_RINGING_CW);
} else {
ast_setstate(chan, AST_STATE_RINGING);
ast_queue_control(chan, AST_CONTROL_RINGING);
}
} else { } else {
ast_setstate(chan, AST_STATE_RINGING); ast_setstate(chan, AST_STATE_RINGING);
ast_queue_control(chan, AST_CONTROL_RINGING); ast_queue_control(chan, AST_CONTROL_RINGING);
} }
brcm_send_ubus_event("RINGING",p->line_id); brcm_send_ubus_event("RINGING",p->line_id);
} }
//ast_mutex_unlock(&sub->parent->lock); //ast_mutex_unlock(&sub->parent->lock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment