ERROR: NO FUNCTION SPECIFIED

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

ERROR: NO FUNCTION SPECIFIED

Postby Saurav » Wed Feb 03, 2021 9:50 am

I am trying to get all the campaigns , reports and leads , using the non agent API calls. But they all through the same error as 'Error: No Function Specified'. I have provided the appropriate Server , user and password in the api url. Please help
Saurav
 
Posts: 4
Joined: Fri Jan 29, 2021 6:21 am

Re: ERROR: NO FUNCTION SPECIFIED

Postby carpenox » Wed Feb 03, 2021 12:10 pm

check out https://cyburityllc.com/?p=1366 for a better understanding, make sure to check out the link to vicidial.org/docs/
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: ERROR: NO FUNCTION SPECIFIED

Postby Saurav » Thu Feb 04, 2021 4:21 am

Thanks for your response. I have gone through the documentation and that link. But still got the same error .
I am making the request for getting all the campaigns list as :-
http://server/vicidial/non_agent_api.ph ... &pass=1234
, where server is my server IP , user is my User and pass is the password that i have set.

=> The user level is set to 9, so that it will have the access for campaigns and all.

=> It returns the error as "Error : No Function Specified".
What am i doing wrong ? Please help
Saurav
 
Posts: 4
Joined: Fri Jan 29, 2021 6:21 am

Re: ERROR: NO FUNCTION SPECIFIED

Postby striker » Thu Feb 04, 2021 6:12 am

The function which you mentioned (campaigns_list) is not available in non_agent_api.php .
what version of vicidial you are using, latest vicidial have this function written in non_agent_api.php.

Check your non_agent_api.php file and search for word campaigns_list exists or not.
if not you might need to update to latest vicidial version.

the non_agent_api.php file will be located in your vicidial folder of your webdirectory
/var/www/html/vicidial or /srv/www/htdocs/vicidial
www.striker24x7.com www.youtube.com/c/striker24x7 Telegram/skype id : striker24x7
striker
 
Posts: 962
Joined: Sun Jun 06, 2010 10:25 am

Re: ERROR: NO FUNCTION SPECIFIED

Postby carpenox » Thu Feb 04, 2021 7:26 am

campaigns_list - displays information about all campaigns in the system

NOTE: api user for this function must have user_level set to 7 or higher

REQUIRED FIELDS-
source - description of what originated the API call (maximum 20 characters)

OPTIONAL FIELDS-
campaign_id - 2-8 characters, for all campaigns, leave blank

SETTINGS FIELDS-
stage - the format of the exported data: csv, tab, pipe(default)
header - include a header(YES) or not(NO). This is optional, default is not to include a header

Example URL strings for API calls:
Code: Select all
http://server/vicidial/non_agent_api.php?source=test&function=campaigns_list&user=6666&pass=1234
http://server/vicidial/non_agent_api.php?source=test&function=campaigns_list&campaign_id=TESTCAMP&user=6666&pass=1234&stage=csv


Example responses:
ERROR: campaigns_list USER DOES NOT HAVE PERMISSION TO GET CAMPAIGN INFO - 6666|0
ERROR: campaigns_list THIS USER HAS NO VIEWABLE CAMPAIGNS - 6666

A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following format:
campaign_id|campaign_name|active|user_group|dial_method|dial_level|lead_order|dial_statuses
TESTCAMP|Test Campaign|Y|---ALL---|INBOUND_MAN|1|DOWN|PDROP DROP B NEW
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: ERROR: NO FUNCTION SPECIFIED

Postby Saurav » Thu Feb 04, 2021 7:39 am

Now I understand. Thank you so much for your reply. It seems like the function really doesn't exists. The version is 2.12-86
Saurav
 
Posts: 4
Joined: Fri Jan 29, 2021 6:21 am

Re: ERROR: NO FUNCTION SPECIFIED

Postby carpenox » Thu Feb 04, 2021 8:56 am

You may want to do a svn upgrade then: check out how to do so here if you are unsure: https://cyburityllc.com/?p=1512
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: ERROR: NO FUNCTION SPECIFIED

Postby carpenox » Thu Feb 04, 2021 9:04 am

it should output like this:

Image
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 49 guests