From 11014653052207f89f424ef0d06263fc69a67a83 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Sat, 24 Nov 2012 21:56:16 -0600 Subject: stk: Fix Set Up Call with pause characters Set Up Call with extra DTMF characters after the phone number should be set up with only the dialed number. Otherwise we get a sequence like this: {VoiceCallManager} [CallAdded] /ifx_0/voicecall01 { LineIdentification = +012340123456c1c2, Name = , Emergency = False, Multiparty = False, RemoteHeld = False, State = alerting, RemoteMultiparty = False } --- src/stk.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/stk.c') diff --git a/src/stk.c b/src/stk.c index f181964c..5ca02504 100644 --- a/src/stk.c +++ b/src/stk.c @@ -1870,6 +1870,8 @@ static void confirm_handled_call_cb(enum stk_agent_result result, const struct stk_command_setup_call *sc = &stk->pending_cmd->setup_call; struct ofono_voicecall *vc; + char number[256]; + char *pause_chr; if (stk->driver->user_confirmation == NULL) goto out; @@ -1879,6 +1881,17 @@ static void confirm_handled_call_cb(enum stk_agent_result result, goto out; } + if (convert_to_phone_number_format(sc->addr.number, number) == FALSE) { + stk->driver->user_confirmation(stk, FALSE); + goto out; + } + + /* Remove the DTMF string from the phone number */ + pause_chr = strchr(number, 'p'); + + if (pause_chr) + number[pause_chr - number] = '\0'; + stk->driver->user_confirmation(stk, confirm); vc = __ofono_atom_find(OFONO_ATOM_TYPE_VOICECALL, @@ -1886,7 +1899,7 @@ static void confirm_handled_call_cb(enum stk_agent_result result, if (vc == NULL) goto out; - __ofono_voicecall_set_alpha_and_icon_id(vc, sc->addr.number, + __ofono_voicecall_set_alpha_and_icon_id(vc, number, sc->addr.ton_npi, sc->alpha_id_call_setup, sc->icon_id_call_setup.id); -- cgit v1.2.3