{{customer.number}} but in standard format not e16...
# support
j
Do you have a variable like {{customer.number}} that we can use to reference the number the customer is calling in on, but dropping the +44 and adding back the extra zero? For example, here in the UK people reference their mobile number like this 07855 792222 not +447855 792222 I want the AI to check the best number with the customer and it's reading out the +44 do you have a different tag for the standard number? Thanks
Scratch that, I note you use LiquidJS and I was able to format using this tag : {{customer.number | replace:"+44", "0"}}
s
Currently, the {{customer.number}} variable will always return the E.164 formatted number (with the + prefix). This is the standard format used internally for consistency and compliance. However, there are a few ways you can handle this requirement: - Use the Format Plan to customize how numbers are spoken. The FormatPlan allows you to customize how numbers are formatted when spoken. You can add custom replacements to convert the E.164 format to local format. Create a custom replacement rule: This will replace any "+44" prefix with "0" when the number is spoken.
Copy code
{
  "formatPlan": {
    "enabled": true,
    "replacements": [
      {
        "type": "regex",
        "regex": "\\+44(\\d{10})",
        "value": "0$1"
      }
    ]
  }
}
- For transfers, you can use the callerId field which supports custom formatting:
Copy code
class TransferDestinationNumber  {
  type: typeof TRANSFER_DESTINATION_NUMBER;

  /**
   * This is the phone number to transfer the call to.
   */
  number: string;

  /**
   * This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.
   *
   * Use cases:
   * - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.
   * - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.
   *
   * If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).
   *
   * @default true (E164 check is enabled)
   */
  numberE164CheckEnabled?: boolean;

  /**
   * This is the extension to dial after transferring the call to the `number`.
   */
  extension?: string;

  /**
   * This is the caller ID to use when transferring the call to the `number`.
   *
   * Usage:
   * - If not provided, the caller ID will be the number the call is coming from. Example, +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +14151111111 as the caller.
   * - To change this behavior, provide a `callerId`.
   * - Set to '{{customer.number}}' to always use the customer's number as the caller ID.
   * - Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.
   * - Set to any E164 number to always use that number as the caller ID. This needs to be a number that is owned or verified by your Transport provider like Twilio.
   *
   * For Twilio, you can read up more here: https://www.twilio.com/docs/voice/twiml/dial#callerid
   */

  callerId?: string;

    /**
   * This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.
   *
   * @default `transferPlan.mode='blind-transfer'`
   */
    transferPlan?: TransferPlan;
}
Let me know if you require further help.