Click to call is a button for your website that allows your customers to make a call over VoIP without leaving the website.
Key features:
- Call a Voximplant user / SIP address / phone number
- You can dial an extention number after the call establishes
- You can mute/unmute your microphone during the call
- You can choose the microphone and test it by recording your voice and playing it back
- You can see the connection status and quality
The setup consists of two parts: VoxEngine cloud setup and the widget's source code setup.
Follow the instruction to set up the cloud part before you download the source code.
- Download the widget repository
- Run
yarn install
ornpm install
in the widget directory - Rename the .env.example file to .env
- In the .env file:
- Fill your user credentials into the
VUE_APP_USER
andVUE_APP_PASSWORD
properties - Add account node to
VUE_APP_ACCOUNT_NODE
See the node instruction - Add the number to call to the
VUE_APP_NUMBER
property - Fill the
testmic
string to theVUE_APP_TEST_NUMBER
property
- Fill your user credentials into the
- Run
yarn serve
ornpm run serve
to run the development build - Open the http://localhost:8080/call URL to test the application
- Once the application works correctly, you can assemble the application
- If you do not plan to upload the application to the webserver root folder, set up the
publicPath
property in thevue.config.js
file. See the instruction - To make a production build, run
yarn build
ornpm run build
- The
dist
directory will contain the production build ready to upload to the server.
- public — Project's static materials, such as favicon and the index.html template, where you can add any additional code, such as action counters
- src — Click-to-call project code
- assets — Assets: images and sounds
- components — Application source code
- router — Application routing files
- views — Application pages: Home.vue is the default page, Button.vue is the button page to be placed on the website
- The get parameters starting with
x-
are sent as headers to the VoxEngine scenario - You can see the widget example in new window at: http://localhost:8080/button