mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
MODAPP-237
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12685 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9fa14d5243
commit
6c4f7c9e07
@ -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>
|
||||
|
@ -449,6 +449,7 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
|
||||
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 @@ static void *SWITCH_THREAD_FUNC o_thread_run(switch_thread_t *thread, void *obj)
|
||||
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user