hfp: support AG Recect of incoming call

This commit is contained in:
Matthias Ringwald 2015-11-20 17:28:01 +01:00
parent 9027be1e16
commit 09a4371fc5
2 changed files with 15 additions and 0 deletions

View File

@ -919,6 +919,16 @@ static void hfp_ag_call_sm(hfp_ag_call_event_t event, hfp_connection_t * connect
case HFP_AG_TERMINATE_CALL_BY_AG:
switch (hfp_ag_call_state){
case HFP_CALL_STATUS_NO_HELD_OR_ACTIVE_CALLS:
switch (hfp_ag_callsetup_state){
case HFP_CALLSETUP_STATUS_INCOMING_CALL_SETUP_IN_PROGRESS:
hfp_ag_set_callsetup_state(HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS);
hfp_ag_trigger_reject_call();
printf("TODO AG Rejected Incoming call, AG terminate call\n");
break;
default:
break;
}
case HFP_CALL_STATUS_ACTIVE_OR_HELD_CALL_IS_PRESENT:
hfp_ag_set_callsetup_state(HFP_CALLSETUP_STATUS_NO_CALL_SETUP_IN_PROGRESS);
hfp_ag_set_call_state(HFP_CALL_STATUS_NO_HELD_OR_ACTIVE_CALLS);

View File

@ -122,6 +122,7 @@ static void show_usage(void){
printf("d - report AG failure\n");
printf("e - answer call on AG\n");
printf("E - reject call on AG\n");
printf("r - disable in-band ring tone\n");
printf("R - enable in-band ring tone\n");
@ -190,6 +191,10 @@ static int stdin_process(struct data_source *ds){
printf("Answer call on AG\n");
hfp_ag_answer_incoming_call();
break;
case 'E':
printf("Reject call on AG\n");
hfp_ag_terminate_call();
break;
case 'f':
printf("Disable cellular network\n");
hfp_ag_set_registration_status(0);