Handle the request to dial from a memory index and send the
correct ATD> sequence
---
drivers/hfpmodem/voicecall.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index fc5210bb..f40903c2 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -404,6 +404,28 @@ static void hfp_dial(struct ofono_voicecall *vc,
CALLBACK_WITH_FAILURE(cb, data);
}
+static void hfp_dial_memory(struct ofono_voicecall *vc,
+ long int memory_location,
+ enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+ void *data)
+{
+ struct voicecall_data *vd = ofono_voicecall_get_data(vc);
+ struct cb_data *cbd = cb_data_new(cb, data);
+ char buf[256];
+
+ cbd->user = vc;
+ snprintf(buf, sizeof(buf), "ATD>%ld", memory_location);
+
+ strcat(buf, ";");
+
+ if (g_at_chat_send(vd->chat, buf, none_prefix,
+ atd_cb, cbd, g_free) > 0)
+ return;
+
+ g_free(cbd);
+
+ CALLBACK_WITH_FAILURE(cb, data);
+}
static void hfp_dial_last(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb,
void *data)
{
@@ -1287,6 +1309,7 @@ static struct ofono_voicecall_driver driver = {
.probe = hfp_voicecall_probe,
.remove = hfp_voicecall_remove,
.dial = hfp_dial,
+ .dial_memory = hfp_dial_memory,
.dial_last = hfp_dial_last,
.answer = hfp_answer,
.hangup_active = hfp_hangup,
--
2.14.2
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono