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

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

Introduction

Starting from WMS 6.07, it is possible to make announcement 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 rule that processes the request. 

  • dst = the rule 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. Create rule 999 (you can set a custom 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. Create a Dialplan rule with dst 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 rule with dst number should be created in each of them (or it can be added as an included procedure). Configuration:

    • 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