Hello all, First of all, I want to apologize for the length of this message. I wouldn't like to waste anyone's time. I'm new to this list and also fairly new to the VoIP world. I work for a company that provides some basic telephony services using FreeSWITCH. Recelty, we sketched up a plan to extend the features of our service to the customers; so we started experimenting first. Our setup is a basic HTTP server that controls FreeSWITCH through mod_xml_curl and processes call information afterwards, with the information provided by mod_xml_cdr. In general, each customer has its own context and we are trying to come along with a general billing system that tries to be as fair as possible. In order to reduce billing system complexity, we are completing channel information from the dialplan so we can inspect each CDR generated independently, and be able to discard it or process it on its own, without having to check other related CDRs. Obviously, this is becoming harder and harder after we started dealing with call transfers, either attended or blind. Consider the following scenario: 1. We have four customers: A, B, C and D. 2. A calls B, the complete billing information is in the a-leg (from A to FS) and it will be charged as a call to B. 3. After some time (say 20 seconds), B makes a blind transfer to C. So a new b-leg is created (from FS to C), the channel between FS and B is closed and a CDR is generated. Conceptually, this is a call from B to C which should be charged to B, not to A. 4. Again, after some time (say 30 seconds), C makes a blind transfer to D. Similar procedure: new channel from FS to D and the channel from FS to C terminates, generating a CDR. This time, we should charge a call from C to D. 5. After 15 seconds, A or D hang up and two more CDRs are generated. In the end, the billing system should charge: - The call between A and B, which had a duration of 65 seconds. - The call between B and C, which had a duration of 45 seconds. - The call between C and D, which had a duration of 15 seconds. And here is where the problems arise, because only the a-leg (from A to FS) contains the proper value of <billsec> for the "logical" call between A and B. The CDR of the FS to C channel has a <billsec> of 30 seconds and the one for the FS to D channel has 15 seconds (all aprox). However, all CDRs appear to have the same <call_uuid> so they can be easily related. The problem is that we would like to avoid this CDR dependency if we can, mainly because the background process that treats with CDR information is stateless at the moment. The purpose of this message is to survey about what other people is doing about this, as it seems to be the source of some headaches according to the list archives. I think that, in the end, we will have to mix up different CDRs but we may be missing some hidden functionality of FreeSWITCH. Thank you for your time :-) P.S: Testing the same call flow, but with attended transfers it is even more complex in terms of CDR processing, but we would like to have some idea on how to solve this one first. -- Isaac Jurado Internet Busines Solutions eConcept