[asterisk-users] Agent channel...

Alex Balashov abalashov at evaristesys.com
Mon Jul 14 17:50:51 CDT 2008


Carlos,

Carlos Chavez wrote:

> 	How can I make sure the agent will show "In Use" when they make a call?

This is a common problem.  Unfortunately, there are no good solutions; 
the queue engine has no way of knowing the state of every SIP peer, as 
far as whether there is an open INVITE transaction and so on.  These 
state machines are entirely separate.

The only way to determine that a SIP peer is in use is to try to place a 
call to it and see what the feedback is, which is how Dial(), 
ChanIsAvail(), etc. perform their evaluations.

So, unfortunately, as far as the queue subsystem is concerned, the only 
way that an agent can be in "in use" is if they picked up an incoming 
queue call.

There are many possible solutions.  You can remove / increase the 
call-limit and use call waiting.  Or, you can use Local channels for 
outbound calls to shunt the dialing through a set of dial plan 
instructions, and use the "M" argument to Dial() to call a macro upon 
far-end pickup that sets the agent to "paused" state and causes queue 
calls not to be routed to them.  Perhaps you can use the 'h' extension 
to unpause the member once the outbound call exits.

In my case, I modified the source code to set the queue member's "in 
use" flag when the SIP peer makes a relevant call, but this is expensive 
and inelegant as it requires doing linear lookups to correlate the 
calling SIP agent with any queue(s)s of which they may be a member on 
every outbound dial.  It was a solution that caused a lot of problems as 
well as solving some.

-- Alex

-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list