Skip to content

Commit

Permalink
tapi: support hangup-all-multiparty
Browse files Browse the repository at this point in the history
  • Loading branch information
xujianhang-xiaomi authored and huangcaihua-xm committed Dec 24, 2024
1 parent 15d01f3 commit 4cf0d36
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tapi_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ int tapi_call_separate_call(tapi_context context,

int tapi_call_hangup_multiparty(tapi_context context, int slot_id)
{
return manage_call_proxy_method(context, slot_id, "multiparty_hangup");
return manage_call_proxy_method(context, slot_id, "HangupMultiparty");
}

int tapi_call_send_tones(void* context, int slot_id, char* tones)
Expand Down
19 changes: 19 additions & 0 deletions tools/telephony_tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,22 @@ static int telephonytool_cmd_hangup_all(tapi_context context, char* pargs)
return tapi_call_hangup_all_calls(context, atoi(slot_id));
}

static int telephonytool_cmd_hangup_multiparty(tapi_context context, char* pargs)
{
char* slot_id;
char* temp;

if (strlen(pargs) == 0)
return -EINVAL;

slot_id = strtok_r(pargs, " ", &temp);
if (!is_valid_slot_id_str(slot_id))
return -EINVAL;

syslog(LOG_DEBUG, "%s, slotId : %s\n", __func__, slot_id);
return tapi_call_hangup_multiparty(context, atoi(slot_id));
}

static int telephonytool_cmd_hangup_by_id(tapi_context context, char* pargs)
{
char dst[2][MAX_INPUT_ARGS_LEN];
Expand Down Expand Up @@ -4465,6 +4481,9 @@ static struct telephonytool_cmd_s g_telephonytool_cmds[] = {
{ "hangup-all", CALL_CMD,
telephonytool_cmd_hangup_all,
"hangup all call (enter example : hangup-all 0 [slot_id])" },
{ "hangup-all-multiparty", CALL_CMD,
telephonytool_cmd_hangup_multiparty,
"hang up all multiparty calls (enter example : hangup-multiparty 0 [slot_id])" },
{ "get-call", CALL_CMD,
telephonytool_cmd_get_call,
"get call list/call info (enter example : get-call 0 "
Expand Down

0 comments on commit 4cf0d36

Please sign in to comment.