--- chan_capi.c.orig 2005-06-28 22:02:14.000000000 +0200
+++ chan_capi.c 2005-07-03 14:51:06.000000000 +0200
@@ -1135,28 +1135,25 @@
case AST_CONTROL_RINGING:
cc_ast_verbose(3, 1, VERBOSE_PREFIX_2 "Requested RINGING-Indication for %s\n",
c->name);
+ capi_alert(c);
break;
case AST_CONTROL_BUSY:
cc_ast_verbose(3, 1, VERBOSE_PREFIX_2 "Requested BUSY-Indication for %s\n",
c->name);
- if (c->_state == AST_STATE_RING) {
CONNECT_RESP_HEADER(&CMSG, ast_capi_ApplID, i->MessageNumber, 0);
CONNECT_RESP_PLCI(&CMSG) = i->PLCI;
CONNECT_RESP_REJECT(&CMSG) = 3;
_capi_put_cmsg(&CMSG);
ret = 0;
- }
break;
case AST_CONTROL_CONGESTION:
cc_ast_verbose(3, 1, VERBOSE_PREFIX_2 "Requested CONGESTION-Indication for %s\n",
c->name);
- if (c->_state == AST_STATE_RING) {
CONNECT_RESP_HEADER(&CMSG, ast_capi_ApplID, i->MessageNumber, 0);
CONNECT_RESP_PLCI(&CMSG) = i->PLCI;
CONNECT_RESP_REJECT(&CMSG) = 4;
_capi_put_cmsg(&CMSG);
ret = 0;
- }
break;
case AST_CONTROL_PROGRESS:
cc_ast_verbose(3, 1, VERBOSE_PREFIX_2 "Requested PROGRESS-Indication for %s\n",
@@ -1307,9 +1304,6 @@
ast_mutex_unlock(&usecnt_lock);
ast_update_use_count();
if (state != AST_STATE_DOWN) {
- /* we are alerting (phones ringing) */
- if (state == AST_STATE_RING)
- capi_alert(tmp);
if (ast_pbx_start(tmp)) {
ast_log(LOG_ERROR, "Unable to start pbx on channel!\n");
ast_hangup(tmp);