add_contact
This method allows to create new contact
Definition:
add_contact( uuid, ... );
uuid - user id
... - name-value pairs for the attributes to update "atribute1", "value1","atribute2", "value2"
working example:
This example will create contact with administrator access type
uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_contact", who, "userid", "Admin", "last_name", "Adminuser", "access_type", 10002);
if (msg_error()) {
logf(ERROR, "get_failed %s",msg[0]);
}
}