Contents
Submitting Call Attempt Records to an External System
When OCS attempts a call, it sends the call attempt record to Web or Application Server. Web or Application Server then checks the call result data to determine whether dialing rules should be applied to the record or if the record should be added to a contact suppression list.
How it Works
- A campaign is started/loaded in any dialing mode.
- An outbound call is dialed.
- OCS sends a call attempt record (HTTP POST with GSW_OCS_SEQUENCE_NO: 0) to the external system.
- OCS stores the record posted to the external system while it waits for confirmation from the external system that the record was saved.
- The external system receives the record and sends a 200 OK response to OCS. The log confirms that the call attempt record was saved.
- The agent-customer call is established.
- The agent releases the call and logs the result of the call (example Answer, Answering Machine, DoNotCall)
- OCS sends another call attempt record (HTTP POST with GSW_OCS_SEQUENCE_NO: 1) to the external system, this time containing the GSW_CALL_RESULT parameter.
Feature Configuration
Add the following configuration options:
- send-history
- history-uri
- history-wait-condition-threshold
- history-wait-recovery-timeout
- validation-race-condition-call-result
- send-history-key
- history-es-report-events
The data posted to the external system will contain the following attributes. Refer to the Reference Manual (page) for a detailed description of each attribute.
| Attribute Name | Attribute Name | Attribute Name |
|---|---|---|
| GSW_CALL_ATTEMPT_GUID | GSW_HIST_SEQUENCE_NUM | GSW_TENANT_NAME |
| GSW_PHONE | GSW_CAMPAIGN_DBID | GSW_PHONE_TYPE |
| GSW_CUSTOMER_ID | GSW_START_PROCESSING | GSW_CALL_TIME |
| GSW_SCHEDULED_TIME | GSW_TZ_OFFSET | GSW_TZ_NAME |
| GSW_CALL_RESULT | GSW_CAMPAIGN_NAME | GSW_CALLING_LIST |
| GSW_CAMPAIGN_GROUP_NAME | GSW_GROUP_NAME | GSW_QUEUE_NAME |
| GSW_DIAL_MODE | GSW_OPTIMIZE_BY | GSW_OPTIMIZE_GOAL |
| GSW_DIALING | GSW_RINGING | GSW_RELEASED |
| GSW_ANSWERED | GSW_CPD_COMPLETED | GSW_QUEUED |
| GSW_AGENT_RINGING | GSW_AGENT_ANSWERED | GSW_DIVERTED |
| GSW_ABANDONED | GSW_AGENT_RELEASED | GSW_ACW_COMPLETED |
| GSW_COMPLETE_PROCESSING | GSW_POSTAL_CODE | GSW_REGION_CODE |
| GSW_COUNTRY_CODE | GSW_TZ_CODE | GSW_D_AREA_CODE |
| GSW_D_REGION_CODE | GSW_D_COUNTRY_CODE |
Responses and Logs
When OCS sends a call attempt record to the external system, the external system responds with a response code with a corresponding log entry, as described in the table below.
| HTTP Response Code | Associated Log Entry | Description |
|---|---|---|
| 200 OK | Call Attempt Record has been saved for phone %s | The external system confirms that the call attempt record has been successfully stored for further processing. |
| 409 Conflict | Call Attempt Record was not saved and has been queued for reprocessing for phone %s
|
The external system is not reachable or could not save the call attempt record as a result of an internal error or a bad request. |
| 408 Time-out | Save operation for Call Attempt Record was aborted (timeout elapsed) and the record has been queued for reprocessing for phone %s
|
A request to the external system has timed out. This request response might be generated by OCS internally if the response wait time exceeds the time specified in the history-http-response-timeout option. |
| 418 I'm a teapot | Call Attempt Record was not saved and has been queued for reprocessing for phone %s
|
The HTTP POST request did not go through as a result of mis-configuration or some other internal error. |
Re-Submitting Failed Records
When OCS sends a call record attempt over to the external system, OCS stores the record data until it receives confirmation, via a 200 OK response, from the external system that the record was saved successfully. If the external system sends an error response (409 Conflict, 408 Time-out, or 418 I'm a teapot), OCS treats that record as failed. It re-submits the record in accordance with the values specified in the history-wait-recovery-timeout option.
Wait Conditions
A wait condition is triggered when the number of call attempted records marked for re-submission exceeds the threshold specified in the history-wait-condition-threshold option. With a wait condition in place, the campaign remains in a running state, but dialing is suspended.
Race Conditions
If OCS sends a pre-validation request to the external system for a contact record that the external system is currently processing but has not yet saved (ie. it has not yet sent a response or the record is marked for re-processing), a race condition occurs.
As a prevention measure, OCS checks for a race condition before submitting a pre-validation request. If it detects a race condition, it will not dial the record. Instead, OCS refers to the call result specified in the validation-race-condition-call-result option and attempts to apply that treatment to the call result.
In this scenario, the following log entry appears:
Predial check aborted due to race condition for phone %s
