Confirmation call: authorization calls, API

Modified on Thu, 22 May at 12:44 PM

The confirmation call is made using the Method:

POST /api/protected/api/auth/confirmationCall in the section 'Integrations''For developers''Paid methods'.


This method allows making a call for identification purposes. The client doesn't need to connect any numbers for this, as calls are made from KOMPaaS numbers. After picking up the phone, a voice file will be played with a message requesting to press number 9. The call itself is free, but invoking the method costs from 0.006 cents. The method links the API request with a specific call using a verification code, which will be explained after the method parameters description.


Method call example:

curl -X 'POST' \
 '<https://paidmethods.kompaas.tech/api/protected/api/auth/confirmationCall>' \
 -H 'accept: application/json' \
 -H 'Content-Type: application/json' \
 -H 'Sec-Fetch-Mode: cors' \
 -H 'Authorization: Bearer <ТОКЕН>' \
 -d '{
 "phone_number": "4377777777"
 }'


JavaScript

Method parameters:

phone_number — client's number to which the call is made.

After successful method execution, the response format is:

{
 "status": "success",
 "code": 200,
 "object": {
 "login_did": "7777777777",
 "code": "0000",
 "account_id": "777777",
 "verification_call_uuid": "119214e015ed_777777"
 }
 }


JavaScript

  • Parameter ok — request status. True — success.
  • Parameter caller_number — the number from which the call was made.
  • Parameter verification_call_uuid — verification code. It looks like this — fa278be48dc2_777777, where the first part of the code before the "__" symbol is the call identifier, and the digits after the "__" symbol are the client's Account ID. The code is needed to link call data (CDR) with a specific API call instance. To receive call data, you need to connect the 'Flash call' webhook in the 'Integrations' section, and then information about the call will be sent to the specified URL. In the call data, the verification code linking it to a specific API call can be found in the 'verification_call_uuid' parameter: 'fa278be48dc2_777777'.


Callback — verification call statuses

  • Answered call
    • q931_status: 16,
    • final_status: ANSWER
  • Busy
    • q931_status: 17,
    • final_status: CANCEL
  • Unanswered call
    • q931_status: 16,
    • final_status: CANCEL
  • Call not passing through SS7 system (Signaling System No. 7), call rejected by receiving operator
    • q931_status: 31
  • Call failure due to billing issues
    • q931_status: 41
  • All other 'q931_status' codes different from 31, 16, or 17 = number unavailable.


Creating a webhook to receive call information

To receive call information (CDR) at your URL linked to the API call, you need to create a subscription to the 'Password call' event in the 'Integrations' tab 'Webhooks'. For more details, see 'How to create a webhook'.

In the 'Response body' field, specify within the JSON array the list of variables that will be transmitted to the URL. Event viewing is also available in the 'Monitoring' section.


Also see:

Monitoring — Event Logs

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article