external_hangup API request deletes data.
Posted: Wed May 15, 2019 8:54 pm
We have a custom front end for Vicidial. and I am encountering an issue where the data isn't saving when I end the call and I believe this is due to a problem with Vicidial's external_hangup API function.
In the custom screens, ending a call executes the following functions (using API) in this order:
1) external_hangup
2) update_lead
3) external_status
I can see that the lead gets updated in SQL after update_lead runs, but a second later, the newly updated record gets cleared, and after doing some troubleshooting, I figured out that external_hangup is responsible for this.
The evidence for this:
I run the following in SQL (while the lead is incall):
Then I confirm the record has the new value:
Then I run the following (just through a web browser) to hangup the call:
The call hangs up, like I expect.
Now I Check the record again:
But the first_name value is blank.
Am I right in thinking there is an issue with the external_hangup function? Or am I doing something wrong?
ViciBox: 8.1.2 | VERSION: 2.14b0.5 | SVN: 3063 | Clusters: 1 DB / 4 Web/Asterisk Build: 190121-2019
In the custom screens, ending a call executes the following functions (using API) in this order:
1) external_hangup
2) update_lead
3) external_status
I can see that the lead gets updated in SQL after update_lead runs, but a second later, the newly updated record gets cleared, and after doing some troubleshooting, I figured out that external_hangup is responsible for this.
The evidence for this:
I run the following in SQL (while the lead is incall):
- Code: Select all
UPDATE vicidial_list SET first_name = 'Test' WHERE lead_id = 1234
Then I confirm the record has the new value:
- Code: Select all
SELECT first_name from vicidial_list where lead_id = 1234
Then I run the following (just through a web browser) to hangup the call:
- Code: Select all
http://10.1.0.29/vicidial/api.php?source=XXXX&user=XXXX&pass=XXXX=&function=external_hangup&value=1
The call hangs up, like I expect.
Now I Check the record again:
- Code: Select all
SELECT first_name from vicidial_list where lead_id = 1234
But the first_name value is blank.
Am I right in thinking there is an issue with the external_hangup function? Or am I doing something wrong?
ViciBox: 8.1.2 | VERSION: 2.14b0.5 | SVN: 3063 | Clusters: 1 DB / 4 Web/Asterisk Build: 190121-2019