Caller ID based on information

Discussion in 'Call Flow Designer' started by gustavskii, Mar 13, 2018.

Thread Status:
Not open for further replies.
  1. gustavskii

    Joined:
    Jan 26, 2016
    Messages:
    37
    Likes Received:
    2
    Hello
    I have a predictive dialer, the dialer takes numbers from a file that is created by outside tool and those numbers are being taken from a database. In the database there is a certain information about this number, let say there is a column that have number 4 or 6 in it
    I need to show the agent that receives the call from the dialer whether it is 4 or it is 6
    I know that there is a Inbound Rules that shown name of the rule to the agent in 3cx client
    Is there a way to show 4 or 6 in the same way as Inbound Rules show? or even better configure Inbound Rule to show that?
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,078
    Likes Received:
    76
    Hello @gustavskii

    You can configure 2 queues. Agents should be logged in to 2 queues. When they receive a call from a queue, they will see the queue name. Then, the dialer should make the call between the external number, and the proper queue extension depending on the number you have (4 or 6).

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. John Doheny

    Joined:
    Jun 9, 2017
    Messages:
    11
    Likes Received:
    4
    Hi Ernesto - can a variable be placed into CallerID for call being transferred to ext/queue? We have an inbound application where we collect a 6 digit CustomerID from the caller and then lookup the agent/team responsible to make the transfer - we need to have this validated CustomerID inserted to CallerID when transferred. Is this possible?
     
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,078
    Likes Received:
    76
    Hello @John Doheny,

    Unfortunately it's not possible at the moment. We have plans to add this as a feature, because it is a very common need, but at the time being, it's not possible...

    Kind regards.
    Ernesto.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. John Doheny

    Joined:
    Jun 9, 2017
    Messages:
    11
    Likes Received:
    4
    Thanks for confirming - keep up the great work!
     
  6. gustavskii

    Joined:
    Jan 26, 2016
    Messages:
    37
    Likes Received:
    2
    @edossantos
    Hello
    I configured 2 queues, but dialer cannot listen to two queues, and sometimes there are people waiting in queue number 4 (the one that the dialer is listening to) which is unacceptable for our situation
     
  7. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,078
    Likes Received:
    76
    Hello @gustavskii,

    If you need to check the state of 2 queues to decide if it's time to make a call, then you need to use a script for it. In this case, instead of using a Predictive Dialer, you can use a Power Dialer (which makes calls at a specific pace, not monitoring any queue), and then use your own script to check if it's a good moment to make a call or not...

    You can use the following code snippet to get the number of logged in agents, free agents, and calls waiting on the queue:
    Code:
          int loggedInAgents = 0;
          int freeAgents = 0;
          int waitingCalls = 0;
          using (DN dn = PhoneSystem.Root.GetDNByNumber(queueExtension))
          {
            Queue queue = dn as Queue;
            if (queue == null) throw new Exception("Queue '" + queueExtension + "' could not be found.");
    
            waitingCalls = queue.GetActiveConnections().Length;
            foreach (DN queueMember in queue.Members)
            {
              Extension agentExtension = queueMember as Extension;
              if (isExtensionLoggedInToQueue(agentExtension))
              {
                ++loggedInAgents;
                bool isAgentFree = agentExtension.GetActiveConnections().Length == 0;
                if (isAgentFree) ++freeAgents;
              }
            }
          }
    
    You will also need the method isExtensionLoggedInToQueue used above:
    Code:
        private bool isExtensionLoggedInToQueue(Extension ext)
        {
          QueueStatusType status = ext.QueueStatus;
          try
          {
            int profileQueueStatus = ext.IsOverrideActiveNow ? ext.CurrentProfileOverride.ForceQueueStatus : ext.CurrentProfile.ForceQueueStatus;
            if (profileQueueStatus != -1) status = (QueueStatusType)profileQueueStatus;
          }
          catch
          {
            // status left as global
          }
    
          if (status == QueueStatusType.LoggedOut) return false;
    
          string loggedInQueuePropertyValue = ext.GetPropertyValue("LOGGED_IN_QUEUES");
          if (loggedInQueuePropertyValue == null) return true;
    
          if (String.IsNullOrEmpty(loggedInQueuePropertyValue)) return false;
    
          List<string> strs = new List<string>(loggedInQueuePropertyValue.Split(','));
          return strs.Contains(queueExtension);
        }
    

    Then, depending on the value of the variables loggedInAgents, freeAgents and waitingCalls, for each queue, you decide if it's a good moment to make a call or not.

    Hope the information helps.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.