<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<META content="Microsoft Word 11" name=Originator><LINK
href="cid:filelist.xml@01C3CE1B.0A147EA0" rel=File-List><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>BestFit</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:UseWord2002TableStyleRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<STYLE>@font-face {
        font-family: Courier;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=purple link=blue
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Shad:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Using the AddQueueMember. Launching this command 3
times in different queues, logs one phone to that 3 queues...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>*CLI> show application AddQueueMember</DIV>
<DIV> </DIV>
<DIV> -= Info about application 'AddQueueMember' =-</DIV>
<DIV> </DIV>
<DIV>[Synopsis]:<BR>Dynamically adds queue members</DIV>
<DIV> </DIV>
<DIV>[Description]:<BR>
AddQueueMember(queuename[|interface]):<BR>Dynamically adds interface to an
existing queue<BR>Returns -1 if there is an error.<BR>Example:
AddQueueMember(techsupport|SIP/3000)</DIV>
<DIV> </DIV>
<DIV>*CLI><BR></DIV>
<DIV><FONT face=Arial size=2>Or, you must declare only one extension for
all agents, i.e:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>;LogOn and LogOff in queue: cola<BR>exten =>
icola,1,EAGI(opinc.php,cola)<BR>exten => icola,2,Hangup<BR>exten =>
dcola,1,EAGI(opdel.php,cola)<BR>exten => dcola,2,Hangup<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The AGIs contains:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-----------> opinc.php:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>#!/usr/bin/php
-q<BR><?php<BR>ob_implicit_flush(true);<BR>set_time_limit(0);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>function sm($texto) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>echo("VERBOSE \"".$texto."\"\n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>function se($comando) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>echo("exec $comando\n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>//MAIN PROCEDURE</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$err = fopen("php://stderr","w");<BR>$in =
fopen("php://stdin","r");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>while (!feof($in))
{<BR> $temp =
str_replace("\n","",fgets($in,4096));<BR>
$s = split(":",$temp);<BR>
$agi[str_replace("agi_","",$s[0])] = trim($s[1]);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(($temp == "") || ($temp == "\n"))
{<BR>
break;<BR> }<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>$cid=trim($agi["callerid"]);<BR>$ext=trim($agi["extension"]);<BR>$tec=trim($agi["type"]);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>$rt1=strpos($cid,"<");<BR>$rt2=strpos($cid,">");<BR>if
(strpos($cid,"<")>0) {<BR>
$cid=trim(substr($cid,($rt1+1),(($rt2-$rt1)-1)));<BR>} else
{<BR>
$cid=trim($cid);<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$cid=stripslashes($cid);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$cola=$argv[1];</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>se("AddQueueMember $cola
$tec/$cid");<BR>se("Playback agent-loginok");<BR>sm("Agent '$tec/$cid' was
included in queue '$cola'");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>?><BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-----------> opdel.php:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>#!/usr/bin/php
-q<BR><?php<BR>ob_implicit_flush(true);<BR>set_time_limit(0);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>function sm($texto) {</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>echo("VERBOSE \"".$texto."\"\n");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>function se($comando) {</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>echo("exec $comando\n");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>//MAIN PROCEDURE</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$err = fopen("php://stderr","w");<BR>$in =
fopen("php://stdin","r");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>while (!feof($in))
{<BR> $temp =
str_replace("\n","",fgets($in,4096));<BR>
$s = split(":",$temp);<BR>
$agi[str_replace("agi_","",$s[0])] = trim($s[1]);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if
(($temp == "") || ($temp == "\n"))
{<BR>
break;<BR> }<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>$cid=trim($agi["callerid"]);<BR>$ext=trim($agi["extension"]);<BR>$tec=trim($agi["type"]);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>$rt1=strpos($cid,"<");<BR>$rt2=strpos($cid,">");<BR>if
(strpos($cid,"<")>0) {<BR>
$cid=trim(substr($cid,($rt1+1),(($rt2-$rt1)-1)));<BR>} else
{<BR>
$cid=trim($cid);<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$cid=stripslashes($cid);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$cola=$argv[1];</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>se("RemoveQueueMember $cola
$tec/$cid");<BR>se("Playback agent-loggedoff");<BR>sm("Agent '$tec/$cid' was
removed from queue '$cola'");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>?><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I know, the code is dirty... but it works for
me.</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>Hope this helps,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV> </DIV>
<DIV>Gus</DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT></DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Shad.Mortazavi@nexusmgmt.com
href="mailto:Shad.Mortazavi@nexusmgmt.com">Shad Mortazavi</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-users@lists.digium.com
href="mailto:'asterisk-users@lists.digium.com'">'asterisk-users@lists.digium.com'</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, December 29, 2003 4:50
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Asterisk-Users] Agent
setup</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Dear
Group,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have been successful in setting
up the Agents, queues and getting agents to log
in.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there a way that I could
configure the system so that the agent is called back. i.e. the agent logs
into the system, a call is destined for them and their phone
rings.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">If some one has this setup I would
be very interested in hearing from them.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Warm Regards and
Thanks<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Courier size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-no-proof: yes">---------------</SPAN></FONT><SPAN
style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
<P class=MsoNormal><FONT face=Courier size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-no-proof: yes">Shad
Mortazavi</SPAN></FONT><SPAN style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
<P class=MsoNormal><FONT face=Courier size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-no-proof: yes">US Technical
Manager</SPAN></FONT><SPAN style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
<P class=MsoNormal><FONT face=Courier size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-no-proof: yes">Nexus
Management</SPAN></FONT><SPAN style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt; mso-no-proof: yes"> </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 12pt"><o:p></o:p></SPAN></FONT> </P></DIV></BLOCKQUOTE></BODY></HTML>