g613 / asterisk-cdr-viewer

Simple and fast viewer for asterisk CDRs / recordings
56 stars 33 forks source link

Username matching #39

Open sinyb opened 5 years ago

sinyb commented 5 years ago

Hello!

IMHO username should also match the last part of "src channel" and "dst channel". For example, I have an user/extension SIP/194, but its outside callerid is xxxX194, so its calls to the outside are not displayed. I cannot use _194 because there is other outside number xxxY194 which should not be matched.

I have fixed this by adding: or dstchannel RLIKE '$cdr_user_name' or channel RLIKE '$cdr_user_name' to the SQL query in index.php (in line 104)

Maybe we should have an option in config.php for this?

One other problem (I am not really a PHP nor WEB programmer) is that I dont understand how should I set '$cdr_user_name_mod' to 'asterisk-regexp', so I have just commented out 'if' line before and 'else' part after this ... Tried to set it in config.php, without success, but IMO that is the place to set it.

Thank you for a beautiful and very useful piece of software and best regards, Sinisa