diff --git a/src/hfp_ag.c b/src/hfp_ag.c index 3e2065522..609577449 100644 --- a/src/hfp_ag.c +++ b/src/hfp_ag.c @@ -1454,7 +1454,6 @@ static void hfp_ag_call_sm(hfp_ag_call_event_t event, hfp_connection_t * connect break; } case HFP_AG_OUTGOING_CALL_RINGING: - // hfp_gsm_handle_event(); connection = hfp_ag_connection_for_call_state(HFP_CALL_OUTGOING_DIALING); if (!connection){ log_info("hfp_ag_call_sm: did not find outgoing connection in dialing state"); @@ -2274,5 +2273,8 @@ void hfp_ag_set_subcriber_number_information(hfp_phone_number_t * numbers, int n subscriber_numbers_count = numbers_count; } +void hfp_ag_clear_last_dialed_number(void){ + hfp_gsm_clear_last_dialed_number(); +} diff --git a/src/hfp_ag.h b/src/hfp_ag.h index 74bcd8e8a..6df0ba6cd 100644 --- a/src/hfp_ag.h +++ b/src/hfp_ag.h @@ -302,6 +302,11 @@ void hfp_ag_accept_held_incoming_call(void); */ void hfp_ag_reject_held_incoming_call(void); +/* + * @brief + */ +void hfp_ag_clear_last_dialed_number(void); + /* API_END */ #if defined __cplusplus diff --git a/test/hfp/hfp_ag_client_test.c b/test/hfp/hfp_ag_client_test.c index 28a999d94..b7b6829f4 100644 --- a/test/hfp/hfp_ag_client_test.c +++ b/test/hfp/hfp_ag_client_test.c @@ -218,10 +218,11 @@ static void user_command(char cmd){ break; case 'l': printf("Last dialed number cleared\n"); - hfp_gsm_clear_last_dialed_number(); + hfp_ag_clear_last_dialed_number(); break; case 'L': - printf("Last dialed number set\n"); + printf("Outgoing call connected, ringing\n"); + hfp_ag_outgoing_call_ringing(); break; case 'n': printf("Disable Voice Recognition\n"); @@ -394,8 +395,6 @@ void packet_handler(uint8_t * event, uint16_t event_size){ || (memory_1_enabled && strcmp(">1", (char*) &event[3]) == 0)){ printf("Dialstring valid: accept call\n"); hfp_ag_outgoing_call_accepted(); - // TODO: calling ringing right away leads to callstatus=2 being skipped. don't call for now - // hfp_ag_outgoing_call_ringing(); } else { printf("Dialstring invalid: reject call\n"); hfp_ag_outgoing_call_rejected(); diff --git a/test/pts/hfp_ag_test.c b/test/pts/hfp_ag_test.c index d9a06851c..9071ec898 100644 --- a/test/pts/hfp_ag_test.c +++ b/test/pts/hfp_ag_test.c @@ -469,11 +469,12 @@ static int stdin_process(struct data_source *ds){ case 'l': log_info("USER:\'%c\'", cmd); printf("Last dialed number cleared\n"); - hfp_gsm_clear_last_dialed_number(); + hfp_af_clear_last_dialed_number(); break; case 'L': log_info("USER:\'%c\'", cmd); - printf("Last dialed number set\n"); + printf("Outgoing call connected, ringing\n"); + hfp_ag_outgoing_call_ringing(); break; case 'n': log_info("USER:\'%c\'", cmd); @@ -631,8 +632,6 @@ static void packet_handler(uint8_t * event, uint16_t event_size){ || (memory_1_enabled && strcmp(">1", (char*) &event[3]) == 0)){ printf("Dialstring valid: accept call\n"); hfp_ag_outgoing_call_accepted(); - // TODO: calling ringing right away leads to callstatus=2 being skipped. don't call for now - // hfp_ag_outgoing_call_ringing(); } else { printf("Dialstring invalid: reject call\n"); hfp_ag_outgoing_call_rejected();