This post is at: ForumFeatures Wanted
24 posts / 0 new
Last post
ithornton
ithornton's picture
Joined: 2011/09/02
Points: 0

Please can I request the registration status of the extension be shown under the user extensions page. There could be an icon with a red and green status indicator showing if it is currently registered. This would make it much easier rather than going into the PBX information screen, or logging into asterisk and performing a 'sip show peers like'.

If you like the idea or have any comments please respond.

Regards,
Ian

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

i ended up creating my own searchable/sortable link for this in the link manager... but having it actually ON the user extension page would be nice

IVSCOMM
IVSCOMM's picture
Joined: 2008/03/18
Points: 0

I would like to see that Jasril could you post a screen shot?

Shawn Wright
IVSComm

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

sure, i'll work on putting up some pictures, i'll warn you it's not pretty, but i find it functional

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

sorry it took so long, had to have Boss' approval... *and i was able to get it via the ensuing screenshots which look like a government document about area 51*

show_peers.cgi

if you have any questions i'd be happy to answer them, even though it is very simple it's one of the first programs i ever made so be gentle haha~

i have also created a tenant lookup which links directly to this program so you can find a tenant based on their tenant name or their description... i'd show a pic of it but it's just 2 columns and a search bar~

brian
brian's picture
Joined: 2009/07/10
Points: 0

Thats really excellent! Are you going to share the code :) ?

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

Sure if anyone is interested I can post the code for it... I also have a few other programs I use, so please let me know if any of the following interest people:

1) a tenant search tool that matches to the tenant name or the description, and links up with the show_peers tool

2) a voicemail aging and deleting script which allows you to set different numbers of days for each tenant before their old voicemails automatically delete

3) a DID listing tool on a per tenant basis (my boss wanted this cause it's faster than doing it in thirdlane)

4) A tool that shows each tenant's current office mode, and gives you the ability to change them witch a button click

5) A tool which allows you to upload a CSV file to call everyone in the CSV file and connect them with a script of your choice (could be an IVR, or something to connect the called party to a person's phone, whatever you specify) this program is still in early stages, cause it has no voicemail detection, so if one of the phone numbers in the CSV file is answered by voicemail it won't know the difference lol

Anywho, let me know what you all are interested in, and I'll try to get the code up as soon as I can

ithornton
ithornton's picture
Joined: 2011/09/02
Points: 0

I'm liking the tool you've created Jasril. If we could have something like that integrated within Thirdlane it would be great.

Thirdlane is currently geared up for confguration and management rather than monitoring the system health and checking the status of configured accounts/trunks. It would be great if we could do some simple things like seeing registration and call status in the Thirdlane GUI rather than have to extract it from the asterisk terminal.

IVSCOMM
IVSCOMM's picture
Joined: 2008/03/18
Points: 0

I would like to see the code and how you installed it if possible.

Shawn Wright
IVSComm

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

ok, I'll work on putting up some source code, there is no installation, these are just CGI scripts written in perl (just like all of thirdlane) you would just need to copy and paste them into the

/usr/libexec/webmin/asterisk/

folder of your thirdlane, there might be some tweaks you may need to do to the script to get them to work for you, i designed them to work for me and i use a tenant naming scheme of a 10 digit number... i tried to make sure they would work for tenants with letters in their name too, but it might not be the case in some instances...

also copy and paste the contents of http://www.kryogenix.org/code/browser/sorttable/sorttable.js into a file labeled "sorttable.js" in the same folder, that will make the columns sortable by clicking the headers

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

ok i made a post in the sharing section with the show_peers script...

https://www.thirdlane.com/forum/show-peers-cgi-0

armandomuniz305
armandomuniz305's picture
Joined: 2010/09/24
Points: 0

Hi Jasril

You did a great job on that script i Just installed it and it worked right out the door awesome, I have a suggestion if you can add this to the search. I do a ( asterisk -rx "sip show peer 1014-tenant" | grep 'Reg. Contact' every time we bring up a new tenant it returns something like Reg. Contact : sip:1014-tenant@192.168.1.2:5062 which tells us if they have a router that is compatible or that it has SIP ALG turned off this is a very helpful tool right now I dont give any of our employees cli access to run any commands and this would be great information with no security risk.?

I would love to see some of your other Scripts like the one to delete Voicemails.

Thank you for all you work

Armando Muniz

eeman
eeman's picture
Joined: 2007/11/06
Points: 290

deleting voicemail is fairly simple.. i just modified the sample one that comes with the asterisk source code to accept a parameter for sub directory, then I run the script from a 'for' loop indexing the main /var/spool/asterisk/voicemail directory.

Erik Smith
dCAP
Thirdlane/Asterisk Support available
esmith.bgnv@gmail.com

IVSCOMM
IVSCOMM's picture
Joined: 2008/03/18
Points: 0

I have gone to the Link Manager and added it like this.

http://${HOSTADDRESS}/asterisk/show_peers.cgi

Is this right? I suspect not.

I have dropped the two files into the folders you told me and I get errors.

Shawn Wright
IVSComm

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

I the link manager all you need to put is the name of the file IE show_peers.cgi
It already knows the whole directory path of https://ip.add.re.ss/asterisk/ so none of that is needed

IVSCOMM
IVSCOMM's picture
Joined: 2008/03/18
Points: 0

Error - Perl execution failed

Can't locate Time/Duration.pm in @INC (@INC contains: /usr/libexec/webmin /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/libexec/webmin/asterisk/show_peers.cgi line 4.
BEGIN failed--compilation aborted at /usr/libexec/webmin/asterisk/show_peers.cgi line 4.

Shawn Wright
IVSComm

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

Ahhh ok, the problem you are having is my perl script used a module you have no installed yet... You need to install the perl module Time/Duration.pm

IVSCOMM
IVSCOMM's picture
Joined: 2008/03/18
Points: 0

Where do I find Time/Duration.pm?

Shawn Wright
IVSComm

eeman
eeman's picture
Joined: 2007/11/06
Points: 290

From CPAN of course.

Erik Smith
dCAP
Thirdlane/Asterisk Support available
esmith.bgnv@gmail.com

IVSCOMM
IVSCOMM's picture
Joined: 2008/03/18
Points: 0

What was i thinking. Of Course CPAN.
The Canadian Pantomime Association of the North is always a great source of Perl Scripts.

Shawn Wright
IVSComm

brian
brian's picture
Joined: 2009/07/10
Points: 0
Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

We're do I signup for such a fine establishment? O.o

armandomuniz305
armandomuniz305's picture
Joined: 2010/09/24
Points: 0

Hi Jasril

First of all thank you for the great script, but I've been breaking my head NOT Hard to do trying to figure out how do a sip show peer (extension number) with your script I would like to be able to do both sip show peers (extension number) and the latter. this would be very help full to us all. can you help us out?

Jasril
Jasril's picture
Joined: 2010/08/09
Points: 0

It would probably take a while for me to develop the additional function, as I don't have as much free time to put into programming, although I will try to look into adding a "sip show peer xxx-xxxxxxxxxx" feature... It's only not in there now cause I hardly ever found it very useful to tell the truth *shrug* but to each their own...

P.S.

Glad to hear people do like the script though heh