anil.kumar | 2017-10-22 04:00:01 UTC | #1
Hi,
We currently are using webservices bridge actions using the bridge server. But we now want to move to Webservices data actions without having the bridge server. I have configured on data action to hit a Rest API of our application on one of our development environments on AWS. But when I test the action using the Test Action button, I always get a request timed out error. I have tried whitelisting the purecloud IP addresses on our servers to allow connections from purecloud but no success yet. I confirm that the URL is correct as it is the same url which we use in the bridge actions. There are no validation errors in the data action and the action is successfully published as well. Here is a screen shot of the error. I can understand that the problem here is with respect to the connectivity, but not sure where is it exactly. We are not receiving any requests on our servers after hitting the test action button.
Can you please let me know if I am missing some configuration or is there any configuration that I need to consider for the actions to work ?
<img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/8be0f7734e1998316e43dd59fd0c396cd6b4bda5.png" width="690" height="363">
Thanks, Anil
anon40790644 | 2017-10-22 23:08:22 UTC | #2
Hi Anil, Are you using an HTTPS endpoint for the target URL? HTTP (unencrypted). Could you please provide the config of your action?
Jason_Mathison | 2017-10-23 17:45:59 UTC | #3
To expand on Andrew's question, the cloud based web service actions will only connect to HTTPS endpoints.
If the issue isn't HTTP vs. HTTPS, please include a correlation ID of a failed test in a text format so we don't have to try to type it in by hand :)
jrt | 2017-10-23 20:47:09 UTC | #4
Also - I ran into this recently. If your site doesn't handle CORS request correctly, you'll get this same error message. Make sure you have it set up to handle CORS requests from "app.mypurecloud.com.au" based on the above.
anil.kumar | 2017-10-25 01:13:22 UTC | #5
Hi, Thanks for the answers. I am using a HTTPS endpoint and not HTTP. Will check regarding the CORS requests being allowed from purecloud. Here is my configuration of the action :slight_smile: Input Contract: { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "phoneNumber": { "type": "string" } } }
Output Contract: { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "uniqueDobnresultsNum": { "type": "string" }, "contact1": { "type": "string" }, "contact2": { "type": "string" }, "contact3": { "type": "string" } }, "additionalProperties": true }
Configuration : Request: { "requestUrlTemplate": "https://qa1-elb.belongtest.com.au/project-eve/external/contact/datadip", "requestType": "POST", "headers": { "content-type": "application/json" }, "requestTemplate": "${input.rawRequest}" }
Response: { "translationMap": {}, "successTemplate": "${rawResult}" }
Thanks, Anil
Jason_Mathison | 2017-10-26 13:31:13 UTC | #6
Looking at the logs the issue is that the PureCloud Data Action Service can't make a connection to the URL that you have configured. The service makes two attempts to connect, which each take a long time because there is no answer from the other side. Before our service finally gives up on connecting and has sent a response back, something else between our service and the UI has given up and sent a 504 back.
You might consider turning off the firewall around your datadip service, running a quick test, and then turning the firewall back on. While I don't know if that is viable in your situation, it would prove/disprove that the firewall rules are the issue. Also, if it works, you would know what IP address the test came from, which might help you sort out the firewall rules.
anil.kumar | 2017-10-26 22:48:55 UTC | #7
Thanks Jason, Turning off the firewall would not be feasible for us. However, I still have a question around IP addresses.. Does purecloud have a fixed set of IP addresses for outbound connections ? meaning, when purecloud tries to connect to other external systems, doesn't it provide with a fixed set of IP range for other systems to enable connection on those IPs ? I know other IP ranges are governed by AWS, but I thought the outbound IP range should have been constant.
Regards, Anil
Jason_Mathison | 2017-10-27 14:17:25 UTC | #8
My initial research doesn't show any way for us to specify or limit the outbound IP address that our service uses for outbound connections. I will enter a ticket for us to additional research on this.
Here is our documentation on what IP addresses may be used: https://help.mypurecloud.com/faq/public-ip-addresses-purecloud-use/
system | 2017-11-27 14:17:41 UTC | #9
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 1988