The variable way is ok since you can set it in the dial string you set in the config anyway so you have the best of both worlds.<br>Can you submit the patch via jira please <a href="http://jira.freeswitch.org">http://jira.freeswitch.org</a>, patches in email tend to get broken by whitespace changes etc.<br>
<br><br><br><div class="gmail_quote">On Sun, Mar 15, 2009 at 7:23 PM, Herman Griffin <span dir="ltr">&lt;<a href="mailto:herman@hermangriffin.com">herman@hermangriffin.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The consumer callback that has been added to mod_fifo is great. I&#39;ve been looking for this feature for a long time.<br>However, in it&#39;s current state it still has the problem that I was trying to avoid in the first place; I don&#39;t want agents<br>

to just be sitting around waiting for callers with their phone off the hook.<br><br>I made a slight modification mod_fifo.c that makes the &quot;waiting around&quot; an option. If you set the channel following channel<br>

variable in the originate string for agents in fifo.conf.xml, then the consumers phone will either hangup or stay off hook when<br>they answer a queue calls:<br><br>member_wait = wait|nowait<br><br>nowait: agents phone hangs up<br>

wait: agents wait around<br><br><br>I&#39;m including a patched for mod_fifo.c and fifo.conf.xml.<br><br>li53-164:~/fstrunk# svn diff src/mod/applications/mod_fifo/mod_fifo.c conf/autoload_configs/fifo.conf.xml<br>Index: src/mod/applications/mod_fifo/mod_fifo.c<br>

===================================================================<br>--- src/mod/applications/mod_fifo/mod_fifo.c    (revision 12607)<br>+++ src/mod/applications/mod_fifo/mod_fifo.c    (working copy)<br>@@ -462,10 +462,23 @@<br>

<br><br>        channel = switch_core_session_get_channel(session);<br>+<br>+       /*Add option to wait on not wait*/<br>+       const char *member_wait = NULL;<br>+       member_wait = switch_channel_get_variable(channel, &quot;member_wait&quot;);<br>

+<br>+       /*if the member_wait channel variable is NULL or not set to &quot;wait&quot; or &#39;nowait&quot;<br>+               then default to &quot;wait&quot;<br>+       */<br>+       if( NULL == member_wait || !( !strcasecmp(member_wait, &quot;wait&quot;) || !strcasecmp(member_wait, &quot;nowait&quot;) ) )<br>

+       {<br>+               member_wait = &quot;wait&quot;;<br>+       }<br>+<br>        switch_channel_set_variable(channel, &quot;fifo_outbound_uuid&quot;, h-&gt;uuid);<br>        switch_core_event_hook_add_state_change(session, hanguphook);<br>

        app_name = &quot;fifo&quot;;<br>-       arg = switch_core_session_sprintf(session, &quot;%s out wait&quot;, h-&gt;node_name);<br>+       arg = switch_core_session_sprintf(session, &quot;%s out %s&quot;, h-&gt;node_name, member_wait); /*Add option to wait or not wait*/<br>

        extension = switch_caller_extension_new(session, app_name, arg);<br>        switch_caller_extension_add_application(session, extension, app_name, arg);<br>        switch_channel_set_caller_extension(channel, extension);<br>

Index: conf/autoload_configs/fifo.conf.xml<br>===================================================================<br>--- conf/autoload_configs/fifo.conf.xml (revision 12607)<br>+++ conf/autoload_configs/fifo.conf.xml (working copy)<br>

@@ -1,7 +1,7 @@<br> &lt;configuration name=&quot;fifo.conf&quot; description=&quot;FIFO Configuration&quot;&gt;<br>   &lt;fifos&gt;<br>     &lt;fifo name=&quot;cool_fifo@$${domain}&quot; importance=&quot;0&quot;&gt;<br>-      &lt;!--&lt;member timeout=&quot;60&quot; simo=&quot;1&quot; lag=&quot;20&quot;&gt;user/1005@$${domain}&lt;/member&gt;--&gt;<br>

+      &lt;!--&lt;member timeout=&quot;60&quot; simo=&quot;1&quot; lag=&quot;20&quot;&gt;{member_wait=nowait}user/1005@$${domain}&lt;/member&gt;--&gt;<br>     &lt;/fifo&gt;<br>   &lt;/fifos&gt;<br> &lt;/configuration&gt;<br>

<br><br>An alternate approach is to make the &#39;member_wait&quot; option an attribute in the member tag, which would be more elegant.<br>However is would require changes to funtions and the fifo_outbound table. I&#39;m sure I could whip that up pretty quickly too.<br>

<br>However, I don&#39;t want to spend my time doing it without feedback from you all? Please provide some input to the usefulness<br>of this option and and ideas that you have.<br><br>./herman<br>freenode: frek310<br><br>

<br>_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><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<br>