diff --git a/components/bt/host/bluedroid/btc/profile/std/hf_ag/btc_hf_ag.c b/components/bt/host/bluedroid/btc/profile/std/hf_ag/btc_hf_ag.c index bd27e0565d..57b9bc5dd4 100644 --- a/components/bt/host/bluedroid/btc/profile/std/hf_ag/btc_hf_ag.c +++ b/components/bt/host/bluedroid/btc/profile/std/hf_ag/btc_hf_ag.c @@ -1368,6 +1368,7 @@ void btc_hf_cb_handler(btc_msg_t *msg) do { memset(¶m, 0, sizeof(esp_hf_cb_param_t)); param.vra_rep.value = p_data->val.num; + memcpy(param.vra_rep.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t)); btc_hf_cb_to_app(ESP_HF_BVRA_RESPONSE_EVT, ¶m); if (p_data->val.num) { btc_hf_connect_audio(&hf_local_param[idx].btc_hf_cb.connected_bda); @@ -1463,9 +1464,12 @@ void btc_hf_cb_handler(btc_msg_t *msg) case BTA_AG_AT_BLDN_EVT: case BTA_AG_AT_D_EVT: { + idx = p_data->hdr.handle - 1; + CHECK_HF_IDX(idx); do { if (event == BTA_AG_AT_D_EVT) { // dial_number_or_memory memset(¶m, 0, sizeof(esp_hf_cb_param_t)); + memcpy(param.out_call.remote_addr, &hf_local_param[idx].btc_hf_cb.connected_bda,sizeof(esp_bd_addr_t)); param.out_call.num_or_loc = osi_malloc((strlen(p_data->val.str) + 1) * sizeof(char)); sprintf(param.out_call.num_or_loc, "%s", p_data->val.str); btc_hf_cb_to_app(ESP_HF_DIAL_EVT, ¶m);