Skip to main content

CallTrackingSession Model

The CallTrackingSession model represents a single attributed call to a tracking number. Sessions are created from Cloudonix CDRs by ProcessCDRJob and are used for analytics, conversion tracking, and ad-platform uploads.

Table: call_tracking_sessions
Model: App\Models\CallTrackingSession
Resource: App\Http\Resources\CallTrackingSessionResource

Database Schema

ColumnTypeNullableDefaultDescription
idbigint unsignedNoautoPrimary key
organization_idbigint unsignedNo-Foreign key to organizations
call_tracking_campaign_idbigint unsignedNo-Parent campaign
call_tracking_number_idbigint unsignedNo-Tracking number that received the call
did_number_idbigint unsignedNo-DID that received the call
call_idvarchar(255)YesnullCloudonix call ID
session_idvarchar(255)YesnullCloudonix session ID
caller_numbervarchar(50)YesnullCaller E.164 number
caller_countryvarchar(10)YesnullCaller country code
called_numbervarchar(50)YesnullDialed tracking number
sourcevarchar(100)YesnullAttributed source
mediumvarchar(100)YesnullAttributed medium
campaign_namevarchar(255)YesnullCampaign name at time of call
dispositionvarchar(50)YesnullCall disposition
durationintYesnullTotal call duration in seconds
billsecintYesnullBilled seconds
is_answeredbooleanNofalseWhether the call was answered
is_convertedbooleanNofalseWhether the call met conversion rules
conversion_valuedecimalYesnullConversion value
started_attimestampYesnullCall start time
answered_attimestampYesnullCall answer time
ended_attimestampYesnullCall end time
created_attimestampYesnullCreation timestamp
updated_attimestampYesnullLast update timestamp

Relationships

Belongs To

$session->organization() → Organization
$session->campaign() → CallTrackingCampaign
$session->number() → CallTrackingNumber
$session->did() → DidNumber

Conversion

Conversion is evaluated by ConversionRuleEvaluator using the campaign's conversion_rule:

  • min_answered_duration_seconds must be met if configured.
  • requires_answered_disposition must be met if enabled.
  • conversion_value is copied from the rule if set.