Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 0 additions & 333 deletions README.html

This file was deleted.

29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* [Requirements](#requirements)
* [Docker](#docker)
* [docker-compose](#docker-compose)
* [With php-composer](#with-php-composer)
* [Without php-composer](#with-php-composer)
* [With Composer](#with-composer)
* [Without Composer](#with-composer)
* [Examples](#examples)
* [Click to Call Web](#click-to-call-web)
* [Create scheduled IVR campaign](#create-scheduled-ivr-campaign)
Expand Down Expand Up @@ -42,8 +42,8 @@ For other users, follow the instructions on the official [Docker website here](h

- - -

## With php-composer
php-composer ([https://getcomposer.org/download/](https://getcomposer.org/download/)) is recommended for use with the sdk and for managing your project dependencies.
## With Composer
Composer ([https://getcomposer.org/download/](https://getcomposer.org/download/)) is recommended for use with the sdk and for managing your project dependencies.
The download page contains instructions and necessary files for installation on Windows and other platforms.
* if not being installed as root/super user, make sure to use the switch **--install-dir=**

Expand All @@ -52,34 +52,33 @@ The download page contains instructions and necessary files for installation on
```json
{
"require": {
"callr/sdk-php": "dev-master"
"callr/sdk-php": "^0.9"
}
}
```

2. As an alternative, to automatically create the composer.json and install the sdk run `composer require callr/sdk-php:dev-master`
2. As an alternative, to automatically create the composer.json and install the sdk run `composer require callr/sdk-php:^0.9`

3. In your project source files, be sure to require the file `autoload.php`
```php
<?php
require 'vendor/autoload.php';
```

4. Run `composer update`, which will download the sdk either via git ( if found in the environment ), or a zip and install it into the *vendor* directory.
```bash
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing callr/sdk-php (dev-master 09a2e40)
- Installing callr/sdk-php (v0.9.1)
Loading from cache

Writing lock file
Generating autoload files
```
---

## Without php-composer
If you wish to use the sdk without the dependency management of php-composer it is possible with the following steps
## Without Composer
If you wish to use the sdk without the dependency management of Composer it is possible with the following steps

1. Download the sdk from the CALLR [php-sdk github](https://github.com/THECALLR/sdk-php/archive/master.zip)

Expand Down Expand Up @@ -140,7 +139,7 @@ for container cleanup after the script has terminated.
See the [project README](click2call-web/README.md) for more information.

### Create scheduled IVR campaign
* Located in /campaign-sendr, a Docker/docker-compose project showing how to create a scheduled campaign that utilises IVR and bridging features of the CALLR **SendR** API.
* Located in /campaign-sendr, a Docker/docker-compose project showing how to create a scheduled campaign that utilises IVR and bridging features of the CALLR **SENDR** API.
See the [project README](campaign-sendr/README.md) for more information.

### Send SMS
Expand Down Expand Up @@ -189,12 +188,8 @@ Advanced users can remove containers and images with *docker rm/rmi*

- - -

# Further help
* You will find API documentation and snippets here at [http://thecallr.com/docs/](http://thecallr.com/docs/)
## Further help
* You will find API documentation and snippets here at [http://www.callr.com/docs/](http://www.callr.com/docs/)
* Or on github in our repository [https://github.com/THECALLR/](https://github.com/THECALLR/)

If you have any further questions or require assistance with these examples, please contact CALLR Support
* support@callr.com
* FR: +33 (0)1 84 14 00 30

---
8 changes: 2 additions & 6 deletions campaign-sendr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,8 @@ Here we can issue another status command to view our campaign statistics and sta

- - -

# Further help
* You will find API documentation and snippets here at [http://thecallr.com/docs/](http://thecallr.com/docs/)
## Further help
* You will find API documentation and snippets here at [http://www.callr.com/docs/](http://www.callr.com/docs/)
* Or on github in our repository [https://github.com/THECALLR/](https://github.com/THECALLR/)

If you have any further questions or require assistance with these examples, please contact CALLR Support
* support@callr.com
* FR: +33 (0)1 84 14 00 30

---
2 changes: 1 addition & 1 deletion campaign-sendr/scripts/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"callr/sdk-php": "dev-master"
"callr/sdk-php": "^0.9"
}
}

4 changes: 2 additions & 2 deletions campaign-sendr/scripts/upload.addressbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
exit;
}

// poll for job status, should be replaced by a webhook (http://thecallr.com/docs/webhooks)
// poll for job status, should be replaced by a webhook (http://www.callr.com/docs/webhooks)
$job;
do {
sleep(1);
Expand Down Expand Up @@ -68,7 +68,7 @@
$ADDRESSBOOK_PHONENUMBER_COL_INDEX, $ADDRESSBOOK_COUNTRY_CODE, null]);
echo "Addressbook import job id: {$importJobId} ";

// poll for job status, could be replaced by a webhook (http://thecallr.com/docs/webhooks)
// poll for job status, could be replaced by a webhook (http://www.callr.com/docs/webhooks)
do {
sleep(1);
$job = $api->call('jobs.get', [$importJobId]);
Expand Down
2 changes: 1 addition & 1 deletion campaign-sendr/scripts/upload.media.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
exit;
}

// poll for job status, could be replaced by a webhook (http://thecallr.com/docs/webhooks)
// poll for job status, could be replaced by a webhook (http://www.callr.com/docs/webhooks)
$job;
do {
sleep(1);
Expand Down
183 changes: 0 additions & 183 deletions click2call-web/README.html

This file was deleted.

24 changes: 15 additions & 9 deletions click2call-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,24 @@ SetEnv APP_ID H45HC0D3
---

## Installation
### Docker
### Docker installation
Docker is available for download on their website [https://www.docker.com/](https://www.docker.com/products/overview)

On Windows make sure you install [Docker toolbox](https://www.docker.com/products/docker-toolbox), or [Docker for Windows (Requires Microsoft Windows 10 Professional or Enterprise 64-bit)](https://www.docker.com/products/docker#/windows)
#### Windows
On Windows you can install [Docker toolbox](https://www.docker.com/products/docker-toolbox),
or [Docker for Windows (Requires Microsoft Windows 10 Professional or Enterprise 64-bit)](https://www.docker.com/products/docker#/windows)
and use the `Kitematic` application to manage your containers and view their logs and output (installed by default)

### docker-compose
#### Mac
On a Mac you can install [Docker toolbox](https://www.docker.com/products/docker-toolbox),
or [Docker for Mac (Requires Apple macOS Yosemite 10.10.3 or above )](https://www.docker.com/products/docker#/mac)
and use the `Kitematic` application to manage your containers and view their logs and output (installed by default)

#### Linux
Either download and install Docker using your distributions package manager,
or follow the instructions on the official [Docker website here](https://docs.docker.com/engine/installation/linux/)

### docker-compose installation
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](https://docs.docker.com/compose/install/)

Expand Down Expand Up @@ -91,13 +102,8 @@ After launching the docker-compose command, from the `Kitematic` utility windows
---

## Further help
* You will find API documentation and snippets here at [http://thecallr.com/docs/](http://thecallr.com/docs/)
* You will find API documentation and snippets here at [http://www.callr.com/docs/](http://www.callr.com/docs/)
* Or on github in our repository [https://github.com/THECALLR/](https://github.com/THECALLR/)

If you have any further questions or require assistance with these examples, please contact CALLR Support
* support@callr.com
* FR: +33 (0)1 84 14 00 30
* US: +1 (646) 982-0830

---

2 changes: 1 addition & 1 deletion click2call-web/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"callr/sdk-php": "dev-master"
"callr/sdk-php": "^0.9"
}
}
152 changes: 0 additions & 152 deletions click2call-web/src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,158 +57,6 @@
<div id="result" style="color: green; font-weight: bolder;"></div>
<div id="error" style="color: red; font-weight: bolder;"></div>
</div><hr>
<div class="container">
<!-- start readme paste area -->


<h1>
<a id="readme-click-to-call-web-sample" class="anchor" href="#readme-click-to-call-web-sample" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>README Click to Call Web sample</h1>

<h2>
<a id="table-of-contents" class="anchor" href="#table-of-contents" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Table of contents</h2>

<ul>
<li><a href="#general-information">General information</a></li>
<li>
<a href="#installation">Installation</a>

<ul>
<li><a href="#docker">Docker</a></li>
<li><a href="#docker-compose">docker-compose</a></li>
</ul>
</li>
<li>
<a href="#running">Running</a>

<ul>
<li><a href="#windows">Windows</a></li>
</ul>
</li>
<li><a href="#further-help">Further help</a></li>
</ul>

<hr>

<h2>
<a id="general-information" class="anchor" href="#general-information" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>General Information</h2>

<p>This demo uses environment variables set in the file <code>.htaccess</code> found in the src/ directory, that needs to be defined for your use case</p>

<pre><code>SetEnv CALLR_LOGIN &lt;your callr login&gt;
SetEnv CALLR_PASS &lt;your callr password&gt;
SetEnv CALLR_TARGET &lt;target number&gt;
SetEnv APP_ID &lt;app id&gt;
</code></pre>

<ul>
<li>CALLR_LOGIN is the login you use to access CALLR services</li>
<li>CALLR_PASS is the password you use to access CALLR services</li>
<li>CALLR_TARGET is the target telephone number to forward client calls to, when they submit the web form</li>
<li>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 <code>click2call.appid</code>
</li>
</ul>

<p>A typical <code>.htaccess</code> for Bob Smith, with a telephone number of '+336123456789' and a predefined click to call application would look like the following:</p>

<pre><code>SetEnv CALLR_LOGIN bobsmith
SetEnv CALLR_PASS mySecr3tp@ssw0rd
SetEnv CALLR_TARGET +336123456789
SetEnv APP_ID H45HC0D3
</code></pre>

<h3>
<a id="if-no-predefined-click-to-call-application-is-being-used-please-leave-app_id-blank-or-remove-the-line-completely" class="anchor" href="#if-no-predefined-click-to-call-application-is-being-used-please-leave-app_id-blank-or-remove-the-line-completely" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>if no predefined click to call application is being used, please leave <code>APP_ID</code> blank, or remove the line completely.</h3>

<hr>

<h2>
<a id="installation" class="anchor" href="#installation" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Installation</h2>

<h3>
<a id="docker" class="anchor" href="#docker" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Docker</h3>

<p>Docker is available for download on their website <a href="https://www.docker.com/products/overview">https://www.docker.com/</a></p>

<p>On Windows make sure you install <a href="https://www.docker.com/products/docker-toolbox">Docker toolbox</a>, or <a href="https://www.docker.com/products/docker#/windows">Docker for Windows (Requires Microsoft Windows 10 Professional or Enterprise 64-bit)</a>
and use the <code>Kitematic</code> application to manage your containers and view their logs and output (installed by default)</p>

<h3>
<a id="docker-compose" class="anchor" href="#docker-compose" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>docker-compose</h3>

<p>On Windows and Mac the docker-compose utility is installed automatically with docker-toolbox<br>
For other users, follow the instructions on the official <a href="https://docs.docker.com/compose/install/">Docker website here</a></p>

<hr>

<h2>
<a id="running" class="anchor" href="#running" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Running</h2>

<ol>
<li><p>Before running the <code>docker-compose up c2cwebdemo</code> command, please modify the <strong>.htaccess</strong> file found in the <strong>src</strong> directory.</p></li>
<li><p>If using MacOS / Windows launch the <code>Docker quickstart terminal</code>, and use the provided console to run this demo. </p></li>
<li>
<p>After installing <code>Docker</code> and <code>docker-compose</code>, run the following command in the same directory as <strong>Dockerfile</strong>, </p>

<pre><code>$ docker-compose up
</code></pre>

<p>you will see output similar to the following: </p>

<pre><code>Building c2cwebdemo
Step 1 : FROM php:5.6-apache
---&gt; 7374b3b98172
Step 2 : RUN apt-get update &amp;&amp; apt-get install -y zip &amp;&amp; curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
---&gt; Using cache
---&gt; 82c0a0de5ff7
Step 3 : COPY src/ /var/www/html/
---&gt; a5dd2bea4c5c
Removing intermediate container 5ecde79f4420
Step 4 : COPY composer.json /var/www
---&gt; 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'
</code></pre>
</li>
<li><p>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 )</p></li>
<li><p>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 <code>docker-compose up --build</code>.</p></li>
</ol>

<h3>
<a id="windows" class="anchor" href="#windows" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Windows</h3>

<p>When running on windows, you should use the <code>Kitematic</code> utility to view the container output and website. </p>

<p>After launching the docker-compose command, from the <code>Kitematic</code> utility windows, you are able to click on the running container, view the 'web preview'
and launch a browser connection to the website.</p>

<hr>

<h2>
<a id="further-help" class="anchor" href="#further-help" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Further help</h2>

<ul>
<li>You will find API documentation and snippets here at <a href="http://thecallr.com/docs/">http://thecallr.com/docs/</a>
</li>
<li>Or on github in our repository <a href="https://github.com/THECALLR/">https://github.com/THECALLR/</a>
</li>
</ul>

<p>If you have any further questions or require assistance with these examples, please contact CALLR Support</p>

<ul>
<li><a href="mailto:support@callr.com">support@callr.com</a></li>
<li>FR: +33 (0)1 84 14 00 30 </li>
<li>US: +1 (646) 982-0830</li>
</ul>

<hr>


<!-- end readme paste area -->
</div>
<script>
$("#clicktocall_form").submit(function(e) {
$.ajax({
Expand Down