Currently, the call direction can only be inferred from the signals.
This adds a property to keep it visible also from GetCalls().
---
src/voicecall.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/voicecall.c b/src/voicecall.c
index 7e2b3f0..d454d9d 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -352,7 +352,7 @@ static void append_voicecall_properties(struct voicecall *v,
const char *callerid;
const char *timestr;
const char *name;
- ofono_bool_t mpty;
+ ofono_bool_t mpty, originated;
dbus_bool_t emergency_call;
status = call_status_to_string(call->status);
@@ -391,6 +391,10 @@ static void append_voicecall_properties(struct voicecall *v,
×tr);
}
+ originated = call->direction == CALL_DIRECTION_MOBILE_ORIGINATED;
+ ofono_dbus_dict_append(dict, "Originated", DBUS_TYPE_BOOLEAN,
+ &originated);
+
if (g_slist_find_custom(v->vc->multiparty_list,
GINT_TO_POINTER(call->id), call_compare_by_id))
mpty = TRUE;
--
1.7.1
Show replies by date
---
doc/voicecall-api.txt | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/doc/voicecall-api.txt b/doc/voicecall-api.txt
index 047b8cb..2feb215 100644
--- a/doc/voicecall-api.txt
+++ b/doc/voicecall-api.txt
@@ -102,6 +102,11 @@ Properties string LineIdentification [readonly]
Contains the Name Identification information returned
by the network, if present.
+ boolean Originated [readonly]
+
+ Indicates whether the call was mobile-originated
+ (true) or mobile-terminated (false).
+
boolean Multiparty [readonly]
Contains the indication if the voice call is part
--
1.7.1