This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain.flow
116 lines (116 loc) · 14.7 KB
/
Main.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="utf-8"?>
<File>
<Version>2.1</Version>
<Variables>
<ArrayOfVariable xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Variable>
<Name>CallbackLoopTimeout</Name>
<ShowScopeProperty>false</ShowScopeProperty>
<DebuggerVisible>true</DebuggerVisible>
<HelpText />
</Variable>
<Variable>
<Name>ExtensionIsBusyResult</Name>
<InitialValue>true</InitialValue>
<ShowScopeProperty>false</ShowScopeProperty>
<DebuggerVisible>true</DebuggerVisible>
<HelpText />
</Variable>
<Variable>
<Name>GlobalCallbackKey</Name>
<ShowScopeProperty>false</ShowScopeProperty>
<DebuggerVisible>true</DebuggerVisible>
<HelpText />
</Variable>
<Variable>
<Name>CallbackAttempts</Name>
<InitialValue>0</InitialValue>
<ShowScopeProperty>false</ShowScopeProperty>
<DebuggerVisible>true</DebuggerVisible>
<HelpText />
</Variable>
</ArrayOfVariable>
</Variables>
<Flows>
<MainFlow>
<ns0:MainFlow Description="Callflow execution path." DebugModeActive="False" x:Name="Main" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ns0="clr-namespace:TCX.CFD.Classes.Components;Assembly=3CX Call Flow Designer, Version=16.6.53.0, Culture=neutral, PublicKeyToken=7cb95a1a133e706e">
<ns0:MenuComponent AcceptDtmfInput="True" IsValidOption_Star="False" Timeout="10" x:Name="menuAttendant" SubsequentPromptList="<?xml version="1.0" encoding="utf-16"?><ArrayOfPrompt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Prompt xsi:type="AudioFilePrompt"><AudioFileName>Callback (J - Male).wav</AudioFileName></Prompt></ArrayOfPrompt>" InvalidDigitPromptList="<?xml version="1.0" encoding="utf-16"?><ArrayOfPrompt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />" IsValidOption_8="False" IsValidOption_9="False" IsValidOption_Pound="False" InitialPromptList="<?xml version="1.0" encoding="utf-16"?><ArrayOfPrompt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Prompt xsi:type="AudioFilePrompt"><AudioFileName>Hello (J - Male).wav</AudioFileName></Prompt><Prompt xsi:type="AudioFilePrompt"><AudioFileName>Callback (J - Male).wav</AudioFileName></Prompt></ArrayOfPrompt>" TimeoutPromptList="<?xml version="1.0" encoding="utf-16"?><ArrayOfPrompt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />" IsValidOption_3="False" IsValidOption_0="False" IsValidOption_1="False" IsValidOption_6="False" IsValidOption_7="False" IsValidOption_4="False" IsValidOption_5="False" IsValidOption_2="True" DebugModeActive="False" MaxRetryCount="3">
<ns0:MenuComponentBranch Option="Option2" Description="Execution path when the specified option is selected by the user." FriendlyName="" DebugModeActive="False" x:Name="menuComponentBranch2">
<ns0:VariableAssignmentComponent VariableName="project$.ExtensionWaiting" DebugModeActive="False" Expression="session.ani" x:Name="AssignExtensionWaiting" />
<ns0:VariableAssignmentComponent VariableName="project$.ExtensionBusy" DebugModeActive="False" Expression="session.transferingExtension" x:Name="AssignExtensionBusy" />
<ns0:VariableAssignmentComponent VariableName="callflow$.GlobalCallbackKey" DebugModeActive="False" Expression="CONCATENATE("CALLBACK_",project$.ExtensionWaiting,"_",project$.ExtensionBusy)" x:Name="AssignGlobalCallbackKey" />
<ns0:ConditionalComponent DebugModeActive="False" x:Name="CheckPrerequisites">
<ns0:ConditionalComponentBranch Condition="GREAT_THAN_OR_EQUAL(0,LEN(project$.ExtensionBusy))" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="whenBusyExtensionEmpty">
<ns0:ExitCallflowComponent x:Name="ExitCallflow1" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
</ns0:ConditionalComponent>
<ns0:TcxGetGlobalPropertyComponent PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GetGlobalCallbackListener" />
<ns0:ConditionalComponent Description="Check if the global property has been set for the current callback combination" DebugModeActive="False" x:Name="CheckGlobalProperty">
<ns0:ConditionalComponentBranch Condition="EQUAL("True",GetGlobalCallbackListener.PropertyValue)" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="CallbackRegistered">
<ns0:PromptPlaybackComponent AcceptDtmfInput="True" DebugModeActive="False" PromptList="<?xml version="1.0" encoding="utf-16"?><ArrayOfPrompt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Prompt xsi:type="AudioFilePrompt"><AudioFileName>OK (J - Male).wav</AudioFileName></Prompt></ArrayOfPrompt>" x:Name="PromptOK" />
<ns0:DisconnectCallComponent x:Name="DisconnectCall1" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
<ns0:ConditionalComponentBranch Condition="" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="CallbackNotRegistered">
<ns0:VariableAssignmentComponent VariableName="project$.DoCallbackOnDisconnect" DebugModeActive="False" Expression="true" x:Name="DoCallbackOnDisconnect" />
<ns0:TcxSetGlobalPropertyComponent PropertyValue=""True"" PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="SetGlobalCallbackListener" />
<ns0:PromptPlaybackComponent AcceptDtmfInput="True" DebugModeActive="False" PromptList="<?xml version="1.0" encoding="utf-16"?><ArrayOfPrompt xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Prompt xsi:type="AudioFilePrompt"><AudioFileName>OK (J - Male).wav</AudioFileName></Prompt></ArrayOfPrompt>" x:Name="PromptVerifyCallback" />
<ns0:DisconnectCallComponent x:Name="DisconnectCall" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
</ns0:ConditionalComponent>
</ns0:MenuComponentBranch>
<ns0:MenuComponentBranch Option="TimeoutOrInvalidOption" Description="Execution path when the specified option is selected by the user." FriendlyName="" DebugModeActive="False" x:Name="menuComponentBranch3" />
</ns0:MenuComponent>
</ns0:MainFlow>
</MainFlow>
<ErrorHandlerFlow>
<ns0:ErrorHandlerFlow Description="Execution path when an error ocurrs." DebugModeActive="False" x:Name="Main" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ns0="clr-namespace:TCX.CFD.Classes.Components;Assembly=3CX Call Flow Designer, Version=16.6.53.0, Culture=neutral, PublicKeyToken=7cb95a1a133e706e">
<ns0:TcxGetGlobalPropertyComponent PropertyName=""PBXERRORMAIL"" DebugModeActive="False" x:Name="GetAdminEmail" />
<ns0:EMailSenderComponent Port="25" UserName="" Subject="CONCATENATE("Error triggered within ",session.dnis)" x:Name="EmailOnError" Priority="Normal" Password="" EnableSSL="false" From="" IsBodyHtml="False" UseServerSettings="True" AttachmentList="<?xml version="1.0" encoding="utf-16"?><ArrayOfMailAttachment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />" IgnoreMissingAttachments="False" CC="" BCC="" Server="" DebugModeActive="False" To="GetAdminEmail.PropertyValue" Body=""FIRE *exclamation mark*\nCheck the 3CX log for more information."" />
</ns0:ErrorHandlerFlow>
</ErrorHandlerFlow>
<DisconnectHandlerFlow>
<ns0:DisconnectHandlerFlow Description="Execution path since the call gets disconnected." DebugModeActive="False" x:Name="Main" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ns0="clr-namespace:TCX.CFD.Classes.Components;Assembly=3CX Call Flow Designer, Version=16.6.53.0, Culture=neutral, PublicKeyToken=7cb95a1a133e706e">
<ns0:ConditionalComponent DebugModeActive="False" x:Name="IfDoCallback">
<ns0:ConditionalComponentBranch Condition="project$.DoCallbackOnDisconnect" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="CallbackProcedure">
<ns0:ExecuteCSharpCodeComponent ReturnsValue="True" Code="return System.DateTime.Now + System.TimeSpan.FromHours(2);" ParameterList="<?xml version="1.0" encoding="utf-16"?><ArrayOfScriptParameter xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />" MethodName="CalculateLoopTimeout" DebugModeActive="False" x:Name="CalculateLoopTimeout" />
<ns0:VariableAssignmentComponent VariableName="callflow$.CallbackLoopTimeout" DebugModeActive="False" Expression="CalculateLoopTimeout.ReturnValue" x:Name="AssignLoopTimeout" />
<ns0:LoopComponent Condition="LESS_THAN(NOW(),callflow$.CallbackLoopTimeout)" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="LoopUntilTimeout">
<ns0:LoopComponent Condition="EQUAL(callflow$.ExtensionIsBusyResult,true)" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="LoopUntilFree">
<ns0:ConditionalComponent DebugModeActive="False" x:Name="BreakIfTimeout">
<ns0:ConditionalComponentBranch Condition="GREAT_THAN(NOW(),callflow$.CallbackLoopTimeout)" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="Timeout">
<ns0:TcxSetGlobalPropertyComponent PropertyValue=""False"" PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GlobalCleanup1" />
<ns0:ExitCallflowComponent x:Name="ExitCallflow2" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
</ns0:ConditionalComponent>
<ns0:ExecuteCSharpCodeComponent ReturnsValue="False" Code="var jitter = new System.Random().Next(1,5);
// Jitter is a poor mans implementation of preventing concurrent call issues
var delay = System.TimeSpan.FromSeconds(1) + System.TimeSpan.FromSeconds(jitter);
Task.Delay(delay).Wait();" ParameterList="<?xml version="1.0" encoding="utf-16"?><ArrayOfScriptParameter xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />" MethodName="CodeWait" DebugModeActive="False" x:Name="CodeWait" />
<ns0:TcxGetExtensionStatusComponent Extension="project$.ExtensionBusy" DebugModeActive="False" x:Name="GetBusyExtensionStatus" />
<ns0:TcxGetExtensionStatusComponent Extension="project$.ExtensionWaiting" DebugModeActive="False" x:Name="GetWaitingExtensionStatus" />
<ns0:VariableAssignmentComponent VariableName="callflow$.ExtensionIsBusyResult" DebugModeActive="False" Expression="OR(GetBusyExtensionStatus.IsInCall,NOT_EQUAL(GetBusyExtensionStatus.CurrentProfileName,"Available"),GetWaitingExtensionStatus.IsInCall,NOT_EQUAL(GetWaitingExtensionStatus.CurrentProfileName,"Available"))" x:Name="AssignIsBusyResult" />
</ns0:LoopComponent>
<ns0:TcxGetGlobalPropertyComponent PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GetGlobalKey" />
<ns0:ConditionalComponent DebugModeActive="False" x:Name="BreakIfGlobalUnset">
<ns0:ConditionalComponentBranch Condition="NOT_EQUAL(GetGlobalKey.PropertyValue,"True")" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="conditionalComponentBranch1">
<ns0:TcxSetGlobalPropertyComponent PropertyValue=""False"" PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GlobalCleanup4" />
<ns0:ExitCallflowComponent x:Name="ExitCallflow3" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
</ns0:ConditionalComponent>
<ns0:IncrementVariableComponent DebugModeActive="False" VariableName="callflow$.CallbackAttempts" x:Name="IncrementCallbackAttempts" />
<ns0:MakeCallComponent Origin="project$.ExtensionWaiting" DebugModeActive="False" Timeout="15" Destination="project$.ExtensionBusy" x:Name="ConnectExtensions" />
<ns0:ConditionalComponent DebugModeActive="False" x:Name="TestConnected">
<ns0:ConditionalComponentBranch Condition="ConnectExtensions.Result" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="Connected">
<ns0:TcxSetGlobalPropertyComponent PropertyValue=""False"" PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GlobalCleanup2" />
<ns0:ExitCallflowComponent x:Name="ExitCallflow1" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
<ns0:ConditionalComponentBranch Condition="GREAT_THAN_OR_EQUAL(TO_INTEGER(callflow$.CallbackAttempts),2)" Description="Execution path when the specified condition is met." DebugModeActive="False" x:Name="MaxAttempts">
<ns0:TcxSetGlobalPropertyComponent PropertyValue=""False"" PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GlobalCleanup5" />
<ns0:ExitCallflowComponent x:Name="ExitCallflow4" DebugModeActive="False" />
</ns0:ConditionalComponentBranch>
</ns0:ConditionalComponent>
</ns0:LoopComponent>
</ns0:ConditionalComponentBranch>
</ns0:ConditionalComponent>
<ns0:TcxSetGlobalPropertyComponent PropertyValue=""False"" PropertyName="callflow$.GlobalCallbackKey" DebugModeActive="False" x:Name="GlobalCleanup3" />
</ns0:DisconnectHandlerFlow>
</DisconnectHandlerFlow>
</Flows>
</File>