.. _huntgroups:

###########
Hunt groups
###########

The hunt groups allows configuring more complex *ringing* process than the
traditional **call to a user**.

These are the fields shown for new hunt groups:

*******************
Basic configuration
*******************

    Name
        Used to reference this hunt group

    Description
        Additional information

    Strategy
        Describes how will the calls be delivered. See details in glossary below.

    Ring all timeout
        For *Ringall* strategy, defines for how long will the members be called.

    Prevent missed calls
        When 'Yes', calls will never generate a missed call. When 'No', missed calls will be prevented only for RingAll
        hunt groups if someone answers.

    Allow Call Forwards
        When 'No', user's call forward settings (including DND and boss/assistant) and 3XX responses will be ignored. Otherwise, they will be followed.

***********************
No answer configuration
***********************
        Policy when hunt group members do not answer the call after defined timeouts.
        A locution and a target can be set up.

.. tip:: When configuring a hunt group, you can prevent missed calls on called members with **Prevent missed calls** setting:

    - **Yes**: calls generated by the hunt group will never generate missed calls on called members.

    - **No**: The behaviour of this setting depends on the hunt group type:

    - **RingAll**: calls generated by the hunt group will generate missed calls on called members only if none of them answers the call.

    - **Remaining types**: calls generated by the hunt group will generate missed calls on every called member that does not answer the call.

.. warning:: Enabling **Allow Call Forwards** may cause undesired behaviours:

          - Member not being called as has DND enabled.

          - Member marked as boss not being called (assistant will be called instead).

          - Huntgroup's *No answer configuration* never applying (e.g. no answer timeout on called user that applies sooner than Ringall timeout).

          - Huntgroup's members not being called (e.g. sequential huntgroup, first member forwards call to its cell phone).

          **Use this feature wisely**.

There are 4 strategies available:

    Ringall
        The call will make all the terminals of the group during a predefined 
        time.

    Linear
        The call will *jump* from one user to another in a predefined order
        ringing during the configured time. If the call is not answered by any 
        user of the group, it will be hung up (or will trigger the no answer logic).

    Round robin
        The call will *jump* from one user to another in a predefined order 
        ringing during the configured time. If the call is not answered by any
        user of the group, the call will *jump* again to the first member of the 
        group and keep looping.  

    Random
        The call will *jump* from one user to another in a random order, 
        ringing during the configured time.  If the call is not answered by any 
        user of the group, it will be hung up (or will trigger the no answer logic).


Adding members to hunt group
============================

**List of members** subsection allows adding users or external numbers to each group:

- For *RingAll hunt groups*, members will be added without any additional parameters.

- For remaining groups, priority and timeout will be specified for each member. Priority determines the order, timeout ring
  duration for each member.

Section :ref:`Users` also allows adding member to existing hunt groups using **List of hunt groups** option.
