/// <summary>
        /// Add new entry in a buddy list and subscribe presence
        /// </summary>
        /// <param name="ident">Buddy address (without hostname part</param>
        /// <param name="presence">subscribe presence flag</param>
        /// <returns></returns>
        public int addBuddy(string name, bool presence, int accId)
        {
            string sipuri = "";

            if (!pjsipStackProxy.Instance.IsInitialized)
            {
                return(-1);
            }

            // check if name contains URI
            if (name.IndexOf("sip:") == 0)
            {
                // do nothing...
                sipuri = name;
            }
            else
            {
                sipuri = "sip:" + name + "@" + Config.Accounts[accId].HostName;
            }
            // check transport - if TCP add transport=TCP
            sipuri = pjsipStackProxy.Instance.SetTransport(accId, sipuri);

            return(PjsipMethods.dll_addBuddy(sipuri, presence));
        }