I have given up on using the popups in vtiger. I have found a system I like much better and am passing it on. It is others work but it seems to work well and is much easier than fighting vtigers system. Biggest draw back it is only for windows.
First get and install the latest ADAT on your windows machine.
Links hidden for unregistered users. Login or register Here
Configure it to your elastix settings and allow connections from your windows machine in /etc/asterisk/manager.conf. Start ADAT and calls should give popups. You can also setup an action when you click the popup.
To setup the action use this script I found here.
Links hidden for unregistered users. Login or register Here| Code: |
http://forums.vtiger.com/viewtopic.php?f=96&t=24338
|
Why can't this forum handle this url properly?? Cut and past the url. Thanks goes to the op on this one. Saved me a few hours trying to figure it out.
| Code: |
<?php
require_once('config.php');
require_once('include/utils/utils.php');
require_once('include/language/en_us.lang.php');
global $adb;
$callerid = $_GET['callerid'];
$calleridname33 = $_GET['calleridname33'];
$sql1 = "SELECT * FROM `vtiger_account` WHERE (`phone` LIKE '%$callerid%' OR `otherphone` LIKE '%$callerid%' OR `fax` LIKE '%$callerid%')";
$sql2 = "SELECT * FROM `vtiger_contactdetails` WHERE (`phone` LIKE '%$callerid%' OR `mobile` LIKE '%$callerid%' OR `fax` LIKE '%$callerid%')";
$sql3 = "SELECT * FROM `vtiger_leadaddress` WHERE (`phone` LIKE '%$callerid%' OR `mobile` LIKE '%$callerid%' OR `fax` LIKE '%$callerid%')";
$result1 = $adb->pquery($sql1, array());
$result2 = $adb->pquery($sql2, array());
$result3 = $adb->pquery($sql3, array());
if($adb->num_rows($result1)>0 || $adb->num_rows($result2)>0 || $adb->num_rows($result3)>0){
header("Location: index.php?module=Home&action=UnifiedSearch&query_string=$callerid");
}else{
header("Location: index.php?module=Leads&action=EditView&return_action=DetailView&parenttab=Sales&phone=$callerid&company=$calleridname33");
}
?>
|
Name it Phonepopup.php and place it in /var/www/html/vtigercrm and
| Code: |
chown asterisk:asterisk /var/www/html/vtigercrm/Phonepopup.php
|
it. Now go to the settings for ADAT Account > Events.
Click on incoming call and put in
| Code: |
https://elastix/vtigercrm/Phonepopup.php?callerid=%%oa%%&&calleridname33=%%oa_name%%
|
Now clicking the popup will bring up a vtiger search page for the cid or a new lead entry withe the name and number filled in. It should be easy to change to new contact if that is what you wanted.
Don