View previous topic :: View next topic |
Author |
Message |
rentorbuy at yahoo.com Guest
|
Posted: Mon Mar 10, 2008 6:12 am Post subject: [asterisk-users] dialstatus and cancelled calls |
|
|
According to
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS
when a caller hangs up before the callee has time to
pick the phone up then DIALSTATUS should be CANCEL.
And it is.
However, the disposition field in the CDR table is "NO
ANSWER".
So if I analyze the CDR data I won't be able to
discriminate calls cancelled by the caller and calls
not answered by the callee (timeout).
I get the same disposition value whether I use cdr-csv
or MySQL via asterisk-addons.
I'm using * 1.2.26.2.
How can I get the DIALSTATUS value to the disposition
field?
Would I have to do it manually in my dialplan via
Set(CDR(disposition))?
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs |
|
Back to top |
|
|
rentorbuy at yahoo.com Guest
|
Posted: Tue Mar 11, 2008 6:27 am Post subject: [asterisk-users] dialstatus and cancelled calls |
|
|
--- Vieri <rentorbuy at yahoo.com> wrote:
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS
Quote: | when a caller hangs up before the callee has time to
pick the phone up then DIALSTATUS should be CANCEL.
And it is.
However, the disposition field in the CDR table is
"NO
ANSWER".
So if I analyze the CDR data I won't be able to
discriminate calls cancelled by the caller and calls
not answered by the callee (timeout).
I get the same disposition value whether I use
cdr-csv
or MySQL via asterisk-addons.
I'm using * 1.2.26.2.
How can I get the DIALSTATUS value to the
disposition
field?
Would I have to do it manually in my dialplan via
Set(CDR(disposition))?
|
I took a quick look at the 1.2 cdr source code and it
seems that there's no CANCEL state (or similar). So
there's no way of discriminating in the CDR data if a
call was aborted by the caller or it timed out on the
callee side. In both cases the disposition is "NO
ANSWER".
Am I overlooking something?
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping |
|
Back to top |
|
|
ex.vitorino at gmail.com Guest
|
Posted: Tue Mar 11, 2008 2:03 pm Post subject: [asterisk-users] dialstatus and cancelled calls |
|
|
...as long as the destination does not answer you'll get
a NO ANSWER disposition.
Note, however, that "answering" can be one of:
- Dial a phone and the user answers the phone
- Connecting the caller to voicemail, for example,
after Dial timed out
- Playing an IVR / sound / music
- And more... Anything that connects the caller!
So, if in your case you want to know if a user answered
the phone, then, yes, you will have to add the DIALSTATUS
value to the CDR, probably in the CDR's userfield.
--
exvito |
|
Back to top |
|
|
rentorbuy at yahoo.com Guest
|
Posted: Thu Mar 13, 2008 11:47 am Post subject: [asterisk-users] dialstatus and cancelled calls |
|
|
--- Ex Vito <ex.vitorino at gmail.com> wrote:
Quote: | ...as long as the destination does not answer
you'll get
a NO ANSWER disposition.
So, if in your case you want to know if a user
answered
the phone, then, yes, you will have to add the
DIALSTATUS
value to the CDR, probably in the CDR's userfield.
|
Thanks.
It's surprising though. Just like queue logs are very
descriptive (you know which side hung up) I thought
CDR data would be as well as far as this detail is
concerned. But I guess it's because a queue is a
special pseudo-channel thus allowing finer logging.
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs |
|
Back to top |
|
|
matt at venturevoip.com Guest
|
Posted: Sun Mar 16, 2008 3:13 pm Post subject: [asterisk-users] dialstatus and cancelled calls |
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vieri wrote:
Quote: | --- Ex Vito <ex.vitorino at gmail.com> wrote:
Quote: | ...as long as the destination does not answer
you'll get
a NO ANSWER disposition.
So, if in your case you want to know if a user
answered
the phone, then, yes, you will have to add the
DIALSTATUS
value to the CDR, probably in the CDR's userfield.
|
Thanks.
It's surprising though. Just like queue logs are very
descriptive (you know which side hung up) I thought
CDR data would be as well as far as this detail is
concerned. But I guess it's because a queue is a
special pseudo-channel thus allowing finer logging.
|
Wordwrapping killed my patch so I've uploaded it to the bugtracker -
even though it probably won't be committed:
http://bugs.digium.com/view.php?id=12230
You know how it goes to the failed extension in the current context if
it fails, this patch adds:
timeout
busy
congestion
You can see the gist of how it works - you could add extra cause codes
if you wanted.
- --
Kind Regards,
Matt Riddell
Director
_______________________________________________
http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH3X+DDQNt8rg0Kp4RAuHPAJ9ilk1Fg5RkgYc+bkrgu54KFMN9+ACgqrVM
vMlgI/wpQv8hr3z+O5k5SPY=
=mc5a
-----END PGP SIGNATURE----- |
|
Back to top |
|
|
rentorbuy at yahoo.com Guest
|
Posted: Tue Mar 18, 2008 3:36 am Post subject: [asterisk-users] dialstatus and cancelled calls |
|
|
--- Matt Riddell <matt at venturevoip.com> wrote:
Quote: | 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 |
|
Back to top |
|
|
|