Asterisk 13 upgrade - CDR(src) getting changed by callerid(num)


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.

Can any one advise on this problem?


The src is the CallerID number, so that’s what I would expect to happen.

If you need to record the original value some place, you can always use a custom CDR column and save that information before invoking the CALLERID function.

1 Like

I have multiple extensions exp: 2000 and 3000.

2000 needs to display 0123456789 when phoning out
3000 needs to display 0111111222 when phoning out

In Asterisk 1.4 my CDR(src) wasn’t being changed using Set(CALLERID(num)=0123456789) but since the upgrade to Asterisk 13, CDR(src) is being changed.

How can I then display the out going CLI and not effect the CDR(src)?

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.

1 Like

Thank you, I do understand now.

I will have to confirm that our TMS system is not using the CDR(src) for any search criteria and if it does it will have to be changed.

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
in file
replace this string or just comment
// isset($value[‘src’]) ? $value[‘src’] : ‘’,
with new string
isset($value[‘cnum’]) ? $value[‘cnum’] : ‘’,