mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-13 18:51:01 +00:00
mutiple transfers in conf
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3643 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1d53a51f9d
commit
6a25dae421
@ -2274,10 +2274,12 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(argv[1], "transfer")) {
|
} else if (!strcasecmp(argv[1], "transfer")) {
|
||||||
char *transfer_usage = "Usage transfer <id> <confname>\n";
|
char *transfer_usage = "Usage transfer <confname> <id> [..<idN>]\n";
|
||||||
if (argc > 3) {
|
if (argc > 3) {
|
||||||
|
int x = 0;
|
||||||
|
for(x = 3; x < argc; x++) {
|
||||||
conference_member_t *member = NULL;
|
conference_member_t *member = NULL;
|
||||||
uint32_t id = atoi(argv[2]);
|
uint32_t id = atoi(argv[x]);
|
||||||
conference_obj_t *new_conference = NULL;
|
conference_obj_t *new_conference = NULL;
|
||||||
switch_channel_t *channel;
|
switch_channel_t *channel;
|
||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
@ -2286,12 +2288,12 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session,
|
|||||||
|
|
||||||
if (!(member = conference_member_get(conference, id))) {
|
if (!(member = conference_member_get(conference, id))) {
|
||||||
stream->write_function(stream, "No Member %u in conference %s.\n", id, conference->name);
|
stream->write_function(stream, "No Member %u in conference %s.\n", id, conference->name);
|
||||||
goto done;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(member->session);
|
channel = switch_core_session_get_channel(member->session);
|
||||||
|
|
||||||
if (!(new_conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, argv[3]))) {
|
if (!(new_conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, argv[2]))) {
|
||||||
switch_memory_pool_t *pool;
|
switch_memory_pool_t *pool;
|
||||||
char *conf_name;
|
char *conf_name;
|
||||||
|
|
||||||
@ -2301,7 +2303,7 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf_name = switch_core_strdup(pool, argv[3]);
|
conf_name = switch_core_strdup(pool, argv[2]);
|
||||||
|
|
||||||
if ((profile_name = strchr(conf_name, '@'))) {
|
if ((profile_name = strchr(conf_name, '@'))) {
|
||||||
*profile_name++ = '\0';
|
*profile_name++ = '\0';
|
||||||
@ -2355,7 +2357,7 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session,
|
|||||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
|
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "transfer");
|
||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
stream->write_function(stream, transfer_usage);
|
stream->write_function(stream, transfer_usage);
|
||||||
goto done;
|
goto done;
|
||||||
@ -3211,7 +3213,7 @@ static switch_api_interface_t conf_api_interface = {
|
|||||||
"\t<confname> lock\n"
|
"\t<confname> lock\n"
|
||||||
"\t<confname> unlock\n"
|
"\t<confname> unlock\n"
|
||||||
"\t<confname> dial <endpoint_module_name>/<destination>\n"
|
"\t<confname> dial <endpoint_module_name>/<destination>\n"
|
||||||
"\t<confname> transfer <member_id> <conference_name>\n"
|
"\t<confname> transfer <conference_name> <member_id_1> [...<member_id_N>]\n"
|
||||||
"\t<confname> record <filename>\n"
|
"\t<confname> record <filename>\n"
|
||||||
"\t<confname> norecord <[filename|all]>\n",
|
"\t<confname> norecord <[filename|all]>\n",
|
||||||
/*.next */
|
/*.next */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user