Adding PlaceCall Button
To simplify outbound call placement, follow these steps:
- Extend frame/_base.html to include a frame on your desired page.
- Add a button to the page where you want to initiate outbound calls.
- Implement an onClick event that calls the ‘PlaceNiceCall’ function with the phone number as an argument.
onclick="PlaceNiceCall('<phone_number>')
- Make sure to set one of the Nice configs as the default config for all related operations.
Example Button Implementation:
Here's an example demonstrating a simple button to initiate a call:
{% extends 'frame/_base.html' %}
<style>
#call_widget_id .md-fab
font-size: 56px; /* adjust size as needed */
background-color: #ff0000; /* adjust color as needed */
</style>
{% block content %}
<div id="call_widget_id">
<a href="#" class="md-fab md-fab-small md-fab-accent"
data-uk-tooltip="{pos:'left'}"
title="Call Patient"
onclick="PlaceNiceCall('<phone_number>')">
<i class="material-icons">

</i>
</a>
</div>
{% endblock %}