Page 1 of 1

Vtiger javascript:VICIDIALcall function

PostPosted: Mon Nov 28, 2011 12:32 pm
by ciacho
Hello,

Code: Select all
ViciBox Redux v.3.1.13 32bit with astguiclient svn trunk install:
VERSION: 2.4-338c       
BUILD: 111114-0039



I was installed vicibox & made ​​the integration with vtiger 5.1.0 (with: Vtiger510_vicidial_002_noclose.patch), but when I try to click on phone number: VCcall XXXXXXXXX - no action is taken (no errors, popups, etc...)

Apache logs /var/log/apache2/error_log:

Code: Select all
[Mon Nov 28 17:54:34 2011] [error] [client XX.XXX.XXX.XXX] PHP Warning:  file(http://xx.xxx.xxx.xxx/agc/api.php?source=vtiger&user=1000&pass=1234&agent_user=6666&function=external_dial&value=XXXXXXXXX&phone_code=XX&search=YES&preview=NO&focus=YES&vendor_id=2): failed to open stream: Connection refused in /srv/www/htdocs/vtigercrm/vtigerservice.php on line 95, referer: http://XX.XXX.XXX.XXX/vtigercrm/index.php?module=Leads&action=index&parenttab=Sales


If I try to do this manually:
Code: Select all
http://XX.XXX.XXX.XXX/agc/api.php?source=vtiger&user=1000&pass=1234&agent_user=6666&function=external_dial&value=XXXXXXXXX&phone_code=XX&search=YES&preview=NO&focus=YES&vendor_id=2


The call is placed:
Code: Select all
SUCCESS: external_dial function set - XXXXXXXXX|6666|1|YES|NO|YES|2|1322500567||||


Vicibox server is installed on the local network (192.168.xx). On the router is enabled DMZ to the internal IP address of the server.

I am connecting with server via an external IP address of the router (i'm out of localnet).
What could be the cause of inability to make a call directly from Vtiger?

PostPosted: Tue Nov 29, 2011 6:21 am
by ciacho
Global variable SERVER_NAME is not set:

Code: Select all
print_r($_SERVER['SERVER_NAME']);
PHP Notice:  Undefined index: SERVER_NAME


Solution
In file:
Code: Select all
/srv/www/htdocs/vtigercrm/vtigerservice.php


search:
Code: Select all
$server_name = getenv("SERVER_NAME");


& replace:
Code: Select all
$server_name = 'XX.XXX.XXX.XXX';


XX.XXX.XXX.XXX -server ip address

PostPosted: Tue Nov 29, 2011 8:59 pm
by williamconley
Excellent job! And great postback! Impressed I am. 8-)