Forwarding call to external number via IVR

Forward function is a powerful tool that you can use to forward incoming calls to an external phone number at any moment during the IVR.

Technically it does not act as a "classic" forwarding of incoming calls to a different number. Instead LiveAgent call center acts as a bridge between the caller and the number that the call is being forwarded to. So the caller calls your regular number that is integrated with LiveAgent call center. Then LiveAgent call center makes an outgoing call to the forwarded number. If the outgoing call is successful the two calls are connected together.

This type of forwarding ensures that LiveAgent knows that such call actually happened and a ticket will be created for such forwarded call normally. If call recording is enabled, the recording of the forwarded call will be also available directly in ticket. It all acts exactly the same way as if the call was not forwarded at all.

The downside of using this type of forwarding is that your VoIP provider will be most likely charging you for both calls:

  1. The initial incoming call to your VoIP phone number.
  2. The outgoing call from your VoIP phone number to the forwarded external number.


The basic structure of the forward command in the IVR script looks like this:

  - forward:
      number: "+421000000000"
      prefix: 88
      onError: offline

As we can see the command has 3 parameters: 

  1. number: this is the actual phone number where the call should be forwarded. Exact format of the actual phone number depends on the requirements of the VoIP provider that will be making the outgoing call. Some providers might use "00421" format instead  of "+421" or just "421" format. You can check how your number format is defined in your phone number configuration in your LiveAgent admin panel->Configuration->Call->Numbers tab.
    The whole number has to be also enclosed with quotation marks exactly as shown in the example above.
     
  2. prefix: this is the dial out prefix of an integrated phone number. It defines which one of your LiveAgent phone numbers will be used to make the outgoing call to forwarded number.
    You can also find the dial out prefix of your integrated phone numbers in your LiveAgent admin panel->Configuration->Call->Numbers tab. See this guide.
     
  3. onError: this field is optional. You can use it define where the IVR should continue in case the call forwarding is not successful. If it's not defined the default behavior in case of unsuccessful call forwarding is the offline section of your IVR.

 

Examples

Lets take a look at this simple example of an IVR with two choices and focus on how the forward command is used in the first choice. The first choice is called Sales department, if there is an agent available it will play a message and then the call starts ringing to the agent. However if there is no one online in Sales department, the caller is forwarded to external number "+421000000000".
The outgoing call to forwarded number is made from number with dial out prefix: 88. If the forwarding fails (nobody is picking up, called number is busy or not reachable) the IVR continues to the voicemail section which is defined below the choices in our IVR script.

Note that links to files in play commands are not valid and serve just as examples. Real links will be automatically generated once you'll add and insert your own recordings.
start:
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=connect-first-available-agent.mp3
  - choice:
      1:
        name: Sales department
        play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=press-one-for-sales.mp3
        do:
          - transfer:
              to: salesDepartmentID
              if:
                online:
                  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=connect-first-available-agent.mp3
                  - ring
                offline:
                 - forward:
                      number: "+421000000000"
                      prefix: 88
                      onError: voicemail
      2:
        name: Technical department
        play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=press-two-for-technical-support.mp3
        do:
          - transfer:
              to: techDepID
              if:
                online:
                  - ring
                offline:
                  - goto: voicemail
voicemail:
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=leave-a-voicemail.mp3
  - voicemail
offline:
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=we-are-currently-not-available-check-website.mp3
queue:   
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=next-in-queue.mp3

In the next example we can see a use case where call is trying to be forwarded multiple times. We defined in the IVR that if first forward fails the IVR should continue with section called next_forward. This section then tries to forward the call again to a different external number. This way we can create some kind of a backup number if forwarding to the first number fails.

online:
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=connect-first-available-agent.mp3
  - ring
offline:
  - forward:
      number: "+421000000000"
      prefix: 04
      onError: next_forward
queue:   
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=/next-in-queue.mp3
next_forward:
  - forward:
      number: "+421111111111"
      prefix: 04
      onError: voicemail
voicemail:
  - play: https://mycompany.ladesk.com/scripts/file.php?view=Y&file=leave-a-voicemail.mp3
  - voicemail

There is however a technical limitation here. Each incoming call will try to be forwarded for maximum of 3 times. So you can have the initial forwarding and two backup forwarding options defined in your IVR.
If you have more forward options defined or you have some kind of loop in your forwarding IVR(for example: second number is backup for first and first is backup for second) the call will try to be forwarded only 3 times. Then instead of 4th forward, the IVR will simply end and the call will be dropped. This was implemented on purpose to prevent any kind of infinite loops in the IVR.

×