Tropo is part of CiscoLearn More

Accessing Call Detail Records

When you want to check the amount of calls or texts you've made or received in Tropo, the Call Detail Records (CDRs) in your logs are the place to go. Logs are stored in the logs folder, right above reports:

Inside the individual log files (which contain more than just the CDRs, other debugger information will also be present), there will be two different kinds of CDRs - there's a Session Detail Record that looks like this:

{
   "call":{
      "SipSessionID":"ss_1dw9323456789",
      "SessionID":"cdae50ad38207cc2ff8869a411234567",
      "CallID":"e07db1a2950b3bd37f70cfba8a123456",
      "ParentSessionID":"none",
      "ParentCallID":"none",
      "DateCreated":"Tue, 23 Aug 2011 15:24:42 +0000",
      "DateUpdated":"Tue, 23 Aug 2011 15:24:42 +0000",
      "AccountID":"46256",
      "Called":"9996140100",
      "Caller":"justindupree01",
      "PhoneNumberSid":"unknown",
      "Disposition":"Success",
      "Status":"Success",
      "StartTime":"Tue, 23 Aug 2011 15:24:42 +0000",
      "EndTime":"Tue, 23 Aug 2011 15:25:42 +0000",
      "Duration":"1",
      "Flags":"in",
      "RecordingDuration":"0",
      "Network":"SKYPE",
      "Channel":"VOICE",
      "ApplicationId":"111000",
      "ApplicationType":"tropo-web",
      "ServiceId":"000111",
      "StartUrl":"http://example.com/index.json",
      "BrowserIP":"10.1.10.203"
   }
}

Again, formatted here for easier viewing, in the log it'll be all one line. This will include information for both voice and text calls, and you'll find references to both development and production calls here, though no billing information will be included (as these are generated before billing is even a factor).

Then the other CDR format is for texts only, and contains delivery status information:

{
   "channel":"SMS",
   "status":"success",
   "deliveryStatus":"DeliveredToNetwork",
   "statusCode":0,
   "callId":"d4315f06da24fe9a041d71fa01234567",
   "transactionId":"43089f05decc6faa97cc20c961234567",
   "applicationId":"000111",
   "accountId":"111000",
   "serviceId":"101010",
   "PPID":"400",
   "carrierId":"2",
   "from":"16475550100",
   "to":"14075550100",
   "startTime":"2011-08-23T17:13:31.430+0000",
   "endTime":"2011-08-23T17:13:34.776+0000",
   "count":"1",
   "direction":"out",
   "testNumber":"false",
   "host":"10.1.110.100",
   "text":"Testing SMS"
}

Specifically, you're looking for a statusCode of 0, which means the SMS did indeed deliver to the carrier - this isn't handset delivery, as we can't verify that as the vast majority of carriers do not return any confirmation data back to us - but it does mean your app worked and our gateway worked. Any other status code means something has gone wrong - here's the complete list:

0 means"Delivered" - The message was successfully delivered to the carrier.
-1 means "Bad or Unsupported Phone Number" - The number you're attempting to send to is invalid, either because it's incorrectly formatted (missing the +1 in front of the number) or in an unsupported service area (outside the U.S.)
-2 means "Carrier Error" - An error has occurred at the carrier level - the route to the carrier may not be available.
-3 means "Gateway Error" - An error has occurred at the gateway level - contact technical support to investigate further.
-4 means "Exceeded Rate Limit" - The amount of SMS messages sent in a given time has exceeded the 60 messages per minute limit imposed by the carrier for long codes pr 40 messages per second in place for short codes.
-5 means "Duplicate Message" - Carriers block duplicate messages if they're sent within a minute of each other. Duplicate message means the same destination address, sender address and message body; this is intended to prevent spam or malicious attacks
-7 means "Blocked" - The text message contains forbidden content or the destination phone number is on an opt-out list and the message was rejected. Forbidden content is covered in FAQ, under the header "When should I use a short code or a long code?", though content can be blocked at our discretion even if it doesn't fall under explicit abuse.
-99 is "Unknown" - An unknown error has occurred, contact technical support to investigate further.

For a status 2, or any other status besides 4 or 5, you'll want to contact support to track down the root of the problem, but at least you'll be able to confirm.

One caveat about the logs, however - logging becomes the lowest priority when system load is high. While it's rare for our systems to reach a capacity level where logs are suspended, it can happen. This means call detail records may not be present in the logs sometimes. This won't affect the reports, however, as they're extracted from our billing provider, which runs independently.