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 Asterisk, FreeSWITCH, and Cisco.
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)
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.
For inbound calls, add the following for the custom tag. In the following example, bob is added as a custom tag.
|NOTE: Additional information regarding the channel variable can be found on FreeSWITCH's Channel Variables wiki page.|
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.|
Did you find this article helpful?