Page 1 of 1

Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Fri Mar 06, 2015 6:15 pm
by jatomusic
Hello, First I'd like to say this is one amazing community. The fact that untill now I had not needed to post shows how much involvement everyone has.

I'm having a very frustrating issue. I am attempting to utilize the non agent api. My use is to automatically update our clients on updates from our crm with voice broadcast. So I tried first to just test resetting a list

I tried this
/vicidial/non_agent_api.php?source=test&user=XXXX&pass=XXXX&function=update_list&list_id=501&delete_leads=Y


and it returend list not found, although I know the list exist and its name is proper
ERROR: update_list LIST DOES NOT EXIST: |XXXX|501

So just for testing I tried to create a list.
/vicidial/non_agent_api.php?source=test&function=add_list&user=XXXX&pass=XXXX&list_id=1101&list_name=Test+API+list&campaign_id=PSLS

I get this.
ERROR: add_list CAMPAIGN DOES NOT EXIST: |XXXX|PSLS

What am I overlooking. I know the campaign and list both exist, this happens regardless of campaig nor list i try to change. I have not tested other api code.

This has had me going crazy for a while.

I enabled non agent api access for the user, and for testing enabled all the options except the ones that limited the user, I even checked the db for the user incase there were fields unavailable.

I do not understand why it returns that the list and campaign do not exist. Does anyone have any experience in this?

I totally cannot remember the required system stats to post, I see them all the time and now I just cant remember. But I did build the system from goautodial ce 3.3

Re: Create List API Error-"Campaign does not exist" when it

PostPosted: Tue Mar 10, 2015 10:18 am
by jatomusic
Still scratching my head on this one, anyone have any ideas?

Re: Create List API Error-"Campaign does not exist" when it

PostPosted: Tue Mar 10, 2015 10:24 am
by jatomusic
A quick thought just popped in my head. A common problem with vicidial pointers to the server address are alwas missed matched from install to production. Does any one have experience with the api and where it tries to connect to the server? or maybe thats the wrong direction, since it does validate the user correctly it just cannot find the right list or campaings and returns it does not exist.

Re: Create List API Error-"Campaign does not exist" when it

PostPosted: Tue Mar 10, 2015 10:32 am
by jatomusic
I was wrong, after looking at the code I noticed it checking user_groups and once I changed my API user to the ADMIN group the string returned success!

Re: Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Tue Mar 10, 2015 10:50 am
by jatomusic
goautodialce3.3.iso | Vicidial 2.9-441a Build 140612-1628 | Asterisk 1.8.23.0-1 | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation? Unsure as it is goautodial ce 3.3 | AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ 2310.507Mhz 2G Ram | Linksys EG1032 v3 Instant Gigabit Network Adapter

Re: Create List API Error-"Campaign does not exist" when it

PostPosted: Tue Mar 10, 2015 2:52 pm
by williamconley
jatomusic wrote:I was wrong, after looking at the code I noticed it checking user_groups and once I changed my API user to the ADMIN group the string returned success!

Good postback. List existed, but the user credentials you used did not have permission to view that list. So it did not exist ... for that user. Interesting.

I wonder if the api log had a more "robust" entry (for troubleshooting).

Re: Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Tue Mar 10, 2015 3:20 pm
by jatomusic
Where is the api log? i'll check

Re: Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Tue Mar 10, 2015 3:58 pm
by williamconley
jatomusic wrote:Where is the api log? i'll check

it's a table. look in the DB.

Re: Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Tue Mar 10, 2015 4:10 pm
by jatomusic
williamconley wrote:
jatomusic wrote:Where is the api log? i'll check

it's a table. look in the DB.


Checked and the log includes the same errors returned by the server.

Re: Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Tue Mar 10, 2015 5:26 pm
by mflorell
If you run the API command with "&DB=1" in the URL, then you will get more debug output.

Re: Create List API Error-"Campaign does not exist" SOLVED

PostPosted: Fri Mar 20, 2015 2:03 pm
by jatomusic
Wow cool I will attempt to recreate the error with more debug out. It is great to test!