<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=AST&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/AST/Call+Queues?focusedCommentId=10649879#comment-10649879">Call Queues</a></h2>
    <h4>Comment edited by             <a href="https://wiki.asterisk.org/wiki/display/~shayne.alone@gmail.com">AliReza Taleghani</a>
     :</h4>
    <br/>
                        <h4>Changes (15)</h4>
                                
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-changed-lines" >it seems to be a better job :-){tip}exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,1,Noop(Calling</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,1,Noop(Calling</span> from $\{CALLERID(all)}.) <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,MYSQL(Connect</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,MYSQL(Connect</span> connid localhost astuser astpass events_lookup) <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,MYSQL(Query</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,MYSQL(Query</span> resultid $\{connid} SELECT name FROM callers where phone = &#39;$\{CALLERID(num)}&#39;); <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,MYSQL(Fetch</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,MYSQL(Fetch</span> fetchid $\{resultid} CALLERID(name)) <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,MYSQL(Disconnect</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,MYSQL(Disconnect</span> $\{connid}) <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,Noop(Calling</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,Noop(Calling</span> from $\{CALLERID(all)}.) <br></td></tr>
            <tr><td class="diff-changed-lines" >;exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,Answer()</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,Answer()</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >;exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,Dial(SIP/8552,,,www.google.com)</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,Dial(SIP/8552,,,www.google.com)</span> <br></td></tr>
            <tr><td class="diff-unchanged" >;we will check it there is no logged in member, or callers queue is over 10 or the free  <br>;members are less that 5! and if non match, will queue the callers on provinces! <br>;otherwise will queue it on central! <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n(chkpresent),Gotoif($\[$\{QUEUE_MEMBER(support-provinces,logged)}=0]?sendtocentral:chkqueload)</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n(chkpresent),Gotoif($\[$\{QUEUE_MEMBER(support-provinces,logged)}=0]?sendtocentral:chkqueload)</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n(chkqueload),Gotoif($\[$\{QUEUE_WAITING_COUNT(support-provinces)}&gt;$\{QUEUE_VARIABLES(QUEUEMAX)}]?sendtocentral:chkfreemem)</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n(chkqueload),Gotoif($\[$\{QUEUE_WAITING_COUNT(support-provinces)}&gt;$\{QUEUE_VARIABLES(QUEUEMAX)}]?sendtocentral:chkfreemem)</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n(chkfreemem),Gotoif($\[$\{QUEUE_MEMBER(support-provinces,free)}&gt;5]?sendtocentral:sendtoprovinces)</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n(chkfreemem),Gotoif($\[$\{QUEUE_MEMBER(support-provinces,free)}&gt;5]?sendtocentral:sendtoprovinces)</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n(sendtoprovinces),Queue(support-provinces,t,,,,,,,,1)</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n(sendtoprovinces),Queue(support-provinces,t,,,,,,,,1)</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,hangup()</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,hangup()</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n(sendtocentral),Queue(support-central,t,,,,,,,,1)</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n(sendtocentral),Queue(support-central,t,,,,,,,,1)</span> <br></td></tr>
            <tr><td class="diff-changed-lines" >exten =&gt; <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">23089000/_0936322ZXZZ,n,hangup(){tip}</span> <span class="diff-added-words"style="background-color: #dfd;">4389000/_093432ZXZZ,n,hangup(){tip}</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                          <div class="notificationGreySide">
            <p>it seems to be a better job <img class="emoticon" src="/wiki/images/icons/emoticons/smile.gif" height="20" width="20" align="absmiddle" alt="" border="0"/></p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>exten =&gt; 4389000/_093432ZXZZ,1,Noop(Calling from ${CALLERID(all)}.)<br/>
exten =&gt; 4389000/_093432ZXZZ,n,MYSQL(Connect connid localhost astuser astpass events_lookup)<br/>
exten =&gt; 4389000/_093432ZXZZ,n,MYSQL(Query resultid ${connid} SELECT name FROM callers where phone = '${CALLERID(num)}');<br/>
exten =&gt; 4389000/_093432ZXZZ,n,MYSQL(Fetch fetchid ${resultid} CALLERID(name))<br/>
exten =&gt; 4389000/_093432ZXZZ,n,MYSQL(Disconnect ${connid})<br/>
exten =&gt; 4389000/_093432ZXZZ,n,Noop(Calling from ${CALLERID(all)}.)<br/>
;exten =&gt; 4389000/_093432ZXZZ,n,Answer()<br/>
;exten =&gt; 4389000/_093432ZXZZ,n,Dial(SIP/8552,,,www.google.com)<br/>
;we will check it there is no logged in member, or callers queue is over 10 or the free <br/>
;members are less that 5! and if non match, will queue the callers on provinces!<br/>
;otherwise will queue it on central!<br/>
exten =&gt; 4389000/_093432ZXZZ,n(chkpresent),Gotoif($[${QUEUE_MEMBER(support-provinces,logged)}=0]?sendtocentral:chkqueload)<br/>
exten =&gt; 4389000/_093432ZXZZ,n(chkqueload),Gotoif($[${QUEUE_WAITING_COUNT(support-provinces)}&gt;${QUEUE_VARIABLES(QUEUEMAX)}]?sendtocentral:chkfreemem)<br/>
exten =&gt; 4389000/_093432ZXZZ,n(chkfreemem),Gotoif($[${QUEUE_MEMBER(support-provinces,free)}&gt;5]?sendtocentral:sendtoprovinces)<br/>
exten =&gt; 4389000/_093432ZXZZ,n(sendtoprovinces),Queue(support-provinces,t,,,,,,,,1)<br/>
exten =&gt; 4389000/_093432ZXZZ,n,hangup()<br/>
exten =&gt; 4389000/_093432ZXZZ,n(sendtocentral),Queue(support-central,t,,,,,,,,1)<br/>
exten =&gt; 4389000/_093432ZXZZ,n,hangup()</td></tr></table></div>


<p>of course it's not still ready for a WIKI, i like to modify it as a macro,but<br/>
how should i convert them into a WIKI page?</p>

<p>is it enough to turn them into a label? </p>
        </div>
    
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;" class="grey">
                        <a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
       <a href="https://wiki.asterisk.org/wiki/display/AST/Call+Queues?focusedCommentId=10649879#comment-10649879">View Online</a>
              |
       <a id="reply-10649879" href="https://wiki.asterisk.org/wiki/display/AST/Call+Queues?replyToComment=10649879#comment-10649879">Reply To This</a>
           </div>

</div>
</div>
</div>
</div>
</body>
</html>