V3 Manipulate CallerID

How it works

In a Cally Square project you are able to use most of the JavaScript function to manipulate a string variable such as the CallerID. For example, you can check the international prefix and send the call to the related country queue.

Step 1: Prerequisite

Before designing the IVR flow, you need to do the following in advance:

  • Create queues (Voice -->Queues)
  • Create a variable called RESULTS (Tools -->Variables)

Step 2: Design the flow

In following IVR flow, if the callerID starts with 012 we send the call to the queue 1 otherwise to queue 2. we check the callerID using the Javascript function substr  in a MATH block and check the result with a GOTOIF block.


Block details
Math block

For example, if the callerId is 0123456789, the substr function result will be 012 (first 3 digit) and it is saved into the RESULT variable.

GotoIf block

GotoIf block check the RESULT variable and routes the call to the right queue.

Related pages