提交 b81d6990 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-9997: [mod_verto] Invalid JSON-RPC Response to an incorrect JSON-RPC Request. #resolve

上级 1aadfc0f
......@@ -2726,6 +2726,9 @@ static switch_bool_t verto__answer_func(const char *method, cJSON *params, jsock
}
switch_core_session_rwunlock(session);
} else {
err = 1;
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
}
cleanup:
......@@ -2733,7 +2736,7 @@ static switch_bool_t verto__answer_func(const char *method, cJSON *params, jsock
if (!err) return SWITCH_TRUE;
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
cJSON_AddItemToObject(obj, "code", cJSON_CreateNumber(CODE_SESSION_ERROR));
......@@ -2783,6 +2786,7 @@ static switch_bool_t verto__bye_func(const char *method, cJSON *params, jsock_t
cJSON_AddItemToObject(obj, "cause", cJSON_CreateString(switch_channel_cause2str(cause)));
switch_core_session_rwunlock(session);
} else {
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
err = 1;
}
......@@ -2791,7 +2795,7 @@ static switch_bool_t verto__bye_func(const char *method, cJSON *params, jsock_t
if (!err) return SWITCH_TRUE;
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
cJSON_AddItemToObject(obj, "code", cJSON_CreateNumber(CODE_SESSION_ERROR));
......@@ -3154,6 +3158,7 @@ static switch_bool_t verto__modify_func(const char *method, cJSON *params, jsock
switch_core_session_rwunlock(session);
} else {
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
err = 1;
}
......@@ -3162,7 +3167,7 @@ static switch_bool_t verto__modify_func(const char *method, cJSON *params, jsock
if (!err) return SWITCH_TRUE;
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
cJSON_AddItemToObject(obj, "code", cJSON_CreateNumber(CODE_SESSION_ERROR));
......@@ -3197,7 +3202,7 @@ static switch_bool_t verto__attach_func(const char *method, cJSON *params, jsock
}
if (!(session = switch_core_session_locate(call_id))) {
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("Call does not exist"));
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
err = 1; goto cleanup;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论