How to Use Intercom for Internal Calls Only

This document explains how to use intercom for internal calls only.

Updated: January 2023

Permalink: https://wildix.atlassian.net/wiki/x/VAzOAQ


Use Case

The customer wants to have internal calls do intercom by default, but for any calls that are coming from the outside world, they do NOT want intercom. Special consideration needs to be given to calls that come in externally to an internal user and then are transferred to another internal user.

Solution

  1. Check the “type” of the call.  Then either point the call to a special intercom Dialplan, or to a standard Dialplan based on this check.

  2. In users Dialplan, make an entry that will match the extension dialing on the system. 
    Example: if you have 3 digit extensions on the system, make an entry for XXX.

  3. Build the following custom app in the Dialplan as follows:

The above Dialplan has the following content.

  1. Custom App NoOp(Call type is ${CALLTYPE})
  2. Custom App GotoIf($[ ${CALLTYPE} == external ]?nointercom,${EXTEN},1)
  3. Intercom “called number” “message to oper”

Note:

  • The key bit of custom application is in the GotoIf (step b). This Dialplan application checks the status of the channel variable called ${CALLTYPE} to see if the call is an external call. If the call is an external call (e.g. a call that arrived on the trunk but is being transferred to an internal user), then the call is sent to the Dialplan called nointercom with the dialed extension as stored in the ${EXTEN} channel variable.  Of course, a “message to the operator” value does not need to be used on the intercom Dialplan application if you do not desire.
  • Also note that internal calls being dialed extension to extension will NOT have a call type of external. Rather, they will have a call type of internal. Therefore, normal extension to extension calls, or calls that are extension to extension and then being transferred to another internal location will NOT pass the check for $[ ${CALLTYPE} == external ].  Therefore those calls will fall through that check and be processed by the Intercom dialplan application.

All that is left is to create a Dialplan called nointercom with an entry as follows:

Or, if desired, you can make NO entries in this Dialplan and just be sure that you have an included procedure of pbxinternal to process the calls that are destined to an internal user via “no intercom”.