TIPS Incredible for VitalPBX

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
@krzykat: Sonata components already are available on the VitalPBX add-on menu.

Yes - but to my surprise they also have it for FreePBX. With everything you've put together and the ability to hack in pieces of code to the VitalPBX ecosystem, I would think the only thing holding me back is the ability to create our own modules (widgets) for Sonata Suite. CDR, Fax, and SMS - and it would be perfect.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Is there a way to add google contacts CallerID Superfecta as a cid source?
The majority of the calls I get are from people already in my contacts. On ipbx-13 I use google contacts as the first choice.

I've taken a look at Google Contacts and, frankly, it's a royal mess. In addition to phone numbers appearing in at least a half dozen different fields, they also are stored in all sorts of formats. Pretty obvious that the Google developers had little interest in designing this for anything other than visual observation:
Code:
(404) 123-4567
4041234567
404-123-4567
404.123.4567
1 4041234567
+14041234567
Writing code to sift through all of this mess would be a nightmare that I really don't have the resources to tackle. What I have done is develop some code that would let you extract most of your primary entries from Google .csv exports. Then you could import those into the Asterisk Phonebook stored in AstDB. We had about 2,000 entries in our export, and it took about an hour of manual editing to clean up just the first export below after running through the commands below. Lots of line deletes for irrelevant or missing data, but they're easy to spot.
Code:
# Here are the four main places to find phone numbers in the Google .csv export
# You would apply the rules below to each of these four files
# And then manually edit each of the files
cut -d , -f 1,42 contacts.csv > contacts2.csv
cut -d , -f 1,44 contacts.csv > contacts3.csv
cut -d , -f 1,46 contacts.csv > contacts4.csv
cut -d , -f 1,48 contacts.csv > contacts5.csv

# Here's the cleanup as it is applied to the first export above only
# So you'd need to do this four times to get four separate scripts for import
sed -i 's|) ||g' contacts2.csv
sed -i 's|(||g' contacts2.csv
sed -i 's|-||g' contacts2.csv
awk ' FS="," { print "cidname " $2 "," $1 } ' contacts2.csv > contacts1.csv
sed -i 's|,| "|' contacts1.csv
sed -i 's|$|"|' contacts1.csv
sed -i "s|cidname|asterisk -rx 'database put cidname|" contacts1.csv
sed -i "s|$|'|" contacts1.csv
mv contacts1.csv import-google-contacts.sh
chmod +x import-google-contacts.sh
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@piaftnt: Looks like there's an easier and more reliable way with Google Contacts using a vcard export. Stay tuned...

UPDATE: Here's the new procedure to import your Google Contacts into the Asterisk Phonebook for use with CallerID Superfecta for VitalPBX.

1. From within Google Contacts, export your contacts into a vcard format file: contacts.vcf
2. Copy the contacts.vcf file to the /root folder of your PBX
3. Download the attached tarball and copy it to the /root folder of your PBX
4. Untar the scripts: tar zxvf googlecontacts-importer.tar.gz
5. Run the main script: /root/vcard-import.sh
6. Edit the shell script that is generated: nano -w import-google-contacts.sh
7. Make any changes to clean up the entries from Google Contacts (about a 2 minute process with 2,000+ entries for me)
8. Run the script to import your Google Contacts into Asterisk Phonebook: /root/import-google-contacts.sh
 

Attachments

  • googlecontacts-importer.tar.gz
    12.7 KB · Views: 5
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
The existing superfecta module code can't be subsumed? Never used it, but I assume it works?

It's ensnarled in module-specific code and MySQL that's pretty much proprietary to FreePBX. While it's open source code, it could be a monster project to recreate it in the VitalPBX GUI, but I've passed it along to the developers to have a look.
 

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
What are people's opinions on VitalPBX terms of service and software licensing scheme? It's not open source after all with no access to the source code.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@kenn10: I misspoke on the proper way to route multiple DIDs to different destinations with CallerID Superfecta. Here is the correct methodology which I will add to next week's article:

The following lines demonstrate how to redirect incoming calls to five different destinations: an extension, an external phone number, another custom context, a DID-specific routing, or the Incredible PBX Demo IVR. As shown, the calls would be routed to the default Demo IVR unless the DID matches 8436060555 in which case the call would be routed to extension 701. You can modify the destination scenario simply by uncommenting a different line in the dialplan examples. Keep in mind that a Goto command permanently redirects calls to that destination outside the Custom Context so the first uncommented Goto line will always take precedence. Also note that you can have multiple ExecIf lines preceding a Goto line to route calls to different destinations depending upon the DID of the incoming call. Stated another way, multiple ExecIf commands can be followed by a Goto command that serves as the default destination for any non-matching DIDs.
Code:
; same => n,Goto(cos-all,701,1)
; same => n,Goto(cos-all-trunk,8436060555,1)
; same => n,Goto(newcontext,s,1)
  same => n,ExecIf($["${DID}" = "8436060555"]?Goto(cos-all,701,1))
  same => n,Goto(incrediblepbx,s,1)
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
What are people's opinions on VitalPBX terms of service and software licensing scheme? It's not open source after all with no access to the source code.

My recollection is that VitalPBX (and Ombutel before them) chose the closed-source, freeware model as a safety precaution back in the days when legal threats were reportedly driving some companies out of the open source VoIP business. They also want to protect their commercial modules which provide the revenue to keep them afloat. Were there specific terms of service that you believe are problematic??
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
SMS Messaging with BulkVS DIDs

We now have successfully tested sending SMS messages to a BulkVS DID. Inbound SMS Messages are $.004 each up to SMS message size.
The following instructions assume you already have outbound email working on your server. See Nerd Vittles tutorials for help and testing.

On the BulkVS site,

1. Click the SMS tab for your account and enable SMS messaging.
2. Enable/Disable SMS messaging for each of your DIDs as desired under Inbound:DID-Manage
3. Under the SMS tab, choose SMS Provisioning URL and enter: http://VitalPBX-FQDN/sms/index.php

On your VitalPBX server in the VitalPBX CLI as admin,

Whitelist the VitalPBX SMS servers in Admin:Security:Firewall:Whitelist (199.255.157.195 and 69.12.88.195)

On your VitalPBX server in the Linux CLI as root,

Code:
cd /usr/share/ombutel/www
mkdir sms
cd sms
nano -w index.php

Then enter the following in the index.php document:

Code:
<?php
$mailto = "see-next-section-for-options";

$from = htmlspecialchars($_GET["from"]);
$to = htmlspecialchars($_GET["to"]);
$message = htmlspecialchars($_GET["message"]);

$subject = "SMS from $from to $to";

mail($mailto,$subject,$message);

echo "OK";

?>

For your $mailto entry, it can be either a traditional email address OR it can be the email address to send an SMS message to your cellphone.

For the cellphone mail servers, here's the syntax for the major U.S. carriers (see next message for Canada):

Verify that the SMS messages are flowing properly:

1. Check your SPAM folder if you don't receive the SMS messages in your email
2. Check the Apache log to verify that the SMS messages actually are being delivered: tail /var/log/httpd/access_log
3. We actually had one DID where the calls worked fine but the SMS messages were being delivered elsewhere. We turned off SMS on this DID.
 
Last edited:

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
For the cellphone mail servers, here's the syntax for the major carriers:
In Canada:
Rogers Wireless: [10-digit phone number]@pcs.rogers.com
Fido: [10-digit phone number]@fido.ca
Telus: [10-digit phone number]@msg.telus.com
Bell Mobility: [10-digit phone number]@txt.bell.ca
Kudo Mobile: [10-digit phone number]@msg.koodomobile.com
MTS: [10-digit phone number]@text.mtsmobility.com
President’s Choice: [10-digit phone number]@txt.bell.ca
Sasktel: [10-digit phone number]@sms.sasktel.com
Solo: [10-digit phone number]@txt.bell.ca
Virgin: [10-digit phone number]@vmobile.ca
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Thanks, @tbrummell. We actually left a step out of the secret sauce. It now has been added together with the verification procedure.

Whitelist the VitalPBX SMS servers in Admin:Security:Firewall:Whitelist (199.255.157.195 and 69.12.88.195)

Verify that the SMS messages are flowing properly:

1. Check your SPAM folder if you don't receive the SMS messages in your email
2. Check the Apache log to verify that the SMS messages actually are being delivered: tail /var/log/httpd/access_log
3. We actually had one DID where the calls worked fine but the SMS messages were being delivered elsewhere. We turned off SMS on this DID.
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Per the email I got yesterday from Bulkvs.com, their CNAM charges have dropped.

CNAM (Caller ID Name)
$0.002
per query

Got the same email, but I'm still being billed at the $.005 rate plus daily rounding up. So... check your bill.
Code:
2019-11-01 23:59:59    Charged $0.04 for 7 CNAM Queries

UPDATE: Opened a ticket and got this response:
Code:
We have updated your rate to $0.002.
 
Last edited:

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
My recollection is that VitalPBX (and Ombutel before them) chose the closed-source, freeware model as a safety precaution back in the days when legal threats were reportedly driving some companies out of the open source VoIP business. They also want to protect their commercial modules which provide the revenue to keep them afloat. Were there specific terms of service that you believe are problematic??

Right now they say it's ok for commercial use but those things can change over time.
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Right now they say it's ok for commercial use but those things can change over time.

Pretty hard to unring a bell legally. Once you have a license, it cannot be changed so long as you adhere to its terms as given.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
The VitalPBX business model is pretty clear. Their revenue stream is from commercial add-on's. Banning commercial use would be like shooting themselves in the foot. The fact that they just opened up Custom Contexts for all of us and kissed the $50 fee goodbye tells me their heart's in the right place. :Angel anim:
 

markieb

Active Member
Joined
Feb 19, 2009
Messages
165
Reaction score
51
The VitalPBX business model is pretty clear. Their revenue stream is from commercial add-on's. Banning commercial use would be like shooting themselves in the foot. The fact that they just opened up Custom Contexts for all of us and kissed the $50 fee goodbye tells me their heart's in the right place. :Angel anim:
That's why I really want to be able to move over to VitalPBX, even though it's going to be an enormous manual migration job for me of several hundred extensions and trunks etc.
I'm more than happy to even pay for their full commercial package if they can somehow give us the Superfecta functionality I need for outbound calls and the modules I use in Superfecta.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
That's why I really want to be able to move over to VitalPBX, even though it's going to be an enormous manual migration job for me of several hundred extensions and trunks etc.
I'm more than happy to even pay for their full commercial package if they can somehow give us the Superfecta functionality I need for outbound calls and the modules I use in Superfecta.

Take a look at the new Nerd Vittles article on Monday. I think it provides most of the Superfecta functionality you're looking for.
 

hawk#1

Well-Known Member
Joined
Nov 3, 2015
Messages
716
Reaction score
309
@wardmundy

Looks like you have had a busy week here and now I need to get caught up. Last weekends storms tore things up here in Tn. Last night they still had crews local and out of state working to restore power, less than a mile away. Fortunately because of your hard work, I had pbx set up at hosted simply. No down time there. Thanks for your time, knowledge, and help. It is really appreciated. I'll try to get callerid set up on vital pbx as soon as possible.
 

Members online

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
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