mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-04 04:12:03 +00:00
FS-9997: [mod_verto] Invalid JSON-RPC Response to an incorrect JSON-RPC Request. #resolve
This commit is contained in:
parent
1aadfc0fa4
commit
b81d6990ee
@ -2726,6 +2726,9 @@ static switch_bool_t verto__answer_func(const char *method, cJSON *params, jsock
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch_core_session_rwunlock(session);
|
switch_core_session_rwunlock(session);
|
||||||
|
} else {
|
||||||
|
err = 1;
|
||||||
|
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@ -2733,7 +2736,7 @@ static switch_bool_t verto__answer_func(const char *method, cJSON *params, jsock
|
|||||||
|
|
||||||
if (!err) return SWITCH_TRUE;
|
if (!err) return SWITCH_TRUE;
|
||||||
|
|
||||||
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
|
|
||||||
cJSON_AddItemToObject(obj, "code", cJSON_CreateNumber(CODE_SESSION_ERROR));
|
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)));
|
cJSON_AddItemToObject(obj, "cause", cJSON_CreateString(switch_channel_cause2str(cause)));
|
||||||
switch_core_session_rwunlock(session);
|
switch_core_session_rwunlock(session);
|
||||||
} else {
|
} else {
|
||||||
|
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
|
||||||
err = 1;
|
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;
|
if (!err) return SWITCH_TRUE;
|
||||||
|
|
||||||
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
|
|
||||||
cJSON_AddItemToObject(obj, "code", cJSON_CreateNumber(CODE_SESSION_ERROR));
|
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);
|
switch_core_session_rwunlock(session);
|
||||||
} else {
|
} else {
|
||||||
|
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
|
||||||
err = 1;
|
err = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3162,7 +3167,7 @@ static switch_bool_t verto__modify_func(const char *method, cJSON *params, jsock
|
|||||||
|
|
||||||
if (!err) return SWITCH_TRUE;
|
if (!err) return SWITCH_TRUE;
|
||||||
|
|
||||||
cJSON_AddItemToObject(obj, "message", cJSON_CreateString("CALL DOES NOT EXIST"));
|
|
||||||
cJSON_AddItemToObject(obj, "code", cJSON_CreateNumber(CODE_SESSION_ERROR));
|
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))) {
|
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;
|
err = 1; goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user