Using Service As Outbound Redirect

We have several inbound access numbers using various services but they all funnel through the same scenario. We set up an IF statement to try and direct outbound transfers based on that service, but we are having trouble with getting the variable to work.

Anyone else having trouble with this?

We messed around with this at some point. We found it to just be more simple to set a variable at the top of the scenario from $(service.name). That way you can pull it from both scenario and workflows as variable names tend to change between the two.

callerService = $(service.name)

IF $(callerService) = outboundA
then connect call to 555-545-5452

Something like this. Just keep in mind that the IF blocks are funny when you are pulling variables. so instead of $(callerService) = outboundA…you’ll actually just use callerService = outboundA. It is sorta confusing, but if you are doing a check against a variable, you don’t need the $(), but if you are doing a check against a variable to a variable, you won’t need the $() on the check, but you will need to specify the verification as a variable, meaning you need the $()

So if outboundA is a variable and you are checking to see if $(callerService) = $(outboundA) then it will be written as:

IF callerService = $(outboundA)

It makes sense if you think about it from an app perspective, but it can be confusing.