diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-11-24 21:56:16 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-11-28 10:31:15 -0600 |
commit | 11014653052207f89f424ef0d06263fc69a67a83 (patch) | |
tree | dc8b9fd8ff09caaed0c6a78e5552c5d4cd1434ee /src/stk.c | |
parent | fb16241aba9b9e2c999b48626ffffab1d4930689 (diff) | |
download | ofono-11014653052207f89f424ef0d06263fc69a67a83.tar.bz2 |
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 }
Diffstat (limited to 'src/stk.c')
-rw-r--r-- | src/stk.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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); |