JavaScript API testing sample
*you need input correct & valid data for testing

please set the ip of astercc server, astercc_ip:
Agent Group(check-in/check-out)   (Pause/Continue)Service   ACW Off   Call   Consult   Transfer   bTransfer   Call Return   Conference   Hangup   Barge-in   Spy   Force Release   Whisper   Hold   Resume   Back Call   Set Device  
Login   Logout   ACW Mode   Workway Swtich   Agent Status   Agent Group Status   Import Data   Team Agent Status   Monitor Ctrl   Get Monitor   Queue Customer   Agent Real Time   Agent Today Statistic   DTMF   Set Var   Agent Transfer IVR  
Dialer Ctrl   Dialer Calllist   Aent Statistic  
Login
Function loginCJI(orgidentity,usertype,user,pwdtype,password,callbackFuc)
orgidentity usertype
user pwdtype
password callbackFuc callbackFucTest

Logout
Function logoutCJI(orgidentity,usertype,user,pwdtype,password,callbackFuc)
orgidentity usertype
user pwdtype
password callbackFuc callbackFucTest

Agent Group(check-in/check-out)
Function queueActionCJI(type,usertype,user,orgidentity,list,pwdtype,password,deviceexten,pushevent,callbackFuc)
type usertype
user orgidentity
deviceexten list
pwdtype password
pushevent callbackFuc callbackFucTest

(Pause/Continue)Service
Function queuePauseCJI(type,usertype,user,orgidentity,pwdtype,password,pause_reason,pushevent,callbackFuc)
type usertype
user orgidentity
pwdtype password
pause_reason pushevent
callbackFuc callbackFucTest dnd

ACW Mode
Function acwActionCJI(type,usertype,user,orgidentity,pwdtype,password,agent_group_id,pushevent,callbackFuc)
type usertype
user orgidentity
pwdtype password
agent_group_id pushevent
callbackFuc callbackFucTest    

ACW Off
Function acwOffCJI(usertype,user,orgidentity,pwdtype,password,pushevent,callbackFuc)
usertype user
orgidentity pwdtype
password pushevent
callbackFuc callbackFucTest    

Workway Mode
Function workwayActionCJI(status,usertype,user,orgidentity,pwdtype,password,agent_group_id,pushevent,callbackFuc)
status usertype
user orgidentity
pwdtype password
agent_group_id pushevent
callbackFuc callbackFucTest    

Call
Function makeCallCJI(targetdn,targettype,agentgroupid,usertype,user,orgidentity,pwdtype,password,modeltype,model_id,userdata,callbackFuc,agentexten,callerid,callername,trunkidentity,cidtype)
targetdn targettype
usertype user
pwdtype password
agentgroupid orgidentity
modeltype model_id
userdata agentexten
callerid callername
trunkidentity cidtype
callbackFuc callbackFucTest    

Consult
Function consultCJI(targetdn,agentgroupid,consulttype,pwdtype,password,usertype,user,orgidentity,callbackFuc)
targetdn agentgroupid
consulttype pwdtype
password usertype
user orgidentity
callbackFuc callbackFucTest    

bTransfer
Function bTransferCJI(targetdn,agentgroupid,consulttype,pwdtype,password,usertype,user,orgidentity,callbackFuc)
targetdn agentgroupid
consulttype pwdtype
password usertype
user orgidentity
callbackFuc callbackFucTest    

Transfer
Function transferCJI(pwdtype,password,usertype,user,orgidentity,callbackFuc)
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Call Return
Function callReturnCJI(pwdtype,password,usertype,user,orgidentity,callbackFuc)
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Conference
Function conferenceCJI(pwdtype,password,usertype,user,orgidentity,callbackFuc)
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Hangup
Function hangupCJI(uniqueid,targetagent,target,pwdtype,password,usertype,user,orgidentity,callbackFuc)
uniqueid targetagent
target pwdtype
password usertype
user orgidentity
callbackFuc callbackFucTest    

Barge-in
Function intrudeCJI(target,phonenumber,pwdtype,password,usertype,user,orgidentity,callbackFuc)
target phonenumber
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Spy
Function silentMonitorCJI(target,phonenumber,pwdtype,password,usertype,user,orgidentity,callbackFuc)
target phonenumber
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Force Release
Function forcedReleaseCJI(target,phonenumber,pwdtype,password,usertype,user,orgidentity,callbackFuc)
target phonenumber
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Whisper
Function whisperCJI(target,phonenumber,pwdtype,password,usertype,user,orgidentity,callbackFuc)
target phonenumber
pwdtype password
usertype user
orgidentity callbackFuc callbackFucTest

Agent Status
Function agentStatusCJI(orgidentity,usertype,user,pwdtype,password,callbackFuc)
orgidentity usertype
user pwdtype
password callbackFuc callbackFucTest

Agent Group Status
Function agentgroupStatusCJI(orgidentity,usertype,user,pwdtype,password,agent_group_id,status,callbackFuc)
agent_group_id status
orgidentity usertype
user pwdtype
password callbackFuc callbackFucTest

Hold
Function holdCJI(silence,orgidentity,usertype,user,pwdtype,password,callbackFuc)
silence orgidentity
usertype user
pwdtype password
callbackFuc callbackFucTest    

Resume
Function resumeCJI(orgidentity,usertype,user,pwdtype,password,callbackFuc)
orgidentity usertype
user pwdtype
password callbackFuc callbackFucTest

Back Call
Function backcallCJI(orgidentity, exten, targetdn, callerid, user, password, pwdtype, userdata, callbackFuc)
orgidentity exten
targetdn callerid
user password
pwdtype userdata
callbackFuc callbackFucTest    

Set Device
Function setdeviceCJI(orgidentity, exten, user, pwdtype, password, callbackFuc)
orgidentity exten
user pwdtype
password callbackFuc callbackFucTest

Import Data
Function importCJI(orgidentity, usertype, user, pwdtype, password, modeltype, model_id, source, context, source_user, source_pwd, exetime, delrow, phone_field, priority_field, dialtime_field, emptyagent, resetstatus, dupway, dupdiallist, changepackage, callbackFuc)
orgidentity usertype
user pwdtype
password modeltype
model_id source
context source_user
source_pwd exetime
delrow phone_field
priority_field dialtime_field
emptyagent resetstatus
dupway dupdiallist
changepackage callbackFuc callbackFucTest

Get all the agents status in the team
Function teamStatusCJI(orgidentity,usertype,user,pwdtype,password,status,callbackFuc)
orgidentity usertype
user pwdtype
password status
callbackFuc callbackFucTest    

Monitor Control
Function monitoCtrlCJI(action,usertype,user,orgidentity,pwdtype,password,pushevent,callbackFuc)
action usertype
user orgidentity
pwdtype password
callbackFuc callbackFucTest

Get Monitor
Function getMonitorCJI(sessionid,calldate,callbackFuc, mp3)
sessionid calldate
callbackFuc callbackFucTest MP3
filename

Queue Customer
Function queueCustomerNumCJI(orgidentity,queuenumber,prio,callbackFuc)
orgidentity queuenumber
prio callbackFuc callbackFucTest

Agent Real Time
Function agentRealtimeCJI(orgidentity,usertype,user,pwdtype,password,callbackFuc)
orgidentity usertype
user pwdtype
password callbackFuc callbackFucTest

Agent Today Statistic
Function agentStatisticDayCJI(orgidentity,usertype,user,pwdtype,password,agent_group_id,callbackFuc)
orgidentity usertype
user pwdtype
password agent_group_id
callbackFuc callbackFucTest    

Send DTMF
Function dtmfCJI(orgidentity,usertype,user,pwdtype,password,dtmf,callbackFuc)
orgidentity usertype
user pwdtype
password dtmf
callbackFuc callbackFucTest    

Set Var
Function setvarCJI(orgidentity,usertype,user,pwdtype,password,varname,varvalue,callbackFuc)
orgidentity usertype
user pwdtype
password varname
varvalue callbackFuc callbackFucTest

Agent Transfer IVR
Function agenttoivrCJI(orgidentity,usertype,user,pwdtype,password,ivrexten,ivrflow,transfer,callbackFuc)
orgidentity usertype
user pwdtype
password ivrexten
ivrflow transfer
callbackFuc callbackFucTest    

Dialer Control
Function dialerCtrlCJI(orgidentity, usertype, user, pwdtype, password, campaignid, action,dialertype,dialerval,dialermaxchannel,callbackFuc)
orgidentity usertype
user pwdtype
password campaignid
action dialertype
dialerval dialermaxchannel
callbackFuc callbackFucTest    

Dialer Calllist
Function dialerCalllistCJI(orgidentity, usertype, user, pwdtype, password, campaignid,callbackFuc)
orgidentity usertype
user pwdtype
password campaignid
callbackFuc callbackFucTest    

Agent Statistic
Function agentStatisticCJI(orgidentity, usertype, user, pwdtype, password, groupid, date,callbackFuc)
orgidentity usertype
user pwdtype
password groupid
date
callbackFuc callbackFucTest