On 24 Jun 2011, at 07:41, Richard Zulu wrote:
> Hey,
>
> I have installed asterisk 1.8 on Slackware 13.1 from source and it is
working well.
>
> I have 300 ip phones in a natted environment and my asterisk server has a
public IP
>
> I would love to monitor my SIP activity on my VOIP Server, statistics like
amount of sip traffic, who made what call and to whom, how many calls were made
in a month, how many ip phones are up and running, which sip phone has made most
calls among others.
>
> How best can I do that?
>
> On the other hand, I have also tried installing ast-gui onto asterisk 1.8,
it has installed well but it however keeps looping whenever i try to login in,
it says checking permissions on gui folder and loops. Haven't found much
help on other mailing lists, any direction given in welcome.
>
> Thanks
> Richard Zulu
>
> Twitter
> www.twitter.com/richardzulu
>
> Skype: zulu.richard
>
> There is no place like 127.0.0.1
>
I've solved this a couple of different ways, depending on the nature of the
reporting.
The 'conventional' way is to have CDR log to a relational database
(probably not mySQL)
and then write queries against that data.
It can get quite tricky to get things like max-active-calls out of CDR although
it is possible
if you are sneaky and have a decent database engine.
select max(
(select count (s.cdr_key)
from cdr s
where s.created_at -(s.billsec/(24*60*60)) < a.created_at
-(a.billsec/(24*60*60))
and s.created_at > a.created_at - (a.billsec/(24*60*60))
and s.accountcode in ('VUCME','ZDX')
)+1) as channels
from cdr a
where
to_char(a.created_at,'IWYY') = {@weekno}
and a.accountcode in ('VUCME','ZDX')
order by a.created_at - a.billsec/(24*60*60)
for example.
The dis advantage of this is that it is purely retrospective - cdr gets written
at the end of the call (mostly).
The unconventional way is to hang something like Asterisk-java (or adhearsion)
off the manager
and have it collect events into 'interesting' silos - modern languages
like groovy and Ruby are pretty good at this
sort of thing.
Last I looked SNMP only tells you about the _current_ state of the calls, no
retrospection at all.
Tim Panton - Web/VoIP consultant and implementor
www.westhawk.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20110624/84a5b2a7/attachment.htm>