int custom_pop = 0;
int pop_array[MAX_PRI] = { 0 };
char *pop_list[MAX_PRI] = { 0 };
-
+ const char *fifo_consumer_wrapup_sound = NULL;\r
+ const char *fifo_consumer_wrapup_key = NULL;\r
+ char buf[5] = "";
+
if (argc > 3) {
announce = argv[3];
}
while(switch_channel_ready(channel)) {
int x = 0 ;
+ pop = NULL;
+
if (moh) {
args.read_frame_callback = read_frame_callback;
args.user_data = node;
}
uuid = (char *) pop;
+ pop = NULL;
if ((other_session = switch_core_session_locate(uuid))) {
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
if (nowait) {
done = 1;
}
- }
+\r
+ fifo_consumer_wrapup_sound = switch_channel_get_variable(channel, "fifo_consumer_wrapup_sound");\r
+ fifo_consumer_wrapup_key = switch_channel_get_variable(channel, "fifo_consumer_wrapup_key");\r
+ memset(buf, 0, sizeof(buf));\r
+\r
+ if (!switch_strlen_zero(fifo_consumer_wrapup_sound)) {\r
+ args.buf = buf;\r
+ args.buflen = sizeof(buf);\r
+\r
+ memset(&args, 0, sizeof(args));\r
+ switch_ivr_play_file(session, NULL, fifo_consumer_wrapup_sound, &args);\r
+ }\r
+\r
+ if (!switch_strlen_zero(fifo_consumer_wrapup_key) && strcmp(buf, fifo_consumer_wrapup_key)) {\r
+ for(;;) {\r
+ char terminator = 0; \r
+ switch_ivr_collect_digits_count(session, buf, sizeof(buf)-1, 1, fifo_consumer_wrapup_key, &terminator, 0, 0, 0);\r
+ if (terminator == *fifo_consumer_wrapup_key) {\r
+ break;\r
+ }\r
+ }\r
+ }
+ }
switch_safe_free(uuid);