====== Orignate Call ====== *Function: makeCallCJI(targetdn, targettype, agentgroupid, usertype, user, orgidentity, pwdtype, password, modeltype, model_id, userdata, callbackFuc, agentexten, callerid, callername, trunkidentity, cidtype) *Description: Orignate a call *Parameters: ^Params ^Type ^Description ^ |targetdn|String|Agent No. ( if it’s a internal call, and they must belong to same team) or put phone number if it’s an external call| |targettype|String |exter (external call) / inner (internal call)| |agentgroupid|String|id of the agent group| |usertype|String|agent / account| |user|String|Agent No. or Username| |orgidentity|String|The identity string of the team| |pwdtype|String|Use plaintext or md5 password for agent or account| |password|String|password| |modeltype|String|BusinessApp / Campaign / Virtualcustomer / Customerservice| |model_id|String|id of the model which you want to originate the call for| |userdata|String|user data, only valid when modeltype= Campaign, say you put “customer_id=109&pwd=asdfg” here, when you receive the call events, you will get userdata=’customer_id=109&pwd=asdfg’| |callbackFuc|String|callback function| |agentexten|String|optional, if you put this, system will bind the exten to agent before dial| |callerid|String|optional, callerId number| |callername|String|optional, callerId name| |trunkidentity|String|optional, server will use this trunk to dial if you put trunk identity string| |cidtype|String|optional, 0 means use callerId above, 1 means use trunk callerId, 2 means use device callerId| *Return Format: {code:code,message:message} *Return Type:JSON *Return Values: ^Value ^Description ^ |{code:1,message:message}|{code:Succeed,message:Messages}| |{code:2,message:message}|{code:Failed,message:Messages}|