mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 04:20:20 +00:00
hfp: support AG Recect of incoming call
This commit is contained in:
parent
9027be1e16
commit
09a4371fc5
10
src/hfp_ag.c
10
src/hfp_ag.c
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user