Open Source Training Seminar FreePBX Paid Support

Ticket #973 (closed Module Submissions: fixed)

Opened 2 years ago

Last modified 2 years ago

Blacklist

Reported by: ullbergm Assigned to:
Priority: minor Milestone:
Component: Core Version: 2.1
Keywords: blacklist, astdb Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Here is a quick module i wrote for one of my friends.

It allows you to manage the blacklist in astDB thru the FreePBX web interface.

This is my first module for FreePBX so please let me know if i should have done something differently.

There are two extensions to the 'extension' class that are currently in functions.inc.php but they should probably be implemented in extensions.class.php instead. (I did wrap them in 'class_exists(...)' so if they are implemented in the future it wont break the module.)

I started on implementing a checkbox in the incoming routes that will let you decide whether you want the blacklist to apply to a specific inbound route. I have not completed this since i won't need that feature but if there is any interest i will complete it.

Please give me some feedback on anything i should have done differently.

Attachments

blacklist-1.0.0.tar.gz (2.7 kB) - added by ullbergm on 06/24/06 16:37:39.
blacklist-1.0.1.tar.gz (2.8 kB) - added by ullbergm on 06/24/06 16:44:37.
blacklist-1.0.2.tar.gz (3.0 kB) - added by ullbergm on 06/25/06 12:48:29.
blacklist-1.0.3.tar.gz (4.0 kB) - added by ullbergm on 06/26/06 03:53:12.

Change History

06/24/06 16:37:39 changed by ullbergm

  • attachment blacklist-1.0.0.tar.gz added.

06/24/06 16:44:37 changed by ullbergm

  • attachment blacklist-1.0.1.tar.gz added.

06/24/06 16:45:10 changed by ullbergm

Added missing line in functions.inc.php

06/25/06 12:48:29 changed by ullbergm

  • attachment blacklist-1.0.2.tar.gz added.

06/25/06 12:49:07 changed by ullbergm

Shame on me for not testing it on a fresh install.. fixed functions.inc.php.

Also forgot to mention that i borrowed ext_gosub from the cidlookup module.

06/26/06 03:52:51 changed by ullbergm

Added 3 new features codes:

*30 - Blacklist a number
*31 - Remove a number from the blacklist
*32 - Add the last caller to the blacklist

06/26/06 03:53:12 changed by ullbergm

  • attachment blacklist-1.0.3.tar.gz added.

07/05/06 01:18:42 changed by RobThomas

I've added the cidlookup and phonebook modules to 2.2 -- so you should now have an extensions.class.php that works as standard!

07/05/06 19:02:24 changed by ullbergm

Thanks Rob,

Would you mind adding ext_lookupblacklist and ext_zapateller from my functions.inc.php as well?

Magnus (aka. stupid1 on irc)

07/11/06 08:45:20 changed by blapoint

I found my issue, it looks like the blacklist module is inserting the exten => Goto(app-blacklist-check,s,1) into the wrong area of the ext-did and other modules are taking over the call before it hits that line of code.

I dont think the module is even concidering zap calls because I dont see it call app-blacklist-check in the zaptel context.

One other thing would it be possible to use wildcards when entering number like if I wanted to block all incomming 800 or 888 numbers I could enter it as 800XXXXXXX and 888XXXXXXX?

07/16/06 21:44:04 changed by ullbergm

I found my issue, it looks like the blacklist module is inserting the exten => Goto(app-blacklist-check,s,1) into the wrong area of the ext-did and other modules are taking over the call before it hits that line of code. 

I'll take a look at it and see what i can find out. Which module did you use that took over before it hit the blacklist check?

I dont think the module is even concidering zap calls because I dont see it call app-blacklist-check in the zaptel context. 

I do not have a zap trunk so i forgot all about that. I'll take a look at that as well.

One other thing would it be possible to use wildcards when entering number like if I wanted to block all incomming 800 or 888 numbers I could enter it as 800XXXXXXX and 888XXXXXXX? 

I dont think that LookupBlacklist? supports that, it would have to be a patch to the asterisk source.

07/25/06 19:11:24 changed by mjh001

I am tring to figire out how to install as it is badly needed, is there an easy to folow install proccess somwhere?

07/25/06 20:49:10 changed by mjh001

To RobThomas? can we perhaps have this added to the module publish? Beta as it may be I am certen there are others that need this as well as myself, and dont know how to properly add a module manualy, perhaps it might be nice to add

07/26/06 03:21:11 changed by mjh001

Finaly managed to get it installed, however I am getting the following error below:

Warning: main(modules/blacklist/page.blacklist.php): failed to open stream: No such file or directory in /var/www/html/admin/config.php on line 211

Warning: main(): Failed opening 'modules/blacklist/page.blacklist.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/admin/config.php on line 211

08/08/06 04:45:05 changed by vjason

The module installed without problem but it does not appear to blocking numbers. I am not sure how it should plug into the call plan for Trixbox 1.1?? Any direction would be helpful.

08/09/06 01:41:19 changed by vjason

After watching the asterisk console using asterisk -r I see that the DID I specified is moving time condition ahead the blacklist check. If I specify no DID it work fine. Can this be fixed.

08/18/06 00:51:14 changed by Dan.Creed@thecreeds.net

Ok.. someone help me out here... How do you install this thing?

Thanks, Dan.Creed@thecreeds.net

09/07/06 16:30:03 changed by RobThomas

  • status changed from new to closed.
  • resolution set to fixed.

Thanks, ullbergm - looks like just what the doctor ordered. I'll do a module version bump and remove the checks from function.php before 2.2rc1 is out, but it's now in the 2.2 branch - Thanks!

--Rob

09/07/06 21:24:40 changed by RobThomas

Note, upgraded it to 1.0.4, it was only applying to a nodid/nocid trunk. I think a future expansion would be to have it selectable on or off by trunk. Anyway, there's been a couple of positive responses from people using it on IRC, so it's looking good. Thanks again!

--Rob

09/07/06 21:25:02 changed by RobThomas

Oh, the fix was r2385

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads