PUT /api/v1/secure/:secure_token/calls/:uuid
Update a call with td_secure_token and td_uuid passed in a call's SIP headers.

Examples

curl -i -X PUT "https://[your-subdomain].trackdrive.com/api/v1/secure/11111111035c9a8287c2e413a03fb32051f620e0/calls/77777777-dbe3-49ee-b28f-115ec80dcef9?revenue=10&buyer_converted=true"

Params

Param name
Description
Validations
secure_token
Required

The secure token used to authorize access to an individual object. Must be 40 characters.

Validations:

  • Must match regular expression /.{40}/.

uuid
Required

A unique identifier eg: 5cc8897c-ad0f-44cb-8ea7-8f7736ae76f1

Validations:

  • Must be a String

revenue
Optional

The revenue paid out for the call.

Validations:

  • Must be a decimal number.

buyer_converted
Optional

Did the buyer convert?

Validations:

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

digits
Optional Blank Value Allowed

DTMF digit

Validations:

  • Must be a String

data
Optional Blank Value Allowed

Update the call with this data. {interest: 'kittens', source: 'google', first_name: 'John', last_name: 'Smith'}

Validations:

  • Must be a Hash


DELETE /api/v1/secure/:secure_token/calls/:uuid
Hang up an ongoing call using a td_secure_token and td_uuid passed in a call's SIP headers.

Examples

curl -i -X DELETE "https://[your-subdomain].trackdrive.com/api/v1/secure/11111111035c9a8287c2e413a03fb32051f620e0/calls/77777777-dbe3-49ee-b28f-115ec80dcef9"

Params

Param name
Description
Validations
secure_token
Required

The secure token used to authorize access to an individual object. Must be 40 characters.

Validations:

  • Must match regular expression /.{40}/.

uuid
Required

A unique identifier eg: 5cc8897c-ad0f-44cb-8ea7-8f7736ae76f1

Validations:

  • Must be a String


GET /api/v1/secure/:secure_token/calls/:uuid/data
Returns UUID and data for the call.

Examples

curl -i -X GET "https://[your-subdomain].trackdrive.com/api/v1/secure/11111111035c9a8287c2e413a03fb32051f620e0/calls/77777777-dbe3-49ee-b28f-115ec80dcef9/data"

When Down-stream leg is Pure SIP (e.g., FreeSWITCH trunk) | Raw SIP headers with the sip_h_ prefix  • ${sip_h_X-PH-td_uuid}  • ${sip_h_first_name} | You’re talking SIP end-to-end. 
TrackDrive tags every custom field with sip_h_, and the next hop echoes those headers untouched. FreeSWITCH then exposes them as channel variables.
  sip_h_X-PH-td_uuid=f2001976-107a-47b7-bdcb-1a55e1ad9a54
  sip_h_X-PH-td_secure_token=abcdef1234567
  sip_h_X-PH-td_subdomain=tdc1892031i3290
etc


When Down-stream leg is Voice-XML carriers (Twilio, Plivo, Switchdrive, etc.) | HTTP POST body (JSON or form) with plain header names  json
{
  "X-PH-td_uuid": "...",
  "X-PH-first_name": "Alice"
}
 | Twilio/Plivo terminate SIP, translate the call into their REST webhook, and re-emit any X-* headers as POST parameters. The sip_h_ prefix is stripped because it’s meaningless outside SIP.
{
  "X-PH-td_uuid": "f2001976-107a-47b7-bdcb-1a55e1ad9a54", 
  "X-PH-td_secure_token": "abcdef1234567",
  "X-PH-td_subdomain": "tdc1892031i3290",
  etc
}


Our egress sip proxy static ips are:
    3.212.229.2
  3.219.116.119

Params

Param name
Description
Validations
secure_token
Required

The secure token used to authorize access to an individual object. Must be 40 characters.

Validations:

  • Must match regular expression /.{40}/.

uuid
Required

A unique identifier eg: 5cc8897c-ad0f-44cb-8ea7-8f7736ae76f1

Validations:

  • Must be a String