Detail-call-statuses

Since Itgrix_bx v3.5.1 and Itgrix_amo v2.8.0, we have expanded the list of recognizable call statuses from just two (Successful and Missed) to almost all that are supported in CRMs.

Now we need Extra

At the same time, our requirements for setting up Asterisk have increased. To find out the result of the call, we need the "extra" field in the CEL table. If you haven't added it yet, call statuses will work in the old way with only two basic values.

Despite the temporary support for CEL without extra, it's better not to leave the settings that don't meet system requirements. We already rely on the content of extra for handling call interception and transfers, and will rely on it when developing new features.

If the new call statuses do not meet your expectations yet, you can temporarily disable them by making the extra field unavailable.

To do this, you need to set the value "id" instead of "extra" in the config field database.column_name_aliases.cel_extra. After that, the module will look in the id field instead of extra, won't see the expected data, and will work in the old way.

Don't forget to restart the service for the changes to take effect, and let us know what needs to be changed in the call statuses so that they work more correctly.

Statuses in Asterisk

Call statuses are based on a call property that is new to us - the result. This is the result of peer A's attempt to call peer B, expressed with a code from the SIP protocol. The codes are similar in appearance and meaning to the status codes of the HTTP protocol, for example, 404 means "not found", but in a telephony sense.

The call result is not a literal SIP status code, but the set of situations described by these codes is very fitting.

To determine the result of the call, we rely on the contents of the extra field. It contains hangup_cause and dial_status values set by Asterisk. hangup_cause has values ​​from 0 to 127, and some of them correspond to one or more SIP status codes. dial_status can be either empty or one of 9 values, such as "ANSWERED" or "CANCEL". Both of these fields together allow us to determine the result of the call:

Hangup CauseDial StatusCall Result

0 Undefined

0 Unknown - we process the call in the old way

any

CANCEL

480 Temporarily unavailable

any

CHANUNAVAIL

CONGESTION

500 Server error

1 Unallocated

20 SubscriberAbsent

ANSWER

200 Success

1 Unallocated

20 SubscriberAbsent

404 Not found

16 NormalClearing

empty

ANSWER

200 Success

16 NormalClearing

NOANSWER

408 Request timeout

16 NormalClearing

BUSY

486 The subscriber is busy

17 UserBusy

486 The subscriber is busy

18 NoUserResponse

408 Request timeout

19 NoAnswer

480 Temporarily unavailable

21 CallRejected

603 Call rejected

26 AnsweredElsewhere

200 Success

28 InvalidNumberFormat

484 Not complete address

34 NormalCircuitCongestion

127 Interworking

500 Server error

38 NetworkOutOfOrder

500 Server error

44 RequestedChanUnavail

ANSWER

200 Success

44 RequestedChanUnavail

500 Server error

58 BearercapabilityNotavail

488 Can't access

66 ChanNotImplemented

ANSWER

200 Success

66 ChanNotImplemented

405 Method not supported

Obviously, not all 1280 possible combinations are considered here. Some hangup_cause values are not used by Asterisk, some combinations don't make sense or aren't possible, but most importantly, our preliminary research has shown that this set of combinations covers all common cases. As new cases are discovered, we will add them to the list, but for now, they will be handled in the old way with two options.

Statuses in CRM

Each CRM has its own idea of what statuses a call can have. They depend on the point of view of a specific CRM on the role of calls in a business process and the model of employee interaction with a call. It is important that in CRM, users can both set and read the call status along with automation, and therefore, the list of options should be intuitive and not too large. We map our set of call results to this reduced set of statuses.

Bitrix24

Call statuses in Bitrix24 are based on SIP status codes, just like our call result, but with some differences:

StatusDescription from Bitrix24Display text example

200 Successful call

the request was successfully accepted, recognized and confirmed

An incoming call from ended. Successful call

304 Missed call

for this status, we took a non-standard code

Missed an incoming call from . Missed call

402 Insufficient funds on the account

payment required

You cannot make a call, there are not enough funds on your account.

403 Forbidden

subscriber not registered

The call to number <number> ended. Forbidden

404 Wrong number

called subscriber not found, no such SIP number

A call to number <number> is not possible. This route is not served.

423 Blocked

the server rejects the request because the interval is too short (or the number in the Bitrix24 blacklist)

empty

480 Temporarily unavailable

Temporarily unavailable destination, please try again later

Subscriber <number> temporarily unavailable.

484 This destination is not available

request received with incomplete address

A call to number <number> is not possible. This destination is not served.

486 Busy

subscriber is busy

Subscriber <number> is busy on another call.

500 Internal server error

a call to a subscriber who is not registered on the network, or turned off the phone

empty

503 This destination is not available

the server is currently unable to service the call due to overload or maintenance

The call to number <number> ended. This destination is not available

603 Canceled

call canceled due to network downtime

Subscriber <number> canceled the call.

603-S Call canceled

the called user does not wish to receive incoming calls without specifying a reason for the refusal

The call to number <number> has been canceled.

The final call status is determined by the call result and additional conditions:

Call resultAdditional conditionsStatus BX24

200 Success

Incoming call unanswered

304 Missed call

200 Success

200 Successful call

404 Not found

404 Wrong number

405 Method not supported

405

408 Request timeout

304 Missed call

480 Temporarily unavailable

304 Missed call

484 Not complete address

484 This destination is not available

486 Subscriber is busy

Incoming call unanswered

304 Missed call

486 Subscriber is busy

486 Busy

488 Can't accept

484 This destination is not available

500 Server error

500 Internal server error

603 Call rejected

603 Canceled

0 Unknown

Answered call

200 Success call

0 Unknown

Unanswered call

304 Missed call

Kommo (former amoCRM)

Kommo call statuses are not based on SIP status codes. Instead, they are intended to be filled in by the user:

  1. Left a voice message

  2. Call back later

  3. Out of the office

  4. Conversation commenced

  5. Wrong number

  6. Didn't get through

  7. Number busy

In addition to the status, Kommo has a "Call Result" field that contains arbitrary text. We tried to use this text to make the status more intuitive.

Call data in Kommo is determined by call result as follows:

Call resultAdd conditionsStatus KommoText

200 Success

Incoming call unanswered

6 Didn't get through

Missed call

200 Success

4 The conversation took place

Success call

404 Not found

5 Wrong number

Number out of service

408 Request timeout

480 Temporarily unavailable

3 Be away

Subscriber did not answer

488 Can't accept

5 Wrong number

Carrier error

484 Not complete address

5 Wrong number

Invalid number

486 Subscriber is busy

Incoming call unanswered

6 Didn't get through

Number busy

486 Subscriber is busy

7 Number busy

Number busy

603 Call rejected

2 Call back later

Call rejected

0 Unknown

Answered call

4 The conversation took place

0 Unknown

Unanswered call

6 Didn't get through

Last updated