Extracting information from an API

Status
Not open for further replies.

valentin.carmont

Free User
Joined
May 17, 2023
Messages
29
Reaction score
2
Good morning,

I am creating a call flow for my company, we have business software that sends information to an online API. This site gives me true or false information that corresponds to the saturation of my services. I would like to make sure to retrieve this information in order to route my calls accordingly.

I am trying to go through the rest web service of the CFD to perform my action.
However, I cannot retrieve the information sent by my API.

Could you help me ?

thank you in advance, I send you as many elements as possible to be as clear as possible

1685442065410.png


And my api page looks like this:

1685442235663.png



behind this, I have a passer which retrieves the information sent for my web service and which stores in a variable

1685442302693.png

1685442390874.png


I carried out tests by sending a logger by email but my variable callfow$.ServiceSature returns nothing to me

1685442517070.png
1685442587067.png

Here is the return email:
1685442682692.png
 

Attachments

  • 1685442539062.png
    1685442539062.png
    28 KB · Views: 3
In order to investigate the issue, please enable verbose logs from the 3CX Console > Dashboard > Activity Log > Settings. Then make a test call where you reproduce the issue, and check the 3CXCallFlow.log file that you can download from the 3CX Console > Dashboard > Activity Log > Logs button > Instance folder. That's better than sending an email, as you will have many more details in the log.

Said this, I think the issue is that you're trying to use the JSON / XML Parser component to analyze the web service response, however the response seems to be just plain text. This is something that can be verified from the logs. If that's the case, you don't need this component, you can just get the response from the web service as text....
 
  • Like
Reactions: Evolute IT
thank you for your feedback, I managed to get out of it the problem came from my API


I have another question, is it possible to make multiple condition in the conditions. Let me explain

For the management of the calls taken from my various services, I would like to do a double check, namely:

If the did number corresponds to my service number and my statustakencallvisit variable is set to true, then the call is transferred


here is the check put in place but it does not work, even if the status is False the call is transferred when it should stop at my saturation branch

vérification of the saturation status :

OR(EQUAL(callflow$.API_PriseAppelVisite,"False"),EQUAL(callflow$.API_PriseAppelConsult,"False"))

verification for the branch visite :
OR(EQUAL(callflow$.API_PriseAppelVisite,"True"),AND(EQUAL(session.did,callflow$.SDA_Visite)))
 

Attachments

I don't have the CFD project sources to follow the execution path from the logs. But what I can tell you is that a common error is not having an Inbound DID Rule in place, which will cause that the session.did variable remains empty. Please check if this is your case. It's not enough having the number configured in your SIP Trunk, you need an Inbound DID Rule matching the number being called.
 
Status
Not open for further replies.

Forum statistics

Threads
111,973
Messages
590,078
Members
164,896
Latest member
sameage