Handy PHP to filter out a single call log

Hey all,
During my reading of the forum and from my own experience of needing to stare endlessly at the log files I thought it would be handy to have a simple page that remembers that nice line I saw @dicko give out not so long ago. grep “\[23246\]”.

I forget things before I take the next breath so a fixed page to do the work is handy for me at least.

I have dropped the PHP code on the same page as the CDR query stuff.
http://hiddenvision.co.uk/fpbx
Grrr. clicking on the link opens in this page so remember that.
Open link in a new tab or window to keep on the forum page

No instructions but simply make a folder off the main html folder on the pbx and drop the php into it. rename as required and hit the page. It does not have to live on the PBX as long as you have access to the logs remotely. For the sake of clarity, look for the number in brackets [23246] in the Freepbx/asterisk logs and use that as a search. But then you would know that if you read the php.

I only wrote it half an hour ago from snippets round the globe so I am sure it could be improved.

Hey perhaps something similar could be introduced in the Standard log viewer.

Anyhow, you MAY find it handy if you are debugging call flows.

please do not judge me on my code writing,
I write stuff to express a concept not to save the world.

Hv.

For those that may not know.

If you search for say: 941.*
it will list all the stuff that starts with 941

Like [9410], [9411], [9412]

Handy for PERHAPS catching the related info.
I change the script a little.
It may be updated from time to time.
Take a peek every once in a while.

Hv.

Thanks for sharing, two minor criticisms:

  1. The absolute best way to share code is via Github, you will get more visibility and eventually complete strangers will suggest and code improvements which you can easily merge.
  2. You really do need to include license terms. If you don’t care about licensing, just use GNU GPL/2 or later.

Hi @lgaetz

1: Can’t be bothered with the sharing process. I leave that for others to do if desired.
2: As per 1.

Looking at it, the code is a total mess but those that want pretty can check back later.

But I am happy for anything I say or do to be wrapped into the freely availably distro.
Does that cover it.? :slight_smile:

Just wrapping up the dialplan lookup page.

Hv.

No. Put a few comment lines at the top of your script(s).

Will the world explode if I don’t.

Hv.

Eventually.

Fantastic,
I am never going to do it now.

Dialplanlookup is also included.
http://hiddenvision.co.uk/fpbx

Hv.