<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.5">
</HEAD>
<BODY>
Hello,<BR>
<BR>
Anthony, I would like to provide a patch allowing having different call distribution strategies, at least for &quot;call back&quot; agents.<BR>
<BR>
Do you think the simple approach of modifying the SQL query in find_consumers (given strategy that would be set from dialplan) would be enough?<BR>
<BR>
Thanks,<BR>
Fran&#231;ois.<BR>
<BR>
On Mon, 2009-05-04 at 08:25 -0500, Anthony Minessale wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    On Sun, May 3, 2009 at 11:01 PM, seven &lt;<A HREF="mailto:dujinfang@gmail.com">dujinfang@gmail.com</A>&gt; wrote:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        Actually, for the &quot;call back&quot; agents, because the fifo use originate to start a new session, the new session won't hang up unless one agent answered or timeout. Agents will hear nothing and wait(member_wait=wait)&nbsp;on the queue&nbsp;or hanup(nowait) if caller hang up before an agent answer the phone. '
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
    When you are using on-hook agents, it's presumed to be under low call volume, you can just set the agents to get popped<BR>
    into the queue in nowait mode so if the caller changed his mind the agent will get a hangup.&nbsp; Remember, if there are X customers in the queue, mod_fifo generates X outbound calls to try to service them. <BR>
    <BR>
    <BR>
    &nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        And I also found out the the member timeout doesn't work but call_timeout works in a dial string. Is it a bug I should reported to jira?&nbsp;
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        &nbsp;&nbsp; &nbsp;&lt;fifo name=&quot;sales_fifo@$${domain}&quot; importance=&quot;0&quot;&gt;
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        &nbsp;&nbsp; &nbsp; &nbsp;&lt;member timeout=&quot;10&quot; simo=&quot;1&quot; lag=&quot;5&quot;&gt;{call_timeout=6,fifo_member_wait=nowait}user/1009@$${domain}&lt;/member&gt;
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        &nbsp;&nbsp; &nbsp;&lt;/fifo&gt;
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
    call_timeout is only valid on inbound legs to set the timeout it's willing to wait for a caller to answer.&nbsp; You are confusing it with leg_timeout which is designed to go in the {}<BR>
    <BR>
    &nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        And even the timeout works, it's not ideal. It's better to bridge to an agent other than originate I think. Keep looking.
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    I am not sure what you mean by that.&nbsp; bridge instead of originate?&nbsp; The process is to originate the call and then bridge the agent to the caller.&nbsp; All calls in FS start out as origiante???? <BR>
    <BR>
    If you want app_queue you are welcome to download and use it from <A HREF="http://www.asterisk.org">http://www.asterisk.org</A><BR>
    <BR>
    &nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        On Apr 29, 2009, at 4:27 PM, Fran&#231;ois Delawarde wrote:
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BLOCKQUOTE TYPE=CITE>
            Hi,<BR>
            <BR>
            It should be easy to modify mod_fifo to include this functionality.<BR>
            <BR>
            Correct me if I'm wrong:<BR>
            For &quot;call back&quot; agents at least, when X calls are in the the queue, Freeswitch tries to search for up to X agents in database. This algorithm is much more optimized than Asterisk, as Asterisk will take calls one by one and try to connect them to an agent, it should then stay as it is.<BR>
            <BR>
            The simplest idea to control the call distribution algorithm would be to modify the database query in the &quot;find_consumers&quot; function (right now, the algorithm is: &quot;order by outbound_call_count&quot;). A variable could control the &quot;order by&quot; of this query, and the problem would be solved at least for &quot;call back&quot; agents. I guess sqlite3 should allow very complex queries, but I don't know if there could be performance issues.<BR>
            <BR>
            Do you think it is a possible -trivial- solution?<BR>
            <BR>
            Fran&#231;ois.<BR>
            <BR>
            On Wed, 2009-04-29 at 08:46 +0200, Antonio Gallo wrote: 
            <BLOCKQUOTE TYPE=CITE>
<PRE>
seven ha scritto:
&gt; oh, thank you Antonio. I think it would be better to collect more  
&gt; ideas before open a bounty. And I more interested in playing(including  
&gt; patching the code) with that than use the function.
&gt;   
I was working on other stuff yesterday and just looked at the wiki:
- it seems there is already a bounty for something like that;
- there is a wiki page about how to implement it with Javascript, ofc 
you need to tailor it to your own needs;

AgX



_______________________________________________
Freeswitch-users mailing list
<A HREF="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A>
<A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A>
UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A>
<A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A>
</PRE>
            </BLOCKQUOTE>
        </BLOCKQUOTE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BLOCKQUOTE TYPE=CITE>
            _______________________________________________<BR>
            Freeswitch-users mailing list<BR>
            <A HREF="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR>
            <A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>
            UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR>
            <A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A>
        </BLOCKQUOTE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        _______________________________________________<BR>
        Freeswitch-users mailing list<BR>
        <A HREF="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR>
        <A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>
        UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR>
        <A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A><BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
    <BR>
    -- <BR>
    Anthony Minessale II<BR>
    <BR>
    FreeSWITCH <A HREF="http://www.freeswitch.org/">http://www.freeswitch.org/</A><BR>
    ClueCon <A HREF="http://www.cluecon.com/">http://www.cluecon.com/</A><BR>
    <BR>
    AIM: anthm<BR>
    <A HREF="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</A><BR>
    GTALK/JABBER/<A HREF="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</A><BR>
    IRC: <A HREF="http://irc.freenode.net">irc.freenode.net</A> #freeswitch<BR>
    <BR>
    FreeSWITCH Developer Conference<BR>
    <A HREF="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</A><BR>
    <A HREF="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</A><BR>
    <A HREF="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</A><BR>
    pstn:213-799-1400
<PRE>
_______________________________________________
Freeswitch-users mailing list
<A HREF="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A>
<A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A>
UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A>
<A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>