How to find and interpret hangup cause codes

Restriction: This feature or information is available to Medallia employees only and it is not to be shared outside the company.

Quick Answer

  1. Search Datadog logs for "filename:master.csv" to find Hangup Cause Codes.
  2. Consult the Freeswitch Hangup Cause Code table to learn more about a specific code.

Troubleshooting Scenario

Freeswitch notes Hangup Cause Codes for all Mindful calls in a log file named "master.csv", which you can access through Datadog. We can review these Hangup Cause Codes and compare them to their corresponding SIP status codes to understand more about the outcome of calls.

This article describes how to search Datadog logs to find Hangup Cause Codes and how to interpret the codes by finding their SIP equivalents.

Finding Hangup Cause Codes in Datadog Logs

image of the datadog logs search page

Use the following steps to search Datadog logs for Hangup Cause Codes.

  1. In the Datadog UI, open the Logs page.
  2. Enter "filename:master.csv" in the search field. This will search for the log file used to capture Hangup Cause Codes.
  3. Use the environment tag to specify the Callback instance, if needed.
  4. Update the time/duration filter near the top-right of the page to include the relevant timeframe, if needed.
  5. (Optional) Enter a specific hangup_case value in the field, if needed (for example, "NORMAL_TEMPORARY_FAILURE"). See the example screenshot above.
  6. (Optional) Enter a specific region, if needed (for example, "region:us-west-2").

Each line in the search results should be in the following format. The position of the Hangup Cause Code is highlighted below.

?${caller_id_name}?,?${caller_id_number}?,?${destination_number}?,?${context}?,?${start_stamp}?,?${answer_stamp}?,

?${end_stamp}?,?${duration}?,?${billsec}?,?${hangup_cause}?,?${uuid}?,?${bleg_uuid}?,?${accountcode}?,

?${read_codec}?,?${write_codec}?,?${direction}?,?${callback_leg}?

Additional Log Examples

Inbound example:

?34569862?,?34569862",?+13305551234?,?public?,?2021-12-02 21:43:44?,?2021-12-02 21:43:44",?2021-12-02 21:44:19?,?35",

?35?,?NORMAL_CLEARING?,?88ggj48s-f0cb-48ce-9357-eh7gm87megk2?,??,??,?PCMU?,?PCMU?,?inbound?,??

Outbound example:

?Outbound Call?,?0001?,?0001",?default?,?2021-12-02 21:44:20",?2021-12-02 21:44:20?,?2021-12-02 21:45:31",?71?,?71",

?NORMAL_CLEARING?,?88ggj48s-f0cb-48ce-9357-eh7gm87megk2",?jjudh67c-507b-4e34-b4c0-99kkfju47cjf?,?127",?PCMU?,?PCMU?,

?outbound?,?AGENT?

Interpreting Hangup Cause Codes

Freeswitch documents all Hangup Cause Codes and their SIP equivalents in a Hangup Cause Code table. Consult the official table from Freeswitch for complete information.

For quick reference, common codes seen in Mindful call logs are listed below:

Hangup Cause CodeSIP EquivalentDescription
NORMAL_CLEARINGN/A(Default code if none are specified) The call was cleared at the request of one party or the other. This code indicates a successful end-to-end call.
NORMAL_TEMPORARY_FAILURE503A temporary network issue occurred. Freeswitch notes that another attempt can be made immediately, as this code is used when the failure condition is not expected to last long.