Hi all In asterisk source code we can see lots of places AST_CDR_FLAG_LOCKED flags is used.This is for CDR purpose. Does anyone what is exact usage of this lock in CDR.If I remove this flags where it will impact,any data overwrite will happen..? Thanks Nikhil
On Tuesday 22 March 2011 00:56:05 Nikhil wrote:> Hi all > In asterisk source code we can see lots of places > AST_CDR_FLAG_LOCKED flags is used.This is for CDR purpose. Does anyone > what is exact usage of this lock in CDR.If I remove this flags where it > will impact,any data overwrite will happen..?Yes. The purpose of the lock is to force a record to become a snapshot at the time the record was locked. If you remove that flag, then almost any update to the CDR will overwrite the entire record with a new snapshot. -- Tilghman
Hi Lesher Thanks for reply. I am trying to understand how CDR in asterisk is working(Code wise),because some issue are there in CDR in call feature scenarios like call transfer ,call forward etc.I wanted to fix that issues for that I am planning to rewriting the CDR logic.Do you have any document which explain how CDR works in asterisk and what are its limitations. Thanks Nikhil On 03/22/2011 11:35 AM, Tilghman Lesher wrote:> On Tuesday 22 March 2011 00:56:05 Nikhil wrote: >> Hi all >> In asterisk source code we can see lots of places >> AST_CDR_FLAG_LOCKED flags is used.This is for CDR purpose. Does anyone >> what is exact usage of this lock in CDR.If I remove this flags where it >> will impact,any data overwrite will happen..? > Yes. The purpose of the lock is to force a record to become a snapshot at > the time the record was locked. If you remove that flag, then almost any > update to the CDR will overwrite the entire record with a new snapshot. >
On Tuesday 22 March 2011 02:20:24 Nikhil wrote:> Thanks for reply. I am trying to understand how CDR in asterisk is > working(Code wise),because some issue are there in CDR in call feature > scenarios like call transfer ,call forward etc.I wanted to fix that > issues for that I am planning to rewriting the CDR logic.Do you have any > document which explain how CDR works in asterisk and what are its > limitations.Good luck with that. That subsystem has been gone over many times in an effort to improve it. The basic problem is that CDR is designed for a much simpler time, when we did not have things like call transfers, 3-way calling, call conferences, and the like, so it is maladapted for modern usage. A much better method is the CEL subsystem, which generates events which can be analysed after the fact to create a much clearer picture about how a call progressed. -- Tilghman
Thanks .. which version of asterisk have the CEL completely. Now I am using 1.6.2 . Thanks Nikhil On 03/22/2011 03:31 PM, Tilghman Lesher wrote:> On Tuesday 22 March 2011 02:20:24 Nikhil wrote: >> Thanks for reply. I am trying to understand how CDR in asterisk is >> working(Code wise),because some issue are there in CDR in call feature >> scenarios like call transfer ,call forward etc.I wanted to fix that >> issues for that I am planning to rewriting the CDR logic.Do you have any >> document which explain how CDR works in asterisk and what are its >> limitations. > Good luck with that. That subsystem has been gone over many times in an > effort to improve it. The basic problem is that CDR is designed for a much > simpler time, when we did not have things like call transfers, 3-way > calling, call conferences, and the like, so it is maladapted for modern > usage. A much better method is the CEL subsystem, which generates events > which can be analysed after the fact to create a much clearer picture about > how a call progressed. >