From ed27fc4c76de4a968d94d1f51147bd8ce4f8af39 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Fri, 12 Aug 2005 17:12:11 +0000 Subject: [PATCH] Use cause definitions instead of values. Patch 1255922 --- chan_capi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chan_capi.c b/chan_capi.c index d8624c7..f790542 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1810,10 +1811,11 @@ static void pipe_cause_control(struct ast_capi_pvt *i, int control) if ((i->owner) && (control)) { int cause = i->owner->hangupcause; - if (cause == 34) { + if (cause == AST_CAUSE_NORMAL_CIRCUIT_CONGESTION) { fr.frametype = AST_FRAME_CONTROL; fr.subclass = AST_CONTROL_CONGESTION; - } else if ((cause != 18) && (cause != 19)) { + } else if ((cause != AST_CAUSE_NO_USER_RESPONSE) && + (cause != AST_CAUSE_NO_ANSWER)) { /* not NOANSWER */ fr.frametype = AST_FRAME_CONTROL; fr.subclass = AST_CONTROL_BUSY;