[asterisk-users] dialstatus and cancelled calls

Vieri rentorbuy at yahoo.com
Tue Mar 18 03:36:18 CDT 2008


--- Matt Riddell <matt at venturevoip.com> wrote:

> http://bugs.digium.com/view.php?id=12230

Thanks Matt.
However, "I may be wrong" but this isn't exactly what
I'm looking for. I would like Asterisk to
"transparently" set my CDR(disposition) field to
reflect if a call has simply timed out (NO ANSWER) or
if the caller hung up prior to ANSWER (thus CANCEL). 

I think that it's all in the cdr.h, cdr.c and
app_dial.c files.

cdr.h has:

#define AST_CDR_NULL                0
#define AST_CDR_FAILED				(1 << 0)
#define AST_CDR_BUSY				(1 << 1)
#define AST_CDR_NOANSWER			(1 << 2)
#define AST_CDR_ANSWERED			(1 << 3)

So I guess we would need an AST_CDR_CANCEL.

cdr.c has:
void ast_cdr_noanswer(struct ast_cdr *cdr)

Here too I would add something like
void ast_cdr_cancel(struct ast_cdr *cdr)

then would add a condition to:
char *ast_cdr_disp2str(int disposition)
such as
	case AST_CDR_CANCEL:
		return "CANCEL";

in app_dial.c
static struct ast_channel *wait_for_answer
would call
ast_cdr_cancel(in->cdr);
whenever it subsequently calls
strcpy(status, "CANCEL");

Now the problem is: can I define AST_CDR_CANCEL in
cdr.h? And how?

The source code I'm referring to is 1.2 but I think
it's similar to 1.4/1.6.



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the asterisk-users mailing list