Jump to content
plastikbier

Group-based delivering of only one call at a time

Recommended Posts

Hi,

 

is it possible to configure OpenQueue to only deliver one call at a time, when the target is a normal group, and more than one agent is available?

 

The root problem I want to work around, is that the phone agents would not manage to set their information properly, whether they are available or not.

That leads to excessive times calls remain in "alerting" state, because nobody is picking up.

 

Now that has the following effect: If OpenQueue sees several agents as available, it will push the same number of calls into "alerting" state.

Other calls in the queue will move forward, but when the connecting timeout is reached, they are placed back into the queue.

The calls in "waiting" state will get strange announcements (from their point of view), because they are first moving forward, then moving backwards again in the queue.

This is even worse when 2 or more agents are "free", because calls in the queue would move 2 or more steps in every direction.

 

Is there a way to tell OpenQueue, to only push one call into the group at a time?

I thought about adding another query to the function IsDestinationAvailable, which checks if any other call is already in "alerting" state and then return the destination as not available.

So only one call could be in "alerting" state at one time, the others would remain in the queue until this call is picked.

 

Any other ideas?

(Yes I know, the agents should behave properly and do not let calls ring all the time, but I am trying to get around this at least a little bit!)

 

Thanks folks,
Manuel

Share this post


Link to post
Share on other sites

Hello Manuel,

 

actually the OpenQueue only connects one call per time to the destination group. It check every second if the first call in the queue can be connected. So the calls will be delivered in steps of one second into the group, as long as at least one agent is available to take a call.

 

This behavior could of course be changed, but it would mean a quite huge redesign of the delivery method. This is for the moment nothing I would do myself (lack of time), but that could of course been done by anyone else who feels capable of that.

 

As a quick solution for your problem I would suggest to configure a wrapp-up time in the SwyxIt!s of each agent. So at least they are not getting the next call immediately after the previous one.

 

Share this post


Link to post
Share on other sites

Hi Tom,

 

thanks for your reply.

Maybe I got some setting wrong, but my OpenQueue script always tries to connect multiple calls to the group at a time.

I tried to set the destination group to Random or Parallel, but this doesn't change that behavior.

Is there something else I could try or check?

 

Thanks a lot,

Manuel

Share this post


Link to post
Share on other sites

Thanks, Tom.

 

My suggestion after reviewing the code:

When checking if the destination is available, also check if another call is in Altering-state.

Therefore I wrote an additional function for OpenQueue_GenericDBProvider.vbs based on the GetCallState-Function:

'---------------------------------------------------------------------------------------------------------------------------------
	' Public GetCallStateCount
	'
	' Returns count of calls of a given Queue in a given state
	'
	' Parameter
	'	nStateID		db state id
	'   sQueueName		db Queue Name
	'
	' Returns
	'	integer			number
	'
	'---------------------------------------------------------------------------------------------------------------------------------
	public function GetCallStateCount ( nStateID, sQueueName )

		PBXScript.OutputTrace "----> GenericDBProvider.GetCallStateCount ( " & nStateID & " )"

		Dim nReturn
		nReturn = 0

		On Error Resume Next

		if not m_bKeepConnection then
			nReturn = OpenDatabase
		end if

		if nReturn = 0 then

			Dim rs
			Set rs = CreateObject("ADODB.Recordset")
			if Err <> 0 then
				nReturn = cOpenQueue_ErrorProvider
				PBXScript.OutputTrace "ERROR: error initializing ADODB.Recordset object (" & CStr(Hex(Err)) & ")"
				PBXScript.OutputTrace Err.Description
			end if

			if nReturn = 0 then

				Dim sSQL
				sSQL = "SELECT COUNT(*) AS CallCount FROM OpenQueue_Calls Join OpenQueue_Config on OpenQueue_Calls.QueueID = OpenQueue_Config.ID WHERE status = " & nStateID & " and OpenQueue_Config.QueueName = '" & sQueueName & "'"

				rs.Open sSQL, m_vDBConnection, 2, 3, 1 ' adOpenDynamic, adLockOptimistic, adCmdText
				if Err <> 0 then
					nReturn = cOpenQueue_ErrorProvider
					PBXScript.OutputTrace "ERROR: error opening ADODB.Recordset object for call status (" & CStr(Hex(Err)) & ")"
					PBXScript.OutputTrace Err.Description
				else

					if rs.EOF then
						' No Output
						PBXScript.OutputTrace "Something went wrong"
					else
						' get Count of calls in status given
						nReturn = rs("CallCount")
						PBXScript.OutputTrace "Count of calls in Queue " & sQueueName & " with status " & nStateID & ": " & nReturn
					end if
					rs.Close

				end if
				Set rs = Nothing

			else
				nReturn = 0
			end if
		else
			nReturn = 0
		end if

		if not m_bKeepConnection then
			CloseDatabase
		end if

		GetCallStateCount = nReturn
		PBXScript.OutputTrace "<---- GenericDBProvider.GetCallStateCount, returns " & nReturn

	end function

It could be called in start_createqueue.vbs / ProcessCallByQueue right before connecting the first call in the queue (~Line 885)

 

					'...

					' is destination available
					nReturn = IsDestionationAvailable ( sDestination )

					if ( nReturn = cOpenQueue_Dest_NotReachable ) then
						PBXScript.OutputTrace "destination not reachable, remain in queue"

					elseif ( nReturn = cOpenQueue_Dest_NotAvailable ) then
						PBXScript.OutputTrace "destination not available (busy), remain in queue"

					elseif ( m_cProvider.GetCallStateCount ( cOpenQueue_CallState_Alerting, sQueueName ) > 0 ) then 
						'at least one call is already in alerting state
						 PBXScript.OutputTrace "destination available but another call is already alerting, remain in queue"
						 
					elseif ( nReturn = cOpenQueue_Dest_Available ) then 
                    '...

So if there is already one call alerting, all other calls will be remain in the Queue waiting.

What do you think?
 

Unfortunately I am not able to test this, because I have no possibility to sign OpenQueue_GenericDBProvider.vbs.

Could you be so kind helping me out with this?

 

Thanks,
Manuel

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.