Skip to main content
Flowroute

Insert Custom Tags into Call Records

The custom tag field on Call Detail Records (CDRs) is populated from the optional X-Tag SIP header field, which you can specify on each outbound call. The maximum length you may use for this field is 32 characters; anything longer will be truncated. You can populate the contents of the custom tag dynamically using variables if you're a savvy user for your respective system. This allows you to tag CDRs with your own internal customer IDs, calling campaigns, etc. 

This article describes creating custom tags for AsteriskFreeSWITCH, and Cisco

Asterisk:

  • Add the following line to your dial plan before the Dial() command to tag your calls with a custom tag. In the following example, bob is added as a custom tag.

    SIPAddHeader(X-Tag: bob)

FreeSWITCH:

  • Add the following to your dial plan XML for outbound calls to add the custom tag. In the following example, bob is added as a custom tag.

    sip_h_X-Tag=bob
  • For inbound calls, add the following for the custom tag. In the following example, bob is added as a custom tag.

    sip_rh_X-Tag=bob

NOTE: Additional information regarding the  Channel Variables wiki page.

Cisco:

  • Add the following line to your SIP Profile to tag your calls with a custom tag. In the following example, bob is added as a custom tag.

    request INVITE sip-header add "X-Tag: bob"

NOTE: Additional examples can be found at: Unified Border Element (CUBE) Session Initiation Protocol (SIP) Normalization with SIP Profiles Configuration.

  • Was this article helpful?