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"><<a href="mailto:herman@hermangriffin.com">herman@hermangriffin.com</a>></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'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>
<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>