|Summary:||ASTERISK-05051: [patch] [post 1.2] Add HANGUPCAUSE to cdr engine|
|Date Opened:||2005-09-11 06:07:33||Date Closed:||2011-06-07 14:03:08|
|Environment:||Attachments:||( 0) cdr_hangupcause2.txt|
( 1) cdr_hangupcause3.txt
|Description:||This feature will ease of using of the HANGUPCAUSE channel variable while it will be directly available for the CDR engine. |
The patch does not break any cdr_* module style, thus it is useable only in cdr_custom (but other cdr modules can be changed easily like cdr_manager).
In my opinion it is a good thing to add, because getting hangupcause on hangup extension does not solve many things (e.g. CDR engines based on the manager API).
****** ADDITIONAL INFORMATION ******
Note: Some people say, hangupcause (in another term, disconnect cause) should not be included in CDR, while it is not for billing, however in some cases hangupcause is very useful [and CDR is for storing call detail records, not directly for billing - even if billing is made from CDRs]. Such case is when making statistics about call teardowns. (In many cases SetCDRUserField is not an option)
|Comments:||By: Michael Jerris (mikej) 2005-12-01 13:46:48.000-0600|
Can we please get an updated patch for this for current svn trunk. Thanks.
By: jalsot (jalsot) 2005-12-01 14:36:01.000-0600
Uploaded an svn diff against revision 7258.
By: Olle Johansson (oej) 2005-12-01 17:38:00.000-0600
Re-reading the patch, I have another opinion than the deleted comment :-)
We somehow need to document that the CDR hangupcause can be different from the actual channel hangup cause.
By: Olle Johansson (oej) 2005-12-01 17:40:02.000-0600
You need to add doxygen docs to the new function in channel.h. And if you have time, please add doxygen for the other functions as well :-)
By: jalsot (jalsot) 2005-12-02 06:58:32.000-0600
'the CDR hangupcause can be different from the actual channel hangup cause'
How do you mean that? I'm still a beginner in Asterisk coding :(
I guess you meant doxygen docs for cdr.h.
By: jalsot (jalsot) 2005-12-02 06:59:41.000-0600
Oops, I uploaded wrong file :(
The correct file will be cdr_hangupcause3.txt
By: Tilghman Lesher (tilghman) 2006-01-05 13:10:13.000-0600
Since we already have arbitrary CDR variable support, I don't see why we would need to add yet another field. Wouldn't setting the arbitrary variable be enough?
By: jalsot (jalsot) 2006-01-11 12:04:04.000-0600
Yes, it could be enough. But in this way, we could leave out many variables, won't we? Who states what are the minimum fields in CDRs? Wherever I take a look for CDRs (e.g. Cisco RADIUS, Legacy PBXes, etc.), everywhere the disconnect cause given by default. Why would asterisk be different?
Does this change break anything?
Personally I would like to avoid using the 'h' extension (for putting hangupcause to CDR user field). It makes another min. one more step in dialplan (usually one more manager event) - which could be avoid.
Yes, you can say: in this way we can add any variable to CDR and it will be endless. However for hangupcause [disconnect cause] I think it's justifiable.
By: Tilghman Lesher (tilghman) 2006-01-11 23:21:04.000-0600
If you really want this, I would suggest that you dispose of hangupcause in the channel and let the CDR be the one storage location for hangupcause. Storing it in two different structures is begging for a bug.
By: apignard (apignard) 2006-01-15 09:49:35.000-0600
There is 2 missing value in CDR.
Hangupcause (based on Q.931 as i had suggest), if a route is broken we can disable it.
Second is PDD (Post Dial Delay). It's store time between dial and ring.
Theses 2 variables is important and can be used by generate stats for verify the quality & status of a route.
By: Tilghman Lesher (tilghman) 2006-03-01 16:22:21.000-0600
Any updates? // Housekeeping
By: jalsot (jalsot) 2006-03-02 06:52:35.000-0600
"If you really want this, I would suggest that you dispose of hangupcause in the channel and let the CDR be the one storage location for hangupcause. Storing it in two different structures is begging for a bug."
Unfortunately I didn't underestand what two different structures you mean. I did this 'hack' according to the other fields in CDR. Of course it may be not the right or the best way to do.
Could make a suggestion what to change - maybe how? I'm not so deeply in asterisk codes so I need a bit help with...
PDD: For PDD I think CDR(answer)-CDR(start) can be usable (I'm not sure however if CDR(start) can be used as the start of alerting or not)
By: Tilghman Lesher (tilghman) 2006-03-02 10:14:45.000-0600
What you are currently doing is copying the hangupcause out of the channel structure and into the CDR structure. Instead, you should REMOVE the hangupcause out of the channel structure and ADD it to the CDR structure, then change all occurrences in the codebase where we're setting the hangupcause to use the new location.
By: Tilghman Lesher (tilghman) 2006-03-24 23:47:34.000-0600
Suspended while waiting for a new patch.