CDR reports missing Source field in FreePBX 2.11

Hi Freepbx,

I noticed that in CDR reports, the Src Channel and Source field are gone.
There are other fields now like CallerID Number and CallerID Name, but those fields do not give a result when I enter for example extension 201 or SIP/201.
Is this correct?

I tried everything but I only can search Destination Extensions and not Source Extensions.
Everything that I fill in with CallerID Number, gives me zero results.

How can I search the source calls from extension 201 in this new layout?

Thanks for pointing me in the right direction. It seems cnam, cnum, outbound_cnam and outbound_cnum were added when I upgraded from 2.10 to 2.11. Src is still getting populated for me but cnam and cnum are not which is what the reports site looks at. Let me know if someone finds a fix for this.


For outbound calls the extension number (e.g. 201) appears in the CallerID field on my 2.11 install.

Hi LeeMason,

Thank you for your answer.
Ik think I upgrade freepbx one too many time LOL. Came from Fpbx-2.9.
I Will try to maken a backup and install it on a fresh 2.11
Thanx for you answer!

I have the latest FreePBX Distro with 2.11 (all updates current) and I concur that the CallerID field does not search the same as “source” did. I have a source CID that contains ‘3911’ in it. I can see records with that source number using only a date range search. But when I simply put ‘3911’ in the CallerID field and click “Contains” radio button and hit SEARCH, I get an empty result set instead of only those records in the date range with 3911 contained in the CallerID. So, something’s amiss with how it is constructing the query with CallerID in place of Source.

Just confirmed that Destination still searches OK. The display for CalledID appears to be the ‘src’ field and the hover is the ‘clid’ field. But this is problematic for searching Source versus CallerID. ‘src’ is what Asterisk knows. ‘clid’ can arbitrary (local or remote) depending on how it is set up. For internal outbound, the ‘clid’ may or may not have the Asterisk ‘src’ extension included. Having search by CallerID is nice (when it works), but I think you need to have CalledID AND ‘src’ as they are similar but not always the same criteria, but complement each other in searching scenarios.

Also just tried Caller ID Name and it is not picking up these same records either. Tried Contains both “3911” and part of their CNAM as it appears in the actual ‘clid’ field in the cdr table.

Like you, 4allbusiness, I had upgraded from a long line of freepbxes (trixbox circa 2006-7 to present). Asterisk had also moved from 1.4 to now 11. Of course, several manual conversion aspects along the way. But the jump from Trixbox (Asterisk 1.8) to current, the CDR table took on some new columns. In particular, ‘cnam’ and ‘cnum’. So, while I have historic data in ‘clid’ and ‘src’, for all CDR records before the jump to FreePBX Distro, ‘cnam’ and ‘cnum’ are blank. For all CDR records after the migration, those fields are populated. The ‘cnam’ and ‘cnum’ appear to be parsed from ‘clid’ (to put it simply). One could probably take the historic ‘clid’ column and populate ‘cnam’ and ‘cnum’ for those records.

However, this still does not negate the desire to ALSO have ‘Source’ (and maybe even ‘Source Channel’) as search criteria as well. At least, if you are going to display ‘src’ as the “CallerId”, have it search ‘src’ and not ‘cnum’. No doubt many people have migrated historic CDR data to present. And, as such, they (me) still need to be able to search ‘src’.

In the previous version I would search most frequently by CDR channel and source. This is quite disappointing to do an upgrade and find out you have actually been downgraded in capacity. Since I did not pay for my Freepbx software it is difficult to really complain with authority. So I humbly ask for the team to give us back our CDR search functions. Thank you in advance.

I second that!! I just learned that Asterisk does not populated cnum and cnam on background answered calls (like my IVR). I kept putting in a pattern on CalledID Num and for a row that was appearing in the date range search, but it wouldn’t find it. So, I went into the asteriskcdrdb cdr table in MySQL and discovered on these types of answered calls, those two fields are not being populated even when CLID and SRC are. This is frustrating. I know can go into the source and add a search on ‘src’ too, but the bottom line is that the functional behavior changed in 2.11 and broke the search on src that many of us used regularly.

So has anyone bothered to open a bug or feature request on this??? It wont get addressed until that is done.

Well, no, not yet. I am recently joined here, so where and how would I have known I needed to do that? I was replying to a post and reporting back some of the things I had learned. Not being a regular contributor and new to the forums, I assumed developers would draw on the forums for programming feedback same as your bug tracking system (of which I know nothing about as of yet). My understanding from the original poster was that that the feature was present in previous releases and had been removed. I’d be happy to process a bug report if that is the only way to officially request this. But until you responded, nothing I had seen so far in my time in the forums stressed this requirement in such a way as to draw my attention to it prior (such as a sticky).

There is a drop down menu above labeled “development” and a link labeled “Bugs & Feature” See this link:

We are in the process of making that easier to find for new users.

edit page.cdr.php
add the line:

$cnum = str_replace(“cnum”,“src”,$cnum);

// Build the “WHERE” part of the query
$where = “WHERE $date_range $cnum $outbound_cnum $cnam $dst_cnam $did $dst $userfield $accountcode $disposition $duration”;
This program added back the src source column and search capabilities that were missing in the current CDR function of Freepbx. What a relief!

We uploaded a patch to ticket 6798 which we are looking at implementing which should solve some people issues they are having. Please take a look at it here and apply using:

patch -p1 < page.cdr.patch

If this works for everyone, we can get it committed and roll a new cdr module, if not we will look at other options.


If you want anything done please reply to the ticket. We can’t keep going back and forth. In the ticket you can upload images as well.

The above post had two pictures embedded of examples of one cdr with src channel search that works vs. the freepbx cdr that does not have the option even available on the screen to do such a thing.
The link to a pdf that shows the comparison is below. (Hope it works.)