Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Asterisk PBX Add-On [Under Constraction]
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti
Author Message
mojiro
Cacti User


Joined: 24 Jul 2005
Posts: 60
Location: Greece, Korydallos - Athens (AWMN)

PostPosted: Mon Jan 23, 2006 5:52 pm    Post subject: Asterisk PBX Add-On [Under Constraction] Reply with quote

Intro:
One month ago I started working on Asterisk. I allready had cacti, so I said
"why not to make an addon ?". But I haven't noticed the need of the Plugin
Architecture and I started modifying the cacti 0.8.6g php code to accept my
plugins/addons. How stupid movement, because most of modifications were
ready from the P.A. mod. That means, I have an Addon with such a nice and
friendly GUI but no compatility with current P.A. There are several reasons
that I cannot change(I have translated to Greek language) Cacti version.

What I have done:
It connects succesfully to CLI (asterisk console) and then returns data. At
the moment I have parsers for the following commands:
    Sip Show Peers
    Sip Show Settings
    Sip Show Channels
    Sip Show Registry
    Sip Show Users
    Database Show
    Show Translation

Parsers are reading CLI data and outport html tables with css etc. support.

Also there is already support to ADD, EDIT, DELETE a SIP friend-acount.
You cannot manipulate(from cacti) with SIP peers-acounts or IAX.

What the Plugin Needs:
Of course asterisk, cacti, mysql(for saving sip data) and modifications
at your asterisk configuration.

What I want:
Notices, information, feature requests, ideas


I want to say that the main work of the addon is to manipulate with sip
friends(just simple functions) and retrieve-show statistics. I will not make
a plugin to configure your Asterisk, there other programs for this job. I
really wait for 0.9 version, to fit my plugin on it. Allthow I am not able to
export my plugin at the moment, I will do it with the next cacti version.



sip-show-user.gif
 Description:
 Filesize:  11.54 KB
 Viewed:  29842 Time(s)

sip-show-user.gif



sip-show-settings.gif
 Description:
 Filesize:  14.11 KB
 Viewed:  29842 Time(s)

sip-show-settings.gif



sip-show-peers.gif
 Description:
 Filesize:  17.89 KB
 Viewed:  29842 Time(s)

sip-show-peers.gif



list-mysql-registrations.gif
 Description:
 Filesize:  13.13 KB
 Viewed:  29842 Time(s)

list-mysql-registrations.gif



friend-settings.gif
 Description:
 Filesize:  12.14 KB
 Viewed:  29842 Time(s)

friend-settings.gif


Back to top
that_kid



Joined: 18 Mar 2005
Posts: 29

PostPosted: Tue Jan 24, 2006 6:55 pm    Post subject: Reply with quote

I would love this, I've been looking all over for a way to have cacti monitor my asterisk server.
Back to top
cigamit
Developer


Joined: 07 Apr 2005
Posts: 978
Location: B/CS Texas

PostPosted: Tue Jan 24, 2006 7:10 pm    Post subject: Reply with quote

Most of the items you have added seem like they would be very easy to migrate to the Plugin Architecture. If you would like, you can email the addon to me, and I will gladly convert it to a plugin for you. The process is realitively quick and painless, taking only a few hours at most.
Back to top
mojiro
Cacti User


Joined: 24 Jul 2005
Posts: 60
Location: Greece, Korydallos - Athens (AWMN)

PostPosted: Wed Jan 25, 2006 6:29 am    Post subject: Reply with quote

I want to do a final beta-bug test and then I will add some functions to be
easy installed (auto install mysql, etc), and then I will upload it.

Cigamit, if I add a table inside the main cacti-database, would it make
problems at the cacti upgrade function ?

Also for the add-on menu, I use the cacti-function for making menus and
I have added the menu-table at <cacti_dir>/include/config_arrays.php.
Is it proper ? Is it possible to be done from P.A. ?
Back to top
cigamit
Developer


Joined: 07 Apr 2005
Posts: 978
Location: B/CS Texas

PostPosted: Wed Jan 25, 2006 11:04 am    Post subject: Reply with quote

mojiro wrote:
I want to do a final beta-bug test and then I will add some functions to be
easy installed (auto install mysql, etc), and then I will upload it.

Cigamit, if I add a table inside the main cacti-database, would it make
problems at the cacti upgrade function ?


You should have no issues updating cacti if you include extra tables, Cacti only changes what it has to in the upgrade process, so the extra tables are never even looked at. Most plugins out there already add a few extra tables to the database.

mojiro wrote:

Also for the add-on menu, I use the cacti-function for making menus and
I have added the menu-table at <cacti_dir>/include/config_arrays.php.
Is it proper ? Is it possible to be done from P.A. ?


That is the proper way to do it, and it is possible to do it via the Plugin Architecture. With the plugin architecture, instead of manually modifying config_arrays.php, you add a function to the plugins setup.php file (all plugins require this file as a sort of registration file) and have it add to the arrays from within this function. Its not the easiest to explain without getting technical, but documentation is in the works!
Back to top
mgob



Joined: 07 Dec 2005
Posts: 25
Location: Arizona

PostPosted: Wed Jan 25, 2006 11:54 am    Post subject: Reply with quote

PLEASE keep us updated on the progress of this, let me know if there is anything i can do to assist, this looks like something i would love to have.

-MGOB
Back to top
mgob



Joined: 07 Dec 2005
Posts: 25
Location: Arizona

PostPosted: Thu Jan 26, 2006 10:12 am    Post subject: Reply with quote

anyways to package it at all? i'd love to help work on it since this is a plugin our company would probably use on a daily basis....

-MGOB
Back to top
mojiro
Cacti User


Joined: 24 Jul 2005
Posts: 60
Location: Greece, Korydallos - Athens (AWMN)

PostPosted: Thu Jan 26, 2006 12:03 pm    Post subject: Reply with quote

I want to add a menu-page for the configuration, instead of
a config-php file. Until I finish it please make, suggestions for
anything you imagine that may be supported for this plugin.

for example, one usefull option is the deactivation of user
management if it is difficult for someone to adapt his asterisk
configuration to the one I will suggest, to coply with the script.

Because I am not guru at Asterisk, you can help by informing
me for the suitable asterisk-configs. For the moment I use
something like the following:

at sip.conf

Code:
;------------------------------
; mojiro - 18321
;
register => 18321@10.8.213.67::18321@10.8.213.67/18321


Code:
;------------------------------
; mojiro - 18321
;
[mojiro]
type=friend
regexten=18321
username=mojiro
secret=
callerid="18321-mojiro" <18321>
host=dynamic
nat=no
dtmfmode=rfc2833
canreinvite=no
disallow=all
;allow=gsm
allow=ulaw
allow=alaw
context=default
qualify=yes
deny=0.0.0.0/0.0.0.0
permit=10.0.0.0/255.0.0.0


at extensions.conf

Code:
;------------------------------
; mojiro - 18321
;
exten => 18321,hint,SIP/mojiro
exten => 18321,1,Dial(SIP/mojiro,40,rt)
Back to top
mgob



Joined: 07 Dec 2005
Posts: 25
Location: Arizona

PostPosted: Thu Jan 26, 2006 12:13 pm    Post subject: Reply with quote

those configs are right for what they are for, i'm not sure what you are asking..

-MGOB
Back to top
routerboy



Joined: 12 Jan 2006
Posts: 9

PostPosted: Wed Mar 29, 2006 10:38 pm    Post subject: Reply with quote

Just wondering how this is coming along, I'm interested in trying it out.

Thanks
routerboy
Back to top
docelmo



Joined: 12 May 2006
Posts: 5

PostPosted: Fri May 12, 2006 2:53 pm    Post subject: Reply with quote

I Dont know if anyone is interested.. I will have a graph w/ script probably complete this weekend. It will graph calls and channels. Im sure you can do more with it but I just need to know the total number of calls and channels.. Nothing more..


Let me know if your interested and I will put up the code.
Back to top
that_kid



Joined: 18 Mar 2005
Posts: 29

PostPosted: Fri May 12, 2006 3:01 pm    Post subject: Reply with quote

Yes please post the code, i'm definitely interested. Thanks for the hard work too.
Back to top
docelmo



Joined: 12 May 2006
Posts: 5

PostPosted: Fri May 12, 2006 11:15 pm    Post subject: Reply with quote

that_kid wrote:
Yes please post the code, i'm definitely interested. Thanks for the hard work too.


ok here comes.. Just need to figure out how to add files..



Send me some news on how your installs go.. Im curious..



pollcalls.txt
 Description:
rename and configure in your /scripts directory. its very basic..

Download
 Filename:  pollcalls.txt
 Filesize:  1.05 KB
 Downloaded:  1498 Time(s)


cacti_graph_template_asterisk_call_graph(3).xml
 Description:
Cacti graph and such. You may need to chage input method depending on your install. I didnt use cacti root variable. Its hard coded

Download
 Filename:  cacti_graph_template_asterisk_call_graph(3).xml
 Filesize:  11.17 KB
 Downloaded:  1274 Time(s)


astman.txt
 Description:
Astman OOP Class for pollcalls.php

Download
 Filename:  astman.txt
 Filesize:  1.46 KB
 Downloaded:  1131 Time(s)

Back to top
cinen



Joined: 19 May 2006
Posts: 1

PostPosted: Fri Jun 02, 2006 2:09 pm    Post subject: Reply with quote

I am trying to get this to work but I am not having any luck. I have edited pollcall.php and astman.php with my server info. When I try to bring up graphs I get nothing. If anyone has any ideas please let me know. I am not a programmer so it may be something simple. I have searched these forums as well as others and this is about the only asterisk monitor I can find for cacti. I am running cacti ver 0.8.6h and asterisk 1.2.7.
Back to top
docelmo



Joined: 12 May 2006
Posts: 5

PostPosted: Sun Jun 11, 2006 12:49 am    Post subject: Reply with quote

cinen wrote:
I am trying to get this to work but I am not having any luck. I have edited pollcall.php and astman.php with my server info. When I try to bring up graphs I get nothing. If anyone has any ideas please let me know. I am not a programmer so it may be something simple. I have searched these forums as well as others and this is about the only asterisk monitor I can find for cacti. I am running cacti ver 0.8.6h and asterisk 1.2.7.


Well your in luck.. I wrote this script and happen to be an asterisk guru.. Did you setup your manager.conf to allow the script to talk to it? Are the scripts executible? There can be many reasons why it will not work. If you would like I can login and give you a hand with it.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group