How to see call volume per DID

Hi Everyone,

I need to find the number of minutes going through our toll free number vs our local number. I have pulled up the CDR report, but most of the entries do not have DIDs, and when I try to parse the CSV the number of comma separated items in each line vary, making it difficult to find the information I need. How should I interpret the entries with no DID, and is there a way to find call minutes by incoming route?

No, the csv format are fixed as to number of fields, you need to recount your commas, those will be by default be as documented in:-

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-SysAdmin-SECT-1.html

If you have any “catchall” inbound routes, by definition the probably won’t have any DID

I’m not counting, I’m using C# to parse the data. I just split each line using ‘,’ as a delimiter. I’m getting many lines with 16, 17, and 24 items per line. I can see that the 20+ lines are because some of the entries have several sequential commas in them, but I’m a bit confused by those with less than 18. If it was ditching empty entries, the 20+ entries would have the extra empty items thrown out as well.

As for the catchall inbound route, we don’t have any that I can see, but I will look into that more. We have several number that can be called as direct lines, and two that go to the IVR.

Thanks for the advice though! I’ll keep looking into what you recommended.

you shouldn’t count the commas between the double quotes you will also have to handle the “”" or other ‘quoting’ artifacts that exist in that table, (escaping quoting has always been fun) , the second field ‘src’ is the ‘DID’ the channel sees.the fifth ‘clid’ is the “CallerID(all)” on the channel, they genereally agree s the the number but there are many situations where CLID is suppressed or SRC is absent (that would be the catchall thingy)

The ODBC/MYSQL tables are alwas better formatted (because of that ‘quoting’ entanglement being fixed), if you have the asteriskdrdb.cel table you would best use that as we all know cdr is “broke”