From 755ba51b12b278da59c10606da7347d237ad8448 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Wed, 26 Sep 2007 20:03:14 +0000 Subject: [PATCH] Don't try to answer a disconnected call. --- chan_capi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chan_capi.c b/chan_capi.c index 8e9467b..e7dca9e 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -1349,6 +1349,12 @@ static int capi_send_answer(struct ast_channel *c, _cstruct b3conf) const char *connectednumber; unsigned char *facilityarray = NULL; + if (i->state == CAPI_STATE_DISCONNECTED) { + cc_verbose(3, 0, VERBOSE_PREFIX_2 "%s: Not answering disconnected call.\n", + i->vname); + return -1; + } + if ((i->isdnmode == CAPI_ISDNMODE_DID) && ((strlen(i->incomingmsn) < strlen(i->dnid)) && (strcmp(i->incomingmsn, "*")))) {