TIPS Viva WAZO: A New Beginning

atsak

Guru
Joined
Sep 7, 2009
Messages
2,381
Reaction score
436
FYI I installed this on a Hyper V guest - goes in easily but the initial configuration hangs when I click the Validate button . . . I'll have to dig into the logs to see why it's not completing the config. Network and everything looks normal.
 

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
@atsak we introduced a bug with chrome or safari browser at the end of the wizard. We fixed it, but for the next version. Can you try with Firefox ? I can give you the patch if you prefer.
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,381
Reaction score
436
@atsak we introduced a bug with chrome or safari browser at the end of the wizard. We fixed it, but for the next version. Can you try with Firefox ? I can give you the patch if you prefer.

I have firefox I'll try that tomorrow sometime. Thanks.
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,381
Reaction score
436
@atsak we introduced a bug with chrome or safari browser at the end of the wizard. We fixed it, but for the next version. Can you try with Firefox ? I can give you the patch if you prefer.

OK Firefox was fine. I will hopefully have some time over the next couple weeks to play with it and see if it behaves in Hyper V properly (probably will everything else is always fine in there) and see how it behaves if I replicate and fail it between servers.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
OK Firefox was fine. I will hopefully have some time over the next couple weeks to play with it and see if it behaves in Hyper V properly (probably will everything else is always fine in there) and see how it behaves if I replicate and fail it between servers.

I assume you are aware that XiVO includes High Availability replication and failover as an integral component. Unlike other platforms, it doesn't cost a dime! Complete tutorial here. Very straight-forward to set up.
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
Adding NeoRouter VPN to XiVO

1. If your XiVO server is sitting behind a hardware firewall, map TCP port 32976 to the private IP address of your server.

2. Assuming you are using 64-bit Debian platform, issue the following commands to install NeoRouter client after logging into your server as root:
Code:
cd /root
wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/Linux/Ubuntu/nrclient-2.3.1.4360-free-ubuntu-amd64.deb
dpkg -i nrclient-2.3.1.4360-free-ubuntu-amd64.deb
For the 32-bit client, use this link:
Code:
wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/Linux/Ubuntu/nrclient-2.3.1.4360-free-ubuntu-i386.deb
3. To log in to the NeoRouter client:
Code:
nrclientcmd
4. To find the VPN address of NeoRouter:
Code:
ifconfig
# check for nrtap IP address
5. XiVO server will show up in your list of NeoRouter clients as localhost unless you've changed /etc/hostname and rebooted your server BEFORE you register your client in step #3

Old NeoRouter tutorial on Nerd Vittles here.

For those using ImpactVPS:
You need to ask support to add tun/tap if you want NeoRouter. [Just specify IP address of your server(s).] And you will also need to edit /usr/local/ZebraNetworkSystems/NeoRouter\Feature.ini and add
[Default]
NicInterfaceName="venet0:"
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
I Have A Dream...

Ci-ZirLXEAABxWZ.jpg


Ci-YWKIWgAAWEcu.jpg


Ci-al_wWkAAjwxU.jpg
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
Perhaps @Sylvain Boily can explain how we push the CALLERID(name) into the XiVO call log once we have obtained the information. Looks like the call log entry is being written before the DID subroutine is executed.
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,381
Reaction score
436
I assume you are aware that XiVO includes High Availability replication and failover as an integral component. Unlike other platforms, it doesn't cost a dime! Complete tutorial here. Very straight-forward to set up.

Yes, I am; and you're right it's excellent. Hyper V is the hypervisor I use everywhere as you know; it's been good to me over the years and much cheaper than VMWare for enterprise deployments (which is also an excellent product but in my case is a waste of money). I just wanted to see this working there since it's what I use everywhere. There's a couple things I find a little counter intuitive compared to our other friends who write a GUI front end, and one that is tricky is the lack of support for failover on carriers for outbound. Admittedly that doesnt' work well in FPBX anyway but it's sometimes quite useful for the 5 minutes someone has an outage here and there.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
Happy Preakness: CallerID Superfecta Rides Again with XiVO

Still a lot of work to do, but I think we're ready for a few pioneers now that we have four sources working. Four = Superfecta for you racetrack fans!

This original release supports AsteriDex (if you've migrated your database to SQLite3 as documented in the Nerd Vittles tutorial), OpenCNAM (with or without credentials), BulkCNAM (with an API key), and TelcoData (city, state, and type of telco of the caller).

Installation is easy. Log into your server as root and issue the following commands:
Code:
cd /
apt-get -y install php5-xmlrpc
wget http://incrediblepbx.com/cid-superfecta.tar.gz
tar zxvf cid-superfecta.tar.gz
rm -f cid-superfecta.tar.gz
/etc/init.d/asterisk restart

If you plan to use either OpenCNAM (in commercial mode) or BulkCNAM (which requires registration), then you'll need to sign up on their sites and obtain your credentials. Once you have them, edit /var/lib/asterisk/agi-bin/nv-cid-superfecta.php and plug them in.

CallerID Superfecta on XiVO works differently. I've attempted to streamline the method for adding new sources so that others can join the party easily. All of the providers are stored in a single file: /var/lib/asterisk/agi-bin/nv-cid-superfecta.php.

HINT: We could use some help. To add new ones, there are two steps:

1. Add the provider to the array in line 140. It currently looks like this:
Code:
$source=array("AsteriDex","OpenCNAM","BulkCNAM","TelcoData");

2. Add the chunk of code to handle the CNAM lookup for the provider after the existing sources. Here's a sample of the OpenCNAM code to give you some hints:
Code:
   case "OpenCNAM":
    $query = "https://api.opencnam.com/v2/phone/" . $thenumber . "?account_sid=".$SID."&auth_token=".$TOKEN."&format=pbx";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $query);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36');
    $cidname = chr(34).curl_exec($ch).chr(34);
    curl_close($ch);
    if ($debug) :
     fputs($stdlog, "\nOpenCNAM CallerID Name result: " . $cidname . "\n\n" );
    endif ;
    if (strpos($cidname,"WIRELESS") !== false) :
     $cidname="";
    endif ;
    if (strpos($cidname,"OPENCNAM") !== false) :
     $cidname="";
    endif ;
    if (strpos($cidname,"PAYMNT REQUIRED") !== false) :
     $cidname="";
    endif ;
    break ;

3. If the provider requires credentials, add the variables at the top of the file. The default credentials setup looks like this:
Code:
// insert your OpenCNAM account_sid and auth_token credentials below to use commercial CNAM lookups
$SID="";
$TOKEN="";
// insert your BulkCNAM API key below to use commercial CNAM lookups
$BULKCNAM_APIKEY="";
//

Please share your additions with us so that we can keep some consistency in the array numbering scheme. Here's why.

The dialplan code for CallerID Superfecta can be found in /etc/asterisk/extensions_extra.d/cid-superfecta.conf. It can be edited within the XiVO GUI: IPX Configuration -> Configuration files and choose cid-superfecta.conf.

The important line is line #9 which currently looks like this:
Code:
same = n,AGI(nv-cid-superfecta.php,${XIVO_SRCNUM},0-1-2-3)

We store CNAM providers in an array (numbered 0-3 currently because there are 4 providers). You specify the sources to use and the order in which to find a CNAM match by adjusting the entry order and choice of content providers. It currently shows 0-1-2-3. That setup tells CallerID Superfecta to search for a matching CNAM entry in the following order and to quit once a CNAM match is found for the CallerID number. The order is...

0 - AsteriDex
1 - OpenCNAM
2 - BulkCNAM
3 - TelcoData

If you only wanted to use BulkCNAM and TelcoData, then the string would be 2-3. OpenCNAM will use its free CNAM cache if you don't plug your credentials into the Superfecta PHP file. BulkCNAM doesn't have a free tier but they do give you a little money to try out the service. If a query comes up empty or says "Cellular Number" or "Payment Required", we strip those out and return CALLERID(name) to blank unless you include TelCo data which grabs the type of phone provider and the city and state of the calling number. Commercial CNAM lookups cost about a half a cent per lookup.

In case you missed it...

 
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
If you want CallerID CNAM info to appear in CDR records, one possible solution is to turn on Asterisk CDR reporting and use a SQLite3 database for the CDR records. This will populate /var/log/asterisk/master.db with the call records. You can extract them like this:
Code:
sqlite3 /var/log/asterisk/master.db "select * from cdr"

To get this working, do the following:
Code:
cd /etc/asterisk
sed -i 's|no|yes|' cdr.conf
echo "[master]" >  cdr_sqlite3_custom.conf
echo "table = cdr" >>  cdr_sqlite3_custom.conf
echo "columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield"  >>  cdr_sqlite3_custom.conf
echo "values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}', '${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration)}', '${CDR(billsec)}','${CDR(disposition)}','${CDR(amaflags)}', '${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}'" >>  cdr_sqlite3_custom.conf
chown asterisk:www-data cdr_sqlite3_custom.conf
chmod 660 cdr_sqlite3_custom.conf
sed -i 's|noload => app_cdr.so|;noload => app_cdr.so|' modules.conf
sed -i 's|noload => cdr_sqlite3_custom.so|;noload => cdr_sqlite3_custom.so|' modules.conf
sed -i 's|noload => func_cdr.so|;noload => func_cdr.so.so|' modules.conf
/etc/init.d/asterisk restart

If you also want to turn on CSV logging, issue the following command as well:
Code:
cd /etc/asterisk
echo "[csv]" >> cdr.conf
echo "loguniqueid=yes" >> cdr.conf
echo "loguserfield=yes" >> cdr.conf
echo "accountlogs=yes" >> cdr.conf
sed -i 's|noload => cdr_csv.so|;noload => cdr_csv.so|' modules.conf
/etc/init.d/asterisk restart

This will populate /var/log/asterisk/cdr-csv/Master.csv with your CDR records in the following order:

<accountcode>,<src>,<dst>,<dcontext>,<clid>,<channel>,<dstchannel>,<lastapp>, \
<lastadata>,<start>,<answer>,<end>,<duration>,<billsec>,<disposition>, \
<amaflags>,<uniqueid>,<userfield>
 
Last edited:

KUMARULLAL

Guru
Joined
Feb 20, 2008
Messages
243
Reaction score
28
I salute ward on relentlessly working on xivo to make everyone's life much easier by integrating many applications with xivo. The only downside I see is that xivo does not have any gui for building ivrs. To build complex, nested ivr system, everything has to be though about in great detail writing contexts and dialplans to suite your unique requirement. It would be nice if xivo offers gui for building ivrs.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
I salute ward on relentlessly working on xivo to make everyone's life much easier by integrating many applications with xivo. The only downside I see is that xivo does not have any gui for building ivrs. To build complex, nested ivr system, everything has to be though about in great detail writing contexts and dialplans to suite your unique requirement. It would be nice if xivo offers gui for building ivrs.

Give us a little time. :chef:
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
AsteriDex for XiVO

For those with the pioneering spirit, I think we're ready for you.

CjKW8pPXAAAuZF3.jpg


Prerequisites. You must have the SQLite3 application installed from previous tutorials. You must have the IVR component installed in order to get the asteridex.sqlite database installed in /var/lib/asterisk/agi-bin. You need an outbound trunk configured for either NXXNXXXXXX or 1NXXNXXXXXX outbound calling. In other works, complete the first 3 Nerd Vittles tutorials before you begin.

Installing the Software. Log into your server as root and issue the following commands:
Code:
cd /
wget http://incrediblepbx.com/asteridex4-xivo.tar.gz
tar zxvf asteridex4-xivo.tar.gz
rm -f asteridex4-xivo.tar.gz
/etc/init.d/asterisk restart
/etc/init.d/nginx restart

Configuring the Software. Before AsteriDex is usable for click-to-dial calling, you'll need to edit /var/www/html/asteridex4/config.inc.php and insert the extension and line to be used for outbound calls from the web interface. The default extension is 701. Look up the Line # associated with this user and plug it into the settings: $defaultLine="8zqnfdpw";

Using the Software. The AsteriDex database is a SQLite3 database stored in /var/lib/asterisk/agi-bin. There's also a copy of the original Asteridex database stored there as well (in case you [or we] screw things up). To access AsteriDex, point your web browser to http://XiVO-ipaddress/asteridex4 from a location that is already in the Travelin' Man 3 WhiteList.

This version supports Voice Dialing by Name. Just dial 411 and say the name of the company or person you wish to call. AsteriDex will attempt to find them in the SQLite3 database and connect the call after first calling you on the line set up above in the configuration step.

AsteriDex is pure GPL code. Enjoy!
 
Last edited:

Sylvain Boily

Active Member
Joined
Apr 30, 2016
Messages
259
Reaction score
144
@wardmundy do you have a repository like github with all of your addons ? It will be fun to hack asteridex to use our contact server directly. Do you know our API about dird ? api.xivo.io section xivo-dird. It's possible to write a module to support sqlite3 as a backend for contacts too.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,170
Reaction score
5,199
Sorry, no GitHub repo for all of this. Just download the tarballs from incrediblepbx.com. Still laying track in front of the steaming locomotive, but we'll take a look at dird once we catch our breath. :driving:
 

Members online

Forum statistics

Threads
25,782
Messages
167,512
Members
19,203
Latest member
frapu
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