bluez5: backend-native: Add ATDdd...dd; support

This allows to dial a number.

Memory dialing (ATD>nnn...;) is not supported as it requests access to
the contact application.
This commit is contained in:
Frédéric Danis 2022-09-16 15:30:52 +02:00 committed by Wim Taymans
parent 20572a1789
commit 3566b0739b
3 changed files with 138 additions and 0 deletions

View file

@ -1087,6 +1087,20 @@ next_indicator:
rfcomm_send_error(rfcomm, error);
return true;
}
} else if (spa_strstartswith(buf, "ATD")) {
char number[30];
enum cmee_error error;
if (sscanf(buf, "ATD%30s;", number) != 1) {
spa_log_debug(backend->log, "Failed to parse ATD: \"%s\"", buf);
rfcomm_send_error(rfcomm, CMEE_AG_FAILURE);
return true;
}
if (!mm_do_call(backend->modemmanager, number, rfcomm, &error)) {
rfcomm_send_error(rfcomm, error);
return true;
}
} else if (spa_strstartswith(buf, "AT+CHUP")) {
enum cmee_error error;