TIPS Viva WAZO: A New Beginning

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
This is an Announcement thread. Bug posts are fine but open Help threads for personal assistance. Thanks.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Implementing a FreePBX-compatible Blacklist with XiVO

CSz02xSVAAEH09f.jpg


We wanted to provide a simple way to migrate the existing Blacklist methodology to XiVO using the Asterisk database to store the entries. This will also facilitate importing of the weekly FCC Spammers List.

To install the Blacklist components, download the latest Incredible PBX dialplan:
Code:
cd /etc/asterisk/extensions_extra.d
wget http://incrediblepbx.com/configfiles.tar.gz
tar zxvf configfiles.tar.gz
rm -f configfiles.tar.gz
/etc/init.d/asterisk restart

Numbers can be added and removed from the Blacklist by phone or by using commands on the Asterisk CLI.

Managing the Blacklist by Phone is supported with the following extensions:
  • *30 - Add a number to the Blacklist
  • *31 - Remove a number from the Blacklist
  • *32 - Blacklist the last Caller

Add Numbers to the Blacklist using the Asterisk CLI with the following syntax:
Code:
database put blacklist 9999999999 1

To Block Anonymous and Restricted Calls:
Code:
database put blacklist Anonymous 1
database put blacklist anonymous 1
database put blacklist Restricted 1

To Remove a Number from the Blacklist:
Code:
database deltree blacklist 9999999999

To Review Existing Blacklist Entries:
Code:
database show blacklist

UPDATE: There's now a CallerID WhiteList feature that lets you protect numbers from the FCC BlackList. Here's a link to the tutorial to implement it.

The existing Nerd Vittles scripts can be used to Import the FCC Blacklist weekly. FCC entries in the blacklist have a value of FCC instead of 1 so that they can be easily replaced each week without affecting your personal blacklist entries.
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
For those that are interested, the new Blacklist feature is an excellent opportunity to compare the simplicity of XiVO with "the other alternative."

In XiVO, the entire Blacklist methodology is implemented with 3 lines of code:
Code:
same = n,GotoIf($[${LEN(${DB(blacklist/${XIVO_SRCNUM})}))} > 1]?byebye)
same = n(byebye),Answer
same = n,Congestion

For the alternate method, explore the code in /var/www/html/admin/modules/blacklist and then review all of the contexts beginning with "blacklist" in /etc/asterisk/extensions_additional.conf.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
For those that are interested, the new Blacklist feature is an excellent opportunity to compare the simplicity of XiVO with "the other alternative."

In XiVO, the entire Blacklist methodology is implemented with 3 lines of code:
Code:
same = n,GotoIf($[${LEN(${DB(blacklist/${XIVO_SRCNUM})}))} > 1]?byebye)
same = n(byebye),Answer
same = n,Congestion

For the alternate method, explore the code in /var/www/html/admin/modules/blacklist and then review all of the contexts beginning with "blacklist" in /etc/asterisk/extensions_additional.conf.
Not a fair comparison. Apples and Oranges. Hardcoded vs GUI config. Most of extensions_additional.conf is for functionality not yet implemented for Xivo.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Not a fair comparison. Apples and Oranges. Hardcoded vs GUI config. Most of extensions_additional.conf is for functionality not yet implemented for Xivo.

You are correct. There will be some dialplan code to support adding blacklist entries by phone, but I suspect it won't be anything as complex as what you see in extensions_additional.conf. As for GUI vs. command line implementation, that is kinda the point. And, once we get a little more skilled in the XiVO way of doing things, the template to implement blacklist entries in the GUI is fairly straight-forward. Of course, there's nothing really hard about skipping the GUI with:

database put blacklist 9999999999 spammer
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Sorry did not find them until now. The bugs was happened in yours tutorial. I did fix it but manual. Was not a major problem:

This part from yours tutorial does not work at cloud at cost: 2 cpu and 1 gb ram location 3 at cloudatcost!!!!
cd /root
# base XiVO install
wget http://mirror.xivo.io/fai/xivo-migration/xivo_install_current.sh
bash xivo_install_current.sh
# automated XiVO web configurator
wget http://incrediblepbx.com/wizard.py
chmod +x wizard.py
hostname `hostname -s`
./wizard.py "your-new-web-password"
# Travelin' Man 3 IPtables WhiteList Firewall
apt-get-y install dnsutils
echo "*/10 5-22 * * * root /root/ipchecker > /dev/null 2>&1">>/etc/crontab
wget http://incrediblepbx.com/firewall-xivo.tar.gz
tar zxvf firewall-xivo.tar.gz
rm -f firewall-xivo.tar.gz
./tm3-xivo.sh

I'm guessing this is the same issue we saw today at Digital Ocean. Follow the Digital Ocean tutorial and see if that doesn't work. I will test as well. Thanks.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
You are correct. There will be some dialplan code to support adding blacklist entries by phone, but I suspect it won't be anything as complex as what you see in extensions_additional.conf. As for GUI vs. command line implementation, that is kinda the point. And, once we get a little more skilled in the XiVO way of doing things, the template to implement blacklist entries in the GUI is fairly straight-forward. Of course, there's nothing really hard about skipping the GUI with:

database put blacklist 9999999999 spammer
I don't see anything particularly complex or overdone in the FreePBX blacklist dialplan entries. As with anything, there are choices I might make differently, but I'd be surprised if the same functionality can be achieved with any meaningful reduction in code.

If foregoing the GUI and hard coding, essentially the same lines could be added to [from-pstn-custom] in FreePBX. I just don't see any real advantage for this example.

Don't get me wrong, a lot of FreePBX is over-engineered and often builds a mansion when a doghouse will do, but in this instance seems pretty modest.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@arztde Just follow the examples in the tutorial. You cannot use localhost and leave the domain empty. As for the DID settings, what you're entering is the range of numbers that your Incoming DIDs will use to connect to XiVO. Some providers in U.S. use 10-digits and others 11. You have to match the range of numbers with the correct number of digits. For example 12010000000 has 11 digits while 2010000000 has 10. If you have DIDs with different numbers of digits, then you add another range for each group. In your country, the range of digits will be different and the length of the numbers probably will as well.
 
Last edited:

henry

Member
Joined
Apr 2, 2014
Messages
99
Reaction score
30
How did you do to get this error?
I have installed XiVO about half a dozen times on C@C...
And this is the error I was getting every time after pressing Validate (for the first time!) during the initial browser phase setup
  • POST /wizard - Operation timed out after 90001 milliseconds with 0 bytes received
If I press Validate again, I get more elaborate error messages.
If I just reboot, I get to the login screen (where I should have been without rebooting)...
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@henry The problem is that C@C is dog slow just like the alert says. After several tries, you usually get a slice of the pie.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
The range of numbers is for your DIDs, not your callers' CallerID numbers. I've bolded it in my post above which covered it as well. And, no, you cannot have a single range of numbers where the two numbers are different lengths. You have to specify separate ranges where BOTH numbers are the same length and then indicate what the length is. Also covered above. Now we're into personal help, and I don't want to fill up the announcement thread with these discussions. Please OPEN A NEW THREAD IF YOU HAVE QUESTIONS.
 
Last edited:

bkryatt

New Member
Joined
Apr 20, 2011
Messages
9
Reaction score
0
Hi @wardmundy,

First, Thank you for all of your tutorials....they have been excellent tools for a noobie like me....I have a few Elastix boxes that I'm thinking of changing over to Xivo. I plan on testing them on a c@c and vmware instance this evening. My question/request is whether there is a module that would allow an intercom/door buzzer option in Xivo, and will I need an FXO card for this option? Any help in this would be welcomed.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
A door intercom is just another phone. There are SIP models available.
 

bkryatt

New Member
Joined
Apr 20, 2011
Messages
9
Reaction score
0
A door intercom is just another phone. There are SIP models available.
Thanks, is there anything I need to do within xivo to get it working, also would the SIP models eliminate the need for an fxo card?
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Please start a new thread or review the numerous threads on door phones. Thanks.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Blacklist Module is Complete. You now can dial *30 to blacklist a number, *31 to remove a number from the blacklist, and *32 to blacklist the last caller. To get the latest and greatest dialplan code, issue the following commands:
Code:
cd /etc/asterisk/extensions_extra.d
wget http://incrediblepbx.com/configfiles.tar.gz
tar zxvf configfiles.tar.gz
rm -f configfiles.tar.gz
/etc/init.d/asterisk restart

The original Blacklist Tutorial for XiVO has been updated.
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top