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;
|
||||
}
|
||||
} 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) {
|
||||
int x = 0;
|
||||
for(x = 3; x < argc; x++) {
|
||||
conference_member_t *member = NULL;
|
||||
uint32_t id = atoi(argv[2]);
|
||||
uint32_t id = atoi(argv[x]);
|
||||
conference_obj_t *new_conference = NULL;
|
||||
switch_channel_t *channel;
|
||||
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))) {
|
||||
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);
|
||||
|
||||
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;
|
||||
char *conf_name;
|
||||
|
||||
|
@ -2301,7 +2303,7 @@ static switch_status_t conf_function(char *buf, switch_core_session_t *session,
|
|||
goto done;
|
||||
}
|
||||
|
||||
conf_name = switch_core_strdup(pool, argv[3]);
|
||||
conf_name = switch_core_strdup(pool, argv[2]);
|
||||
|
||||
if ((profile_name = strchr(conf_name, '@'))) {
|
||||
*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_fire(&event);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, transfer_usage);
|
||||
goto done;
|
||||
|
@ -3211,7 +3213,7 @@ static switch_api_interface_t conf_api_interface = {
|
|||
"\t<confname> lock\n"
|
||||
"\t<confname> unlock\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> norecord <[filename|all]>\n",
|
||||
/*.next */
|
||||
|
|
Loading…
Reference in New Issue