Call Flow Designer for 3CX V20

Remove the single quotes around the parameter @ANI. Apart from that it should be ok.

SQL injection is avoided because by using parameters, if the parameter value has SQL code to change the meaning of your SQL command, the parameter will escape it in a way that will not execute the desired code. In your case you're passing the caller's number, which will not have a tricky value, but this is in general to avoid possible SQL injection if you pass for example a value that you are getting from a web service....
The single quotes are required for MSSQL.
When passing the EXEC command it is required to encapsulate the value in single quotes since that value is not always an integer (the carrier passes the country code so really is passing +18135551212 in these examples).
In other words:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'8135551212' <--this is required
not:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],8135551212 <--this won't work

Therefore would the CFD query be:
"EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'@ANI'"
which appears to pass
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'@ANI'
to the MSSQL server?

It is difficult for me to test this without updating the production side of things since the MSSQL server in question contains confidential data and cannot be placed in our test environment with our test systems. In order to have valid returns, I have to use the active DB and that impacts call flow in prod so want to get this as close as possible without having to troubleshoot during active calling periods where we get many calls (around 100-200/hour).

I appreciate your help.
 
The parameter already provides the type, that's why you need to remove the quotes. Otherwise it will be considered text and not a parameter.
 
The parameter already provides the type, that's why you need to remove the quotes. Otherwise it will be considered text and not a parameter.
I have to pass the ' characters to SQL, how would I do that since concatenate wont work?
As Ive said a number of times here, I need to pass the command exactly typed below, including the ' and [] characters:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'8135551212'
I CANNOT USE the command
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],8135551212

If I cannot use the expression:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'@ANI'
then how would I encapsulate the ANI variable into the query language (since I cant seem to use concatenate). Could I put the parameter into the concatenate portion, something like:

1741325950463.png

If not, how would I accomplish this -- passing the parameter enclosed in a single quote?
 
I have to pass the ' characters to SQL, how would I do that since concatenate wont work?
As Ive said a number of times here, I need to pass the command exactly typed below, including the ' and [] characters:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'8135551212'
I CANNOT USE the command
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],8135551212

If I cannot use the expression:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2],'@ANI'
then how would I encapsulate the ANI variable into the query language (since I cant seem to use concatenate). Could I put the parameter into the concatenate portion, something like:

View attachment 46856

If not, how would I accomplish this -- passing the parameter enclosed in a single quote?
Just set the SQL Statement expression to:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2], @ANI

The parameter @ANI will be expanded to '8135551212'. That's why you must not use quotes around @ANI. When this parameter is expanded to the value, it will include the quotes.
 
  • Like
Reactions: jed and Evolute IT
Just set the SQL Statement expression to:
EXEC [CMC-3CX_DAY_LOOKUP_EMR2], @ANI

The parameter @ANI will be expanded to '8135551212'. That's why you must not use quotes around @ANI. When this parameter is expanded to the value, it will include the quotes.
Ok, got it, the @parameter is adding the ' characters (I was missing that point). I hope to have time to test it during a weekend maintenance window and will report back if I still have issues, but appreciate the help on this. As mentioned, it would be great if 3CX would update the documentation for CFD to match this new version including the new requirements of this section dealing with DB integrations and how to use the parameterized values in queries.
 
Is there a way to build without defining a project extension?
When CFAs are only used in forwarding/redirection scenarios an extension is not necessary

Facing same "limitation".
We have tens of Call Flows, set as queues fallback routes, and as a result not needing an extension number.
Plus have some automations based on the name of the Call Flow.
Would then be nice to reintroduce the option to build a Call Flow project without an extension number.

A workaround is to unzip the build and to empty the <extension> property from the manifest.xml file, but rather not convenient.

Thank you very much :)
 
  • Like
Reactions: dvml
Facing same "limitation".
We have tens of Call Flows, set as queues fallback routes, and as a result not needing an extension number.
Plus have some automations based on the name of the Call Flow.
Would then be nice to reintroduce the option to build a Call Flow project without an extension number.

A workaround is to unzip the build and to empty the <extension> property from the manifest.xml file, but rather not convenient.

Thank you very much :)
You can also simply create the app in the 3CX UI then paste the C# code.
 
  • Like
Reactions: fxbastler and rlg
Facing same "limitation".
We have tens of Call Flows, set as queues fallback routes, and as a result not needing an extension number.
Plus have some automations based on the name of the Call Flow.
Would then be nice to reintroduce the option to build a Call Flow project without an extension number.

A workaround is to unzip the build and to empty the &lt;extension&gt; property from the manifest.xml file, but rather not convenient.

Thank you very much :)
Looks like characters are not blocked, so using names is a way to not block extension numbers
 
  • Like
Reactions: rlg and Evolute IT
Double trick :cool:
Thank you !
 
Bit of a left field question, will the CFD become a web app at some point so that we don't have to run it as a Windows application?

We're currently not a Windows shop, so having a single machine or VM for this is our current solution.

Best,
Lance
 
Bit of a left field question, will the CFD become a web app at some point so that we don't have to run it as a Windows application?
It probably doesn't look like that. If you have worked with CFD for a while: it's not that easy to implement simply because of the scope, the possibilities and the simplicity of CFD. It's impossible to predict when and if that will happen.

If you have the knowledge, then use call flow apps. But that's a whole different level, both in terms of the need for programming skills and the possibilities when using the apps.
 
Ok, got it, the @parameter is adding the ' characters (I was missing that point). I hope to have time to test it during a weekend maintenance window and will report back if I still have issues, but appreciate the help on this. As mentioned, it would be great if 3CX would update the documentation for CFD to match this new version including the new requirements of this section dealing with DB integrations and how to use the parameterized values in queries.
Quick epilogue to this -- the posters were helpful but the syntax was still incorrect. The correct syntax to send (where MY_STORED_PROCEDURE is the SP name and +18135551212 is the session ani):
EXEC [MY_STORED_PROCEDURE],'+18135551212'

Was to build it in CFD as:
EXEC [MY_STORED_PROCEDURE] @ani

It did NOT work with the comma after the SP name (and as previously mentioned will not work if enclosing in single quotes). Appears that the @VARIABLE function adds the necessary single quote AND the comma characters.

Again, would be great to see some updated documentation on CFD V20, but after figuring this out am glad to be on a supported flow builder for this version with current and future support.

Thank you again for those that responded here.
 
Hi Team, sorry to ask, but I have to.
Will you be able to upload and use the CFD on 3CX Hosted by now? - If not, will it ever be possible?

Thank you in advance.
 
Hi @jed, I think it's already there with U5. Not tried it though.
 
  • Love
  • Like
Reactions: Evolute IT and jed
@jed
CFD Apps on 3CX hosted was announced with u4. I think it's a limitation on NFR only, can't test it because we have no customer 3CX hosted by 3CX.
 
  • Like
Reactions: jed
Thank you @edossantos_sipcaller and @fxbastler :)
Then I will tell my self-hosted customer that it is safe to move to the 3CX Hosting...... (no we do not have any 3CX Hosted ourselves either);)
 
Then I will tell my self-hosted customer that it is safe to move to the 3CX Hosting
Without testing it?

Maybe someone else can confirm this feature somehow.
 
Without testing it?
Yep, the customer will handle their 3CX Server themselves, and we cannot test, as we don't have other instances hosted out there. As you said it should be available on the 3CX Hosted by now, I will expect it to work on this platform as well as it usually does when 3CX Release something ;)
 
Yep, the customer will handle their 3CX Server themselves, and we cannot test, as we don't have other instances hosted out there. As you said it should be available on the 3CX Hosted by now, I will expect it to work on this platform as well as it usually does when 3CX Release something ;)
I'm just not sure if CFD apps are available on Pro or if ENT is required for hosted environments...
 
  • Like
Reactions: jed

Latest Posts

Forum statistics

Threads
111,929
Messages
589,783
Members
164,802
Latest member
SpacetelSupport