/
How to Make Announcement to Users of Specific Departments

How to Make Announcement to Users of Specific Departments

This guide explains how to make announcement to users of specific Departments only. 

Created: July 2024

Updated: March 2025

Permalink: https://x-hoppers.atlassian.net/wiki/x/DAASAQ

Introduction

With this feature, you can make announcements in x-hoppers broadcast to users of specific Departments only.

Setup

  1. Create a CURL request that triggers a message to the required department

Example: 

curl -X POST --header 'Authorization: Bearer {token}' https://{pbx domain}/api/v1/Originate -d 'channel=Local/999@myDialplan&application=System&async=true' -d 'variable=dst=777,dept=Sales,msg=help required at checkouts'

Where:

  • 999 (you can set a custom number) - the Dialplan called number that processes the request

  • dst - the number in the outgoing Dialplan of users that should receive the announcement

  • dept - department name

  • msg - the announcement: a text prompt or a path to an audio file stored on the PBX

Note: msg and dept values can be wrapped in double quotation marks (“).

  1. Add 999 (you can set a custom number) as a called number and call the following script in that rule:
    Custom app -> System(data_engine_cli OriginatePlayback ${dst} '${dept}' '${msg}')

announcements-to-specific-departments-dialplan-rule.png
  1. Add dst as a called number (this can be any number that is not occupied by a user or by another real destination, e.g. 111 or 777) in the outgoing users Dialplan(s). If users have different Dialplans, the application with dst number should be created in each of them (or it can be added as an included procedure).

    • Set -> Language -> en (this one is needed for TTS processing)

    • Set(sound=${SHELL(/usr/sbin/data_engine_cli GetSound ${CALLERID(num)})})

    • Play sound -> ${sound}

Important: In case of changing Department name, make sure to reload PBX engine to apply the changes:

systemctl daemon-reload systemctl restart pbx-data-engine

Related content