C2C Manual

To install Customer Click2Call, read the manual below or download it as a PDF file here:

1. System requirements

Click2Call requires the following software installed:

  • Linux Ubuntu 16.04 LTS, 18.04 LTS
  • Docker CE (18.06.1-ce)
  • Docker Compose (1.14.0)

The server should be accessible from the Internet via UDP protocol (ports: 10000-10200). Besides that, the Click2Call server should have access to the PBX that will be used.

The server needs to be integrated with your IP PBX via a SIP trunk. On the other hand, it provides a web widget, which needs to be accessible publicly (embedded into your website). So you might consider deploying the server in DMZ.

2. Installation

To install the product, perform the following steps:

1. Create a directory for the application:

~$ sudo mkdir /opt/click2call

2. Proceed to this directory.

3. Execute the following command:

~$ sudo docker run --rm -it aurus5/click2call-webapp compose > docker-compose.yml

A configuration file docker-compose.yml will be created.

4. Modify docker-compose.yml to set the parameter values:

  • ${LOCAL_IP} — Click2Call server local IP address;
  • ${PUBLIC_IP} — public IP address of this server, accessible from the Internet (can be identical with ${LOCAL_IP});
  • ${PUBLIC_HTTP_PORT} — server will be accessed on this port via HTTP/HTTPS and WS/WSS;
  • ${CERT_PATH} — path to the file containing the certificates for the domain that will be accessed via HTTPS/WSS;
  • ${PK_PATH} — path to the private key file;
  • ${C2C_ROUTES} — list of route pairs (pattern: <alias>:<phone-address>), separated by comma (“,”). At least one route should be specified;
  • ${SIP_REGISTRAR} — SIP registration server address.

If certificate and public key aren’t specified, the server will work via HTTP and WS. WebRTC requires secure connections, therefore, SSL termination should be performed separately.

5. If necessary, specify the optional parameters in environment section of click2call-webapp service in docker-compose.yml:

  • C2C_SIP_DOMAIN — domain for the SIP addresses. If this parameter is specified, it will be used in all SIP addresses that aren’t fully qualified. If this parameter is empty,
  • C2C_SIP_REGISTRAR domain will be used.
  • C2C_SIP_PROXY — SIP proxy address.
  • C2C_SIP_AUTH_TYPE — authentication type for registration on proxy or PBX server.
    Possible values:
    • none — authentication disabled (default value);
    • plain — plain text login and password;
    • ha1 — password is stored as hash;
  • C2C_SIP_AUTH_USER — username for registration;
  • C2C_SIP_AUTH_PASSWORD — password for registration;
  • C2C_LOG_LEVEL — logging level (info, error, debug);
  • C2C_ORIGINS — optional list of websites that are allowed access to the server (CORS).
    By default, all websites have access. The list is separated by comma (‘,’).

6. If ${LOCAL_IP} and ${PUBLIC_IP} are identical and public (accessible from the Internet), you should close port 8188 for external access.

3. Application launch

1. To launch the application, execute the following command from the application directory:

$ sudo docker-compose up -d

2. Make sure that containers have started successfully:

$ sudo docker-compose ps

4. Embedding the widget

To embed Click2Call on a website page:

  • Embed the widget script url: https://<appdomain>/js/c2c.widget.js, <appdomain> here stands for the Click2Call server address;
  • Use the <c2c-widget></c2c-widget> tag to embed the script. It has the following parameters:
    • data-rc-client-phone — phone number to be used as CallerID;
    • data-rc-client-name — client’s name of your choosing;
    • data-rc-route — one of the routes from the C2C_ROUTES list in server configuration file.
  • Use CSS to manage the widget appearance;
  • Add any error handling code for a ‘callError’ CustomEvent.

The widget can have the following states:

  • default – widget was initialized and is ready to call;
  • calling – widget is establishing the connection with IP PBX;
  • incall – call established.

A page example:


After the page has loaded, the widget button will be displayed as the one above.

Click the button to make a call to the phone specified as «q&a» in the route list from a client named «John Doe» with phone number
«123456».

.

Got any questions?

.

Latest Entries

    Load more