[asterisk-dev] CDR variables
Olle E. Johansson
oej at edvina.net
Sat Nov 21 08:55:37 CST 2009
21 nov 2009 kl. 15.35 skrev Tilghman Lesher:
> On Saturday 21 November 2009 04:26:00 Olle E. Johansson wrote:
>> I was looking into adding the RTPAUDIOQOS variables directly to the cdr's
>> from chan_sip as a cdr variable. I notice that there are no other modules
>> that does add cdr variables directly.
>>
>> Is this because developers hasn't noticed this feature or because it will
>> fail miserably and cause disruptions in the Asterisk space/time
>> relationship?
>
> I think this would be in danger of colliding with namespace that existing
> administrators have set up. Certainly this would need a clear warning in
> UPGRADE.txt.
>
>> If this works, is it safe to add variables to the cdr as long as I have an
>> AST_CHANNEL available? We have two closures of cdr - after or before "h"
>> processing - but when will the CDR be stored - at destruction of the
>> ast_channel or when we freeze it?
>
> It's safe, as long as you use the published API of ast_cdr_setvar(). This
> correctly deals with the cases when a CDR has already been locked from
> further changes.
This is interesting. So the "freeze" is a total freeze - we can't add variables after that time?
>
> CDR is stored at a point following its detachment from the channel. This
> event could occur at any point in time after that, considering that Asterisk
> can be configured for CDR batching and error recovery.
I need to figure out when it's detached. I guess it's in ast_hangup.
thanks for the response, Tilghman!
/O
More information about the asterisk-dev
mailing list