[bugfix][bug-view-1295][voice] cannot answer call when in double slot

Only Configure:No
 Affected branch:master
 Affected module:voice
 Is it affected on: only ASR
 Self-test: Yes
 Doc Update:No

Change-Id: I96038de377e511673bb3774a234d28d4ccb6dfd1
diff --git a/mbtk/libql_lib_v2_rilv2/ql_voice.c b/mbtk/libql_lib_v2_rilv2/ql_voice.c
index 4ce0151..131301b 100755
--- a/mbtk/libql_lib_v2_rilv2/ql_voice.c
+++ b/mbtk/libql_lib_v2_rilv2/ql_voice.c
@@ -121,6 +121,7 @@
 */
 
 static mbtk_sim_type_enum s_voice_slot = MBTK_SIM_1;
+static mbtk_sim_type_enum urc_voice_slot = MBTK_SIM_1;
 
 static bool check_slot_valid(QL_SIM_SLOT_E slot)
 {
@@ -182,29 +183,35 @@
 
     if(MBTK_RIL_CALL_STATE_DISCONNECT != reg->state)
     {
-        LOG("ql_voice_state_change_cb : %d, %d, %d, %d, %s",  reg->call_id, reg->dir, reg->state, reg->num_type, reg->call_number);
-
+        LOG("ql_voice_state_change_cb : %d, %d, %d, %d, %d, %s",  reg->sim_id, reg->call_id, reg->dir, reg->state, reg->num_type, reg->call_number);
+        printf("ql_voice_state_change_cb : %d\n",  reg->sim_id);
         switch(reg->state)
         {
-            case 0:
+            case MBTK_RIL_CALL_STATE_ACTIVE:
             voice_handle->state_t = QL_VOICE_STATE_ACTIVE;
+            urc_voice_slot=reg->sim_id;
             break;
-            case 1:
+            case MBTK_RIL_CALL_STATE_HELD:
             voice_handle->state_t = QL_VOICE_STATE_HOLDING;
+            urc_voice_slot=reg->sim_id;
             break;
-            case 2:
+            case MBTK_RIL_CALL_STATE_DIALING:
             voice_handle->state_t = QL_VOICE_STATE_DIALING;
+            urc_voice_slot=reg->sim_id;
             break;
-            case 3:
+            case MBTK_RIL_CALL_STATE_ALERTING:
             voice_handle->state_t = QL_VOICE_STATE_ALERTING;
+            urc_voice_slot=reg->sim_id;
             break;
-            case 4:
+            case MBTK_RIL_CALL_STATE_INCOMING:
             voice_handle->state_t = QL_VOICE_STATE_INCOMING;
+            urc_voice_slot=reg->sim_id;
             break;
-            case 5:
+            case MBTK_RIL_CALL_STATE_WAITING:
             voice_handle->state_t = QL_VOICE_STATE_WAITING;
+			urc_voice_slot=reg->sim_id;
             break;
-            case 7:
+            case MBTK_RIL_CALL_STATE_DISCONNECT:
             voice_handle->state_t = QL_VOICE_STATE_END;
             break;
             default:
@@ -478,7 +485,7 @@
         return QL_ERR_FAILED;
     }
 
-    err = mbtk_call_hang(voice_handle->handle);
+    err = mbtk_ds_call_hang(voice_handle->handle,urc_voice_slot);
     if(err)
     {
         LOGE("Error : %d", err);
@@ -513,7 +520,7 @@
         return QL_ERR_FAILED;
     }
 
-    err = mbtk_call_answer(voice_handle->handle);
+    err = mbtk_ds_call_answer(voice_handle->handle,urc_voice_slot);
     if(err)
     {
         LOGE("Error : %d", err);