Reputation: 612
I am implementing call from app to phone number using sinch api provider. So when I calling to user then I'm getting an error like below:
callout varification not successfull within give time out sinch
And also I am getting this type of response:
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";
}
So I'm not sure why I getting this error, if anyone have idea then please help me.
Upvotes: 0
Views: 142
Reputation: 73
Increase your call timeout. The request takes time to execute, and your request times out before the request is completed. If you're using NSURLSessions, this is the code.
let sessionConfig = URLSessionConfiguration.default
sessionConfig.timeoutIntervalForRequest = 40.0
sessionConfig.timeoutIntervalForResource = 60.0
let session = URLSession(configuration: sessionConfig)
Upvotes: 0