I upgraded to Asterisk 13 and found that all my CDR records are now being changed because of Set(Callerid(num)=0123456789), CDR(src) then changes it value to 0123456789 and I am not able to identify the extension making the call.
The short answer is: you can’t. If you change the Caller ID, that is going to be reflected in the CDRs.
The long answer: due to many of the architectural changes made in Asterisk 12, CDRs were completely rewritten. Much of the rewrite enforced a standardization on the behavior, such that the CDRs behave the same way regardless of the dialplan written. While this has made things a lot more predictable, some functionality was tweaked/modified/altered. Unfortunately, that was unavoidable.
As I said, if you want to record the extension number in a CDR and you want to modify the Caller ID, you can always store it in a custom field.
Given that this is the only place where this is discussed i will ask the question:
if clid includes the caller ID info, what is the point of also placing that number in src? For complex dial plans it might be painful to know when to store the originating caller extension and where to. Is there some way of “disabling” this and not allowing src to be overwritten?
Asterisk 13.18.5 issabel 4.0.0 1
replace this string or just comment
// isset($value[‘src’]) ? $value[‘src’] : ‘’,
with new string
isset($value[‘cnum’]) ? $value[‘cnum’] : ‘’,