Define a callgroup for internal extensions

Most incoming calls are expected to go to all extensions.  Therefore we need to configure a call group to handle this.  This is done by configuring a special extension and then using this to dial the others.

Define the extension number so we can use that elsewhere

I did this in vars.xml. So add an entry like:

<!-- replace xxx with the "common" extension number -->
<X-PRE-PROCESS cmd="set" data="DEFAULT_EXTENSION=xxx"/>

For each extension you want included in directory/default/xxx.xml add in the variables section a mention to the call group

<include>
  <user id="xxx">
    <params>
      ...
    </params>
    <variables>
      ...
      <variable name="callgroup" value="internal_users"/>
    </variables>
  </user>
</include>

In dialplan/default.xml add the new call group

<extension name="group_dial_internal_users">
  <condition field="destination_number" expression="^$${DEFAULT_EXTENSION}$">
    <action application="bridge" data="group/internal_users@${domain_name}"/>
  </condition>
</extension>

Cleanup default call groups

If you don’t need the default FreeSWITCH groups group_dial_sales, group_dial_support, group_dial_billing
then these can be removed in dialplan/default.xml and directory/default.xml where these groups are defined.

Leave a Reply