The consumer callback that has been added to mod_fifo is great. I've been looking for this feature for a long time.<br>However, in it's current state it still has the problem that I was trying to avoid in the first place; I don'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 "waiting around" 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'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, "member_wait");<br>
+<br>+ /*if the member_wait channel variable is NULL or not set to "wait" or 'nowait"<br>+ then default to "wait"<br>+ */<br>+ if( NULL == member_wait || !( !strcasecmp(member_wait, "wait") || !strcasecmp(member_wait, "nowait") ) )<br>
+ {<br>+ member_wait = "wait";<br>+ }<br>+<br> switch_channel_set_variable(channel, "fifo_outbound_uuid", h->uuid);<br> switch_core_event_hook_add_state_change(session, hanguphook);<br>
app_name = "fifo";<br>- arg = switch_core_session_sprintf(session, "%s out wait", h->node_name);<br>+ arg = switch_core_session_sprintf(session, "%s out %s", h->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> <configuration name="fifo.conf" description="FIFO Configuration"><br> <fifos><br> <fifo name="cool_fifo@$${domain}" importance="0"><br>- <!--<member timeout="60" simo="1" lag="20">user/1005@$${domain}</member>--><br>
+ <!--<member timeout="60" simo="1" lag="20">{member_wait=nowait}user/1005@$${domain}</member>--><br> </fifo><br> </fifos><br> </configuration><br>
<br><br>An alternate approach is to make the 'member_wait" 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'm sure I could whip that up pretty quickly too.<br>
<br>However, I don'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>