diff --git a/mbtk/libmbtk_lib_v2/common/mbtk_file.c b/mbtk/libmbtk_lib_v2/common/mbtk_file.c
index 44f3954..235ccd2 100755
--- a/mbtk/libmbtk_lib_v2/common/mbtk_file.c
+++ b/mbtk/libmbtk_lib_v2/common/mbtk_file.c
@@ -126,3 +126,73 @@
     }
     return result;
 }
+
+/*===========================================================================
+FUNCTION file_link()
+
+DESCRIPTION:
+  Create soft link.
+
+PARAMETERS:
+  oldpath [IN]: Local original file,it may not exist.
+  newpath [IN]: Soft link file. If the file exists, it will be replaced.
+
+RETURN VALUE:
+  Return 0 if success,other for error.
+
+===========================================================================*/
+int file_link(const void* oldpath, const void* newpath)
+{
+    if(oldpath == NULL || newpath == NULL) {
+        LOGE("File not be NULL.");
+        return -1;
+    }
+
+    struct stat file_stat;
+    int ret = lstat((const char*)newpath, &file_stat);
+    if (ret) {
+        if (errno != ENOENT) {
+            LOGE("lstat(%s) fail:%d", (char*)newpath, errno);
+            return -1;
+        }
+
+        // Link file not exist, Create link file directly.
+    } else {
+        if (S_ISLNK(file_stat.st_mode)) {
+            // The file is a symbolic link
+            char buf[1024] = {0};
+            ssize_t len = readlink((char*)newpath, buf, sizeof(buf));
+            if (len == -1) {
+                LOGE("Error reading the link file, errno - %d", errno);
+                return -1;
+            }
+            buf[len] = '\0';
+            LOGD("Link target is: %s", buf);
+            if(strcmp(buf, (const char*)oldpath) == 0) {
+                LOGD("The link target is same,do nothing.");
+                return 0;
+            } else {
+                ret = unlink((const char*)newpath);
+                if(ret) {
+                    LOGE("unlink(%s) fail:%d", (char*)newpath, errno);
+                    return -1;
+                }
+
+                // Delete link file success.
+            }
+        } else {
+            LOGE("%s exist,but no link file.", (char*)newpath);
+            return -1;
+        }
+    }
+
+    // Start create link file.
+    ret = symlink((const char*)oldpath, (const char*)newpath);
+    if(ret){
+        LOGE("symlink(%s->%s) fail:%d", (char*)newpath, (const char*)newpath, errno);
+        return -1;
+    } else {
+        LOGE("symlink(%s->%s) success.", (char*)newpath, (const char*)newpath);
+        return 0;
+    }
+}
diff --git a/mbtk/libmbtk_lib_v2/ril/mbtk_ril_api.c b/mbtk/libmbtk_lib_v2/ril/mbtk_ril_api.c
index ae35fd4..c102991 100755
--- a/mbtk/libmbtk_lib_v2/ril/mbtk_ril_api.c
+++ b/mbtk/libmbtk_lib_v2/ril/mbtk_ril_api.c
@@ -118,7 +118,7 @@
 
 static int ril_ind_process(ril_msg_pack_info_t* pack)
 {
-    LOGD("IND - %d", id2str(pack->msg_id));
+    LOGD("IND - %s", id2str(pack->msg_id));
     if(pack->msg_id > RIL_MSG_ID_IND_BEGIN && pack->msg_id < RIL_MSG_ID_IND_END) {
         if(ril_cli.cb[pack->msg_id - RIL_MSG_ID_IND_BEGIN - 1])
             ril_cli.cb[pack->msg_id - RIL_MSG_ID_IND_BEGIN - 1](pack->data, pack->data_len);
diff --git a/mbtk/libmbtk_lib_v2/ril/ril_utils.c b/mbtk/libmbtk_lib_v2/ril/ril_utils.c
index 6928a1d..b77046f 100755
--- a/mbtk/libmbtk_lib_v2/ril/ril_utils.c
+++ b/mbtk/libmbtk_lib_v2/ril/ril_utils.c
@@ -268,12 +268,78 @@
         // Call Information
         case RIL_MSG_ID_CALL_STATE:
             return "CALL_STATE";
+        case RIL_MSG_ID_CALL_START:
+            return "CALL_START";
+        case RIL_MSG_ID_CALL_ANSWER:
+            return "CALL_ANSWER";
+        case RIL_MSG_ID_CALL_HANGUP:
+            return "CALL_HANGUP";
+        case RIL_MSG_ID_CALL_HANGUP_A:
+            return "CALL_HANGUP_A";
+        case RIL_MSG_ID_CALL_HANGUP_B:
+            return "CALL_HANGUP_B";
+        case RIL_MSG_ID_CALL_HANGUP_C:
+            return "CALL_HANGUP_C";
+        case RIL_MSG_ID_CALL_WAITIN:
+            return "CALL_WAITIN";
+        case RIL_MSG_ID_CALL_MUTE:
+            return "CALL_MUTE";
+        case RIL_MSG_ID_CALL_DTMF:
+            return "CALL_DTMF";
         // SMS Information
         case RIL_MSG_ID_SMS_STATE:
             return "SMS_STATE";
+        case RIL_MSG_ID_SMS_CMGF:
+        	return "SMS_CMGF";
+        case RIL_MSG_ID_SMS_CPMS:
+        	return "SMS_CPMS";
+        case RIL_MSG_ID_SMS_CMGS:
+        	return "SMS_CMGS";
+        case RIL_MSG_ID_SMS_CMSS:
+        	return "SMS_CMSS";
+        case RIL_MSG_ID_SMS_CMGR:
+        	return "SMS_CMGR";
+        case RIL_MSG_ID_SMS_CMGW:
+        	return "SMS_CMGW";
+        case RIL_MSG_ID_SMS_CMGD:
+        	return "SMS_CMGD";
+        case RIL_MSG_ID_SMS_CMGL:
+        	return "SMS_CMGL";
+        case RIL_MSG_ID_SMS_CSCA:
+        	return "SMS_CSCA";
+        case RIL_MSG_ID_SMS_CSMP:
+        	return "SMS_CSMP";
+        case RIL_MSG_ID_SMS_CSCB:
+        	return "SMS_CSCB";
+        case RIL_MSG_ID_SMS_CNMI:
+        	return "SMS_CNMI";
         // PhoneBook Information
         case RIL_MSG_ID_PB_STATE:
             return "PB_STATE";
+        case RIL_MSG_ID_ECALL_MSDCFG:
+            return "ECALL_MSDCFG";
+        case RIL_MSG_ID_ECALL_MSDGEN:
+            return "ECALL_MSDGEN";
+        case RIL_MSG_ID_ECALL_MSD:
+            return "ECALL_MSD";
+        case RIL_MSG_ID_ECALL_PUSH:
+            return "ECALL_PUSH";
+        case RIL_MSG_ID_ECALL_ONLY:
+            return "ECALL_ONLY";
+        case RIL_MSG_ID_ECALL_REG:
+            return "ECALL_REG";
+        case RIL_MSG_ID_ECALL_DIAL:
+            return "ECALL_DIAL";
+        case RIL_MSG_ID_ECALL_MODE:
+            return "ECALL_MODE";
+        case RIL_MSG_ID_ECALL_CFG:
+            return "ECALL_CFG";
+        case RIL_MSG_ID_ECALL_SMS_NUM:
+            return "ECALL_SMS_NUM";
+        case RIL_MSG_ID_ECALL_MUTESPK:
+            return "ECALL_MUTESPK";
+        case RIL_MSG_ID_ECALL_DSP_GAIN:
+            return "ECALL_DSP_GAIN";
         // IND Information
          // <uint8>  State
         case RIL_MSG_ID_IND_SER_STATE_CHANGE:
@@ -299,6 +365,8 @@
         // <uint8>  State
         case RIL_MSG_ID_IND_SIGNAL_STATE_CHANGE:
             return "IND_SIGNAL_STATE";
+        case RIL_MSG_ID_IND_ECALL_STATE_CHANGE:
+            return "IND_ECALL_STATE_CHANGE";
         default:
         {
             return "UNKNOWN";
