Start call from custom function

Start call from custom function

Hello,

I need to create and start a current call from a custom function.

Any suggestions ?

How can I get info and related commands and functions about this ?

I have made this code. It register the call as a completed call.

leadDetails = zoho.crm.getRecordById("Leads",leadId.toLong());
mp = Map();
mp.put("Subject","Cold Call");
mp.put("Owner",ifnull(leadDetails.get("Owner"),"").get("id"));
mp.put("Call_Type","Outbound");
mp.put("$se_module","Leads");
mp.put("What_Id",leadId);
mp.put("$which_call","CurrentCall");
create = zoho.crm.create("Calls",mp);
info mp;
info create;
return "Success";