我正在使用sinch api提供程序实现从app到电话号码的呼叫。所以当我打电话给用户时,我收到如下错误:
在给定的时间内,标注验证不成功
我也得到了这种反应:
2019-02-13 17:01:55.638874+0530 SinchCalloutVerification[3108:669813] Wed Feb 13 17:01:55 2019 | state: Polling {
RUID = 237614012;
"sinch_env" = "api.sinch.com";
}
2019-02-13 17:01:55.641445+0530 SinchCalloutVerification[3108:669764] Wed Feb 13 17:01:55 2019 | -[SINVerification initiateWithCompletionHandler:] success: NO, contentLanguage: , error: Error Domain=SINVerificationErrorDomain Code=4 "Callout verification not successful within given timeout" UserInfo={NSLocalizedDescription=Callout verification not successful within given timeout} {
RUID = 237614012;
"sinch_env" = "api.sinch.com";
}
2019-02-13 17:01:52.588471+0530 SinchCalloutVerification[3108:669813] Wed Feb 13 17:01:52 2019 | HTTP request (ID=19) response body: {"id":"237614012","method":"callout","status":"DENIED","reason":"Blocked","reference":"A:8fb362fe-edad-425f-9a13-f52a7a8ab07d_VT7zRZ6U0kapF2CmPetWrQ"} {
RUID = 237614012;
"sinch_env" = "api.sinch.com";
}
所以我不确定为什么我会收到这个错误,如果有人有想法那么请帮助我。
增加通话超时。请求需要一段时间才能执行,请求在请求完成之前超时。如果您正在使用NSURLSessions,那么这就是代码。
let sessionConfig = URLSessionConfiguration.default
sessionConfig.timeoutIntervalForRequest = 40.0
sessionConfig.timeoutIntervalForResource = 60.0
let session = URLSession(configuration: sessionConfig)