@vipin.rathore@thetelephon Thanks for your help on this one. You could be in the right direction.
The main point is this: 202 Accepted does not necessarily mean failure. It usually means the makecall request was accepted but the PBX has not immediately produced/returned a call object/call ID at the time of the HTTP response.
200 OK with callId means the call object was created immediately enough to be returned.
The difference between the two responses is likely related to the state of the extension/device at the moment the makecall request is processed.
– A 200 OK with a callId means the PBX was able to create the call object immediately and return its ID in the response.
– A 202 Accepted means the request was accepted for processing, but a call object was not available to return synchronously at that point, so no callId is included.
This can happen when the extension’s currently usable endpoint is not clear or not immediately available, for example if the extension is not actively registered, the selected/active device is disconnected, or there are multiple registered devices/sessions and the PBX has to resolve where to originate the call from.
I would suggest testing the same request under these conditions:
- Extension registered on only one device/client.
- Extension not registered anywhere.
- Extension registered on multiple devices.
- Web Client/Desktop App open and actively connected versus closed/disconnected.
Also compare the extension’s presence/registration state in 3CX at the exact time you receive 200 versus 202. Essentially the same things that VIPIN explained.
So yes, multiple devices may be part of the explanation, but I would not treat dual registration alone as the root cause. The more important factor is whether the PBX has an immediately available endpoint from which it can originate the makecall request.
Also, I would not promise that 202 is caused only by missing registration. It can be other reasons. I’d also avoid saying “green presence” equals registration with certainty, because presence and SIP/client registration are related but not always the same thing.
Let us know what you get from these tests.
One quick gentle clarification about the comment that we do not support our API - the way you put it is not entirely fair.
We only support bug reports on our API. So if you have a bug and you make a sample application that proves the bug, we will support it and fix it. Anything that makes us dig into 3rd party code to troubleshoot, we cannot support.
I'm sure you will get this working. Let us know how the tests proceed for you. God bless