Asterisk 13 database src field gets overwritten by set caller id

Dear all,
i noticed strange behavior with Asterisk 13. With previous versions when setting the caller id prior to initiating a call, the src column would stay unaffected. With the 13, src field gets overwritten with the caller ID. So when i a user places a call and i try to set an external suitable caller ID, i can no longer know who initiated the call and just see the external caller ID set.

Any ideas here?

Thank you

I see it as a good feature, not a problem. Which CDR backend are you using? On most backends you can add new fields and assign a value to them in the dialplan, like Set(CDR(realsrc)=yourextensionsrc)

1 Like

this is discussed here as well:

i am using a mysql back end. I see some repetition here which is not needed as clid is already present to store caller ids. I can set the real src value from within the dialplan but given that i have a rather large dial plan with multiple possible entries, i might end up overwriting it. Also, currently using a mix of older and newer versions of asterisk, and for reporting consistency i would need to implement this change across the board. I was wondering if there was some way of forcing asterisk not to update it.

No, there is no way to prevent Asterisk from updating the CDR src field.

CDRs in Asterisk 12+ match (to the best of their ability) what is actually happening with the data set on the channels. When properties of the channels are changed, it will generally be reflected on the CDR. If you want to preserve some original property of the channel, then you’ll need to do what @ldardini recommended and store that value in a custom attribute.

2 Likes

As for why this is the case, Asterisk defines the src field as the Caller ID Number. As such, when it gets changed in the dialplan, the CDR attempts to reflect that change.

The clid field contains the full Caller ID of Party A in the CDR. That may be the same as the src field, but it may also contain the party name as well as any other information reflected in the Caller ID. Hence, it may be “duplicate” in some cases, but in other calls it can be quite different.

2 Likes

understood. thank you both for your suggestions and information, I will be going with the custom attribute.