Added add_dnc_phone and add_fpg_phone Non-agent API functions

git-svn-id: svn://192.168.202.10@3165 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2019-11-14 02:49:15 +00:00
parent 83b2c24278
commit 3418327b9e
3 changed files with 270 additions and 6 deletions
+49 -1
View File
@@ -1,4 +1,4 @@
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2019-11-07
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2019-11-13
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -51,6 +51,9 @@ call_dispo_report - call disposition breakdown report
lead_callback_info - outputs scheduled callback data for a specific lead
agent_campaigns - looks up allowed campaigns/in-groups for a specific user
update_cid_group_entry - updates CID Group entries
add_dnc_phone - adds a phone number to one of the DNC lists
add_fpg_phone - adds a phone number to a Filter Phone Group
New scripts:
/vicidial/non_agent_api.php - the script that is accessed to execute commands
@@ -147,6 +150,7 @@ Changes:
190703-0858 - Added custom_fields_copy option to add_list function
190930-1629 - Added list_description field to add_list and update_list functions
191107-1143 - Added list_info function
191113-1758 - Added add_dnc_phone and add_fpg_phone functions
API Functions use the 'function' variable
@@ -1205,6 +1209,50 @@ SUCCESS: add_group_alias GROUP ALIAS HAS BEEN ADDED - 6666|7275551212|test_group
--------------------------------------------------------------------------------
add_dnc_phone - adds phone number to a DNC list in the system
NOTE: api user for this function must have user_level set to 8 or higher and "modify lists" enabled
REQUIRED FIELDS-
phone_number - 6-20 characters
campaign_id - 2-30 characters, should be a valid campaign ID or "SYSTEM_INTERNAL" for the internal DNC list
Example URL strings for API calls:
http://server/vicidial/non_agent_api.php?source=test&function=add_dnc_phone&user=6666&pass=1234&phone_number=7275551212&campaign_id=TESTCAMP
http://server/vicidial/non_agent_api.php?source=test&function=add_dnc_phone&user=6666&pass=1234&phone_number=7275551212&campaign_id=SYSTEM_INTERNAL
Example responses:
ERROR: add_dnc_phone USER DOES NOT HAVE PERMISSION TO ADD DNC NUMBERS - 6666|0
ERROR: add_dnc_phone YOU MUST USE ALL REQUIRED FIELDS - 6666|||1000
ERROR: add_dnc_phone DNC NUMBER ALREADY EXISTS - 6666|7275551212
SUCCESS: add_dnc_phone DNC NUMBER HAS BEEN ADDED - 6666|7275551212|TESTCAMP
--------------------------------------------------------------------------------
add_fpg_phone - adds phone number to a Filter Phone Group in the system
NOTE: api user for this function must have user_level set to 8 or higher and "modify lists" enabled
REQUIRED FIELDS-
phone_number - 6-20 characters
group - 2-30 characters, should be a valid Filter Phone Group ID in the system
Example URL strings for API calls:
http://server/vicidial/non_agent_api.php?source=test&function=add_fpg_phone&user=6666&pass=1234&phone_number=7275551212&group=TEST_IN_FILTER
Example responses:
ERROR: add_fpg_phone USER DOES NOT HAVE PERMISSION TO ADD FILTER PHONE GROUP NUMBERS - 6666|0
ERROR: add_fpg_phone YOU MUST USE ALL REQUIRED FIELDS - 6666|||1000
ERROR: add_fpg_phone FILTER PHONE GROUP DOES NOT EXIST - 6666|TEST_IN_FILTER2
ERROR: add_fpg_phone FILTER PHONE GROUP NUMBER ALREADY EXISTS - 6666|7275551212|TEST_IN_FILTER
SUCCESS: add_fpg_phone FILTER PHONE GROUP NUMBER HAS BEEN ADDED - 6666|7275551212|TEST_IN_FILTER
--------------------------------------------------------------------------------
add_phone - adds a phone to the system