This demo uses environment variables set in the file .htaccess
found in the src/ directory, that needs to be defined for your use case
SetEnv CALLR_LOGIN <your callr login>
SetEnv CALLR_PASS <your callr password>
SetEnv CALLR_TARGET <target number>
SetEnv APP_ID <app id>
- CALLR_LOGIN is the login you use to access CALLR services
- CALLR_PASS is the password you use to access CALLR services
- CALLR_TARGET is the target telephone number to forward client calls to, when they submit the web form
- APP_ID (optional) is the ID of a predefined click2call application, that will be reused for each client call, otherwise a new one will be
created and stored as in the file
click2call.appid
A typical .htaccess
for Bob Smith, with a telephone number of '+336123456789' and a predefined click to call application would look like the following:
SetEnv CALLR_LOGIN bobsmith
SetEnv CALLR_PASS mySecr3tp@ssw0rd
SetEnv CALLR_TARGET +336123456789
SetEnv APP_ID H45HC0D3
if no predefined click to call application is being used, please leave APP_ID
blank, or remove the line completely.
Docker is available for download on their website https://www.docker.com/
On Windows make sure you install Docker toolbox, or Docker for Windows (Requires Microsoft Windows 10 Professional or Enterprise 64-bit)
and use the Kitematic
application to manage your containers and view their logs and output (installed by default)
On Windows and Mac the docker-compose utility is installed automatically with docker-toolbox
For other users, follow the instructions on the official Docker website here
-
Before running the
docker-compose up c2cwebdemo
command, please modify the .htaccess file found in the src directory. -
If using MacOS / Windows launch the
Docker quickstart terminal
, and use the provided console to run this demo. -
After installing
Docker
anddocker-compose
, run the following command in the same directory as Dockerfile,$ docker-compose up
you will see output similar to the following:
Building c2cwebdemo Step 1 : FROM php:5.6-apache ---> 7374b3b98172 Step 2 : RUN apt-get update && apt-get install -y zip && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ---> Using cache ---> 82c0a0de5ff7 Step 3 : COPY src/ /var/www/html/ ---> a5dd2bea4c5c Removing intermediate container 5ecde79f4420 Step 4 : COPY composer.json /var/www ---> 52d9fe05d3c7 Removing intermediate container ab5d4eae9847 ... [Thu Jul 01 01:15:00.301234 2016] [mpm_prefork:notice] [pid 10] AH00163: Apache/2.4.10 (Debian) PHP/5.6.23 configured -- resuming normal operations [Thu Jul 02 01:15:00.301234 2016] [core:notice] [pid 10] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
-
You can then connect to the docker container ip address with http:// to view the website. ( the ip address is displayed with the initial startup of the docker quickstart console )
-
If any modifications are made to the project, you will need to restart the container and rebuild the image, this can be done with the docker-compose command
docker-compose up --build
.
When running on windows, you should use the Kitematic
utility to view the container output and website.
After launching the docker-compose command, from the Kitematic
utility windows, you are able to click on the running container, view the 'web preview'
and launch a browser connection to the website.
- You will find API documentation and snippets here at http://thecallr.com/docs/
- Or on github in our repository https://github.com/THECALLR/
If you have any further questions or require assistance with these examples, please contact CALLR Support
- [email protected]
- FR: +33 (0)1 84 14 00 30
- US: +1 (646) 982-0830