[asterisk-users] app_queue New Function ToggleQueueMemberUse()

Watkins, Bradley Bradley.Watkins at compuware.com
Fri May 9 09:49:02 CDT 2008


Russell Bryant wrote:
> 
> This is a slightly different approach, but have you seen the 
> state interface
> code that is in Asterisk 1.6?  There is a backport of the 
> code for 1.4 floating
> around somewhere, I think.  It allows you to specify a 
> different device for a
> queue member that app_queue will use to determine the state 
> of an agent.  So,
> you can still list a Local channel for dialing, but Asterisk 
> will look at the
> state of SIP/myphone, for example, to know whether the agent 
> is busy or not.
> 
> Alternatively, if you would like to control the usability of 
> an agent through
> the dialplan, then you could use the DEVICE_STATE() function 
> to create a custom
> device state.  Then, you could list your custom "device" as 
> what app_queue
> should look at before attempting to call the agent.
>

One problem with that cunning plan is that using custom device states
doesn't work.  The code for handling device state changes in app_queue
is looking for a forward-slash in the device name, and returns if it
doesn't find one:

loc = strchr(technology, '/');
    if (loc) {
       *loc++ = '\0';
    } else {
       ast_free(sc);
       return 0;
    }


I've worked around it by modifying that particular bit of code, though
in a way I'm not sure I'd want committed to mainline Asterisk SVN (which
is why I haven't submitted it yet).
- Brad



More information about the asterisk-users mailing list