<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>.hmmessage P {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; PADDING-RIGHT: 0px
}
BODY.hmmessage {
        FONT-SIZE: 12pt; FONT-FAMILY: Calibri
}
</STYLE>
<META name=GENERATOR content="MSHTML 10.00.9200.16540"></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>Copying to asterisk-users, as it's of use there
too.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>I copied this code years ago from the net, it may have
been modified since... </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>This however is only used by managers, as it allows the
manager to log a user in and out.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>For agent logged in/out status:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial><SPAN class=370200403-05052013><FONT color=#0000ff size=2
face=Arial>where 8501 is the queue number and 8512 is the agent's extension, and
SIP0001 is the agent's device.</FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial><SPAN
class=370200403-05052013></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><SPAN
class=370200403-05052013><FONT color=#0000ff size=2 face=Arial>in
extensions.conf</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial> ;ring the queue</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial> exten =>
8501,1,Goto(itg-queue,itg,1)</FONT></SPAN></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=370200403-05052013> </SPAN>;AGENT Login/Logout to
queue<SPAN class=370200403-05052013> 8501</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2> exten
=>
_8501.,1,Macro(custom-agent-inout,itg_queue)<BR></DIV></FONT></FONT></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>The agent status' are hints like, </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013></SPAN><SPAN
class=370200403-05052013><FONT color=#0000ff size=2
face=Arial> </FONT></SPAN><SPAN class=370200403-05052013><FONT
color=#0000ff size=2 face=Arial>exten =>
8501SIP0001-99,hint,Custom:q8501_a8512</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>[macro-custom-agent-inout]<BR>;<BR>; Standard extension
macro:<BR>; ${ARG1} - Queue to Join<BR>;<BR></FONT></SPAN><SPAN
class=370200403-05052013><FONT color=#0000ff size=2 face=Arial>exten =>
s,1,Answer()<BR></DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>exten => s,n,MYSQL(Connect connid localhost asterisk xxxxxx
yyyyy)<BR>exten => s,n,MYSQL(Query resultid ${connid} SELECT channel,
extension, name FROM pbx WHERE cid_num='${MACRO_EXTEN:4}')<BR>exten =>
s,n,MYSQL(Fetch fetchid ${resultid} channelpath CALLBACKNUM callername)<BR>exten
=> s,n,MYSQL(Clear ${resultid})<BR>exten => s,n,MYSQL(Disconnect
${connid})<BR></DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>exten =>
s,n,AddQueueMember(${ARG1},SIP/${MACRO_EXTEN:4})<BR>;If they're already logged
in, log off<BR>exten => s,n,GotoIf($["${AQMSTATUS}" =
"MEMBERALREADY"]?out)<BR>exten =>
s,n,Set(DEVICE_STATE(Custom:q${MACRO_EXTEN:0:4}_a${CALLBACKNUM})=INUSE)<BR>exten
=> s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})<BR>exten =>
s,n,Playback(agent-loginok)<BR>exten => s,n,Hangup()</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial>exten =>
s,n(out),RemoveQueueMember(${ARG1},SIP/${MACRO_EXTEN:4})<BR>exten =>
s,n,Set(DEVICE_STATE(Custom:q${MACRO_EXTEN:0:4}_a${CALLBACKNUM})=NOT_INUSE)<BR>exten
=> s,n,UserEvent(Agentlogoff,Agent: ${CALLBACKNUM})<BR>exten =>
s,n,Playback(agent-loggedoff)<BR>exten => s,n,Hangup()</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=370200403-05052013><FONT color=#0000ff
size=2 face=Arial><SPAN class=370200403-05052013>Alec</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><BR> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Ron Hartmann
[mailto:ron_hartmann@hotmail.com] <BR><B>Sent:</B> Saturday, 4 May 2013 3:08
a.m.<BR><B>To:</B> Alec Davis<BR><B>Subject:</B> RE: BLF and asterisk
Queue<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Alec,
<DIV><FONT color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><BR></DIV>
<DIV>I was able to get this working and my staff loves it. Thanks a
million!!!!!!!!</DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><BR></DIV>
<DIV>Now off to find a way to show an agents status via blf :-)</DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><FONT color=#0000ff size=2 face=Arial></FONT><FONT
color=#0000ff size=2 face=Arial></FONT><FONT color=#0000ff size=2
face=Arial></FONT><BR></DIV>
<DIV>~ron<BR><BR>
<DIV>
<DIV id=SkyDrivePlaceholder></DIV>
<HR id=stopSpelling>
From: ron_hartmann@hotmail.com<BR>To: sivad.a@paradise.net.nz<BR>Subject: RE:
BLF and asterisk Queue<BR>Date: Wed, 24 Apr 2013 13:09:04 +0000<BR><BR>
<STYLE>.ExternalClass .ecxhmmessage P {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px
}
.ExternalClass BODY.ecxhmmessage {
        FONT-SIZE: 12pt; FONT-FAMILY: Calibri
}
</STYLE>
<DIV dir=ltr>Thank you very much :-) I appreciate the information
<DIV><BR></DIV>
<DIV>~ron<BR><BR>
<DIV>
<DIV id=ecxSkyDrivePlaceholder></DIV>
<HR id=ecxstopSpelling>
Date: Wed, 24 Apr 2013 21:28:46 +1200<BR>From:
sivad.a@paradise.net.nz<BR>Subject: RE: BLF and asterisk Queue<BR>To:
ron_hartmann@hotmail.com<BR><BR>
<STYLE>.ExternalClass .ecxhmmessage P {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; PADDING-RIGHT: 0px
}
.ExternalClass BODY.ecxhmmessage {
        FONT-SIZE: 12pt; FONT-FAMILY: Calibri
}
</STYLE>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial>In case my earlier email was a bit
cryptic.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial>I didn't commit the change, due to time zone differences, so
don't have the actual patch that was commited.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013></SPAN><SPAN
class=ecx329562009-24042013><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial>The patch that was comitted to asterisk 11 is at the
following link.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial><A
href="http://svnview.digium.com/svn/asterisk/branches/11/apps/app_queue.c?r1=373234&r2=373235&view=patch"
target=_blank>http://svnview.digium.com/svn/asterisk/branches/11/apps/app_queue.c?r1=373234&r2=373235&view=patch</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=ecx329562009-24042013><FONT color=#0000ff
size=2 face=Arial>Alec</FONT></SPAN></DIV><FONT color=#0000ff size=2
face=Arial></FONT><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV lang=en-us class=ecxOutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Ron Hartmann
[mailto:ron_hartmann@hotmail.com] <BR><B>Sent:</B> Wednesday, 24 April 2013
8:09 a.m.<BR><B>To:</B> sivad.a@paradise.net.nz<BR><B>Subject:</B> BLF and
asterisk Queue<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Alec,
<DIV><BR></DIV>
<DIV>I am very interested in trying out your Queue patch to allow my staff
to see if there are any calls waiting in the Queue.</DIV>
<DIV><BR></DIV>
<DIV>Unfortunately the "View Diff" for <A style="FONT-SIZE: 12pt"
href="https://reviewboard.asterisk.org/r/1619/"
target=_blank>https://reviewboard.asterisk.org/r/1619/</A> only shows
the changes Olle added (the removal of the debug)</DIV>
<DIV><BR></DIV>
<DIV>I was wondering if you still have the Patch. I will need to back
port this, but am happy to do that, if i can just get the patch.</DIV>
<DIV><BR></DIV>
<DIV>~ron</DIV></DIV></BLOCKQUOTE></DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>