Page tree

Applies to VoipNow 3 and higher!

The CallNow Feature was removed in VoipNow 5.5.0.

This article describes how to hide the country code element from the interface with a simple edit in the interface template. 

Step-by-step guide

By default, the CallNow page looks as shown below. 

To hide the country code element (drop-box and field) from the CallNow template, take the following steps: 

STEP 1: Connect to your VoipNow  server as root using a SSH client (e.g. Putty).

STEP 2: Go to the <VOIPNOW_ROOT_D>/admin/htdocs/templates/callnow/ folder.

<VOIPNOW_ROOT_D> is a variable defined in the /etc/voipnow/paths.conf file. When running commands, you must have it replaced with its value (e.g. /usr/local/voipnow).

STEP 3: Display the index.tpl file's content by running:

cat index.tpl

Inside index.tpl search for:

<tr id="tr-phone">
	<td class="row_td" align="left">{$prefix_num}<span class="required">*</span></td>
    <td align="right" class="td_call_code">
        {html_options options=$calling_codes name="call_code" id="call_code" class="large_select" selected=$selected_code}
    </td>
</tr>

STEP 4: To change the layout of the page, edit the <VOIPNOW_ROOT_D>/admin/htdocs/templates/callnow/index.tpl file. Open the file using your favorite text editor, and you'll find the country code drop-down list defined by the following line:

{html_options options=$calling_codes name="call_code" id="call_code" class="large_select" selected=$selected_code}


To remove the country code drop-down list and the entire field, comment its corresponding lines. To comment a line, you must replace { with {* and } with *}. To remove the entire field, add <!-- before the <tr  tag and --> after </tr>

In the end, the entire block should look as displayed below: 

<!-- <tr id="tr-phone">
	<td class="row_td" align="left">{$prefix_num}<span class="required">*</span></td>
    <td align="right" class="td_call_code">
        {*html_options options=$calling_codes name="call_code" id="call_code" class="large_select" selected=$selected_code*}
    </td>
</tr> -->

In the end, save the file, remove the cached files and restart the web interface service:


rm -rf /usr/local/voipnow/admin/htdocs/templates_c/*
service voipnow restart

At this point, when you open the CallNow page, it should look as shown below.  


#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.