[Freeswitch-svn] [commit] r12685 - in freeswitch/trunk: conf/autoload_configs src/mod/applications/mod_fifo
FreeSWITCH SVN
anthm at freeswitch.org
Fri Mar 20 08:28:50 PDT 2009
Author: anthm
Date: Fri Mar 20 10:28:50 2009
New Revision: 12685
Log:
MODAPP-237
Modified:
freeswitch/trunk/conf/autoload_configs/fifo.conf.xml
freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
Modified: freeswitch/trunk/conf/autoload_configs/fifo.conf.xml
==============================================================================
--- freeswitch/trunk/conf/autoload_configs/fifo.conf.xml (original)
+++ freeswitch/trunk/conf/autoload_configs/fifo.conf.xml Fri Mar 20 10:28:50 2009
@@ -1,7 +1,7 @@
<configuration name="fifo.conf" description="FIFO Configuration">
<fifos>
<fifo name="cool_fifo@$${domain}" importance="0">
- <!--<member timeout="60" simo="1" lag="20">user/1005@$${domain}</member>-->
+ <!--<member timeout="60" simo="1" lag="20">{member_wait=nowait}user/1005@$${domain}</member>-->
</fifo>
</fifos>
</configuration>
Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c Fri Mar 20 10:28:50 2009
@@ -449,6 +449,7 @@
switch_caller_extension_t *extension = NULL;
char *app_name, *arg = NULL;
char sql[256] = "";
+ const char *member_wait = NULL;
switch_snprintf(sql, sizeof(sql), "update fifo_outbound set use_count=use_count+1 where uuid='%s'", h->uuid);
fifo_execute_sql(sql, globals.sql_mutex);
@@ -462,10 +463,17 @@
channel = switch_core_session_get_channel(session);
+
+ if ((member_wait = switch_channel_get_variable(channel, "member_wait"))) {
+ if (strcasecmp(member_wait, "wait") && strcasecmp(member_wait, "nowait")) {
+ member_wait = NULL;
+ }
+ }
+
switch_channel_set_variable(channel, "fifo_outbound_uuid", h->uuid);
switch_core_event_hook_add_state_change(session, hanguphook);
app_name = "fifo";
- arg = switch_core_session_sprintf(session, "%s out wait", h->node_name);
+ arg = switch_core_session_sprintf(session, "%s out %s", h->node_name, member_wait ? member_wait : "wait");
extension = switch_caller_extension_new(session, app_name, arg);
switch_caller_extension_add_application(session, extension, app_name, arg);
switch_channel_set_caller_extension(channel, extension);
More information about the Freeswitch-svn
mailing list