RogierBosch | 2016-12-22 08:44:48 UTC | #1
Hi Guys,
Possible that one of you have an answer for me.
I am using Call.CalledAddress (DNIS) in Flow. Based on the DNIS I want to redirect the call to the correct ACD.
Description of Call.CalledAddress is E164 formatted string or other value indicating the number the caller dialed (DNIS).
I want to use a 'Switch' based on the expression where Call.CalledAddress is stored.
I have used different formats of the DNIS but Switch always goes to the Default Case....
What is the correct way / format to work with call.calledaddress in a flow.
tim.smith | 2016-12-27 14:22:40 UTC | #2
I've asked the dev team to take a look at this question, but it's probably better suited for the PureCloud Community for product questions. If you haven't seen it already, take a look at the Switch action documentation to make sure you're using it as documented.
colinf | 2016-12-27 15:30:26 UTC | #3
Dear Mr. Bosch:
The Call.CalledAddress variable will contain a value of type String that has the E.164-formatted value of the number that was dialed. I was not able to test with a real phone line, so the number may or may not have the leading + removed. If a sip: or sips: address was called, it will contain the user portion of the SIP address.
For example, if the number dialed was +1 317 555 1212, the Call.CalledAddress will likely contain the string "13175551212" (maybe with the +?). [See below for what I hope is a helpful tip.] If the call was dialed as sip:foo@myedge, then Call.CalledAddress will contain the string "foo"
I used Architect's Switch action with the Evaluation Style set to Take path of first case that matches the below expression. If you do this, then the value you put in Case 1, Case 2, or Case 3 must match exactly the value in Call.CalledAddress.
You can also use the Switch action in the mode Take path of first case that returns True. In that case, you could put in Case 1 the expression Substring(Call.CalledAddress, 0, 4) == "1317" to match any called address that starts with "1317".
HELPFUL TIP: For testing, I used the Play Audio action with the expression ToAudioTTS(Call.CalledAddress, Format.String.playChars). When you call the flow, it will read each character in the string to help you build your expressions. You should hear something like "One. Three. One. Seven. Five. Five. Five..."
RogierBosch | 2016-12-29 07:52:12 UTC | #4
Hi,
In my first attempt I used Get participant data with call.calledaddress next step a switch with an expression. I tryed all formats (including +31537440596) but none did work.
In my second attempt I directly used a switch without using Get object and in expression used Contains(Call.CalledAddress, "+31537440596") this worked.
system | 2017-08-28 19:29:30 UTC | #5
This post was migrated from the old Developer Forum.
ref: 736