Exemple #1
0
        /// <summary>
        /// Zrób ramkę wyrejestrowującą z modułu SMS
        /// </summary>
        /// <returns></returns>
        public string SMSUnregister_REQ()
        {
            XCTIP    packet   = new XCTIP();
            XCTIPSMS xCTIPSMS = new XCTIPSMS();
            XCTIPSMSUnregister_REQ unregister_REQ = new XCTIPSMSUnregister_REQ
            {
                CId = id++.ToString()
            };

            xCTIPSMS.Unregister_REQ = new XCTIPSMSUnregister_REQ[] { unregister_REQ };
            packet.SMSItems         = new XCTIPSMS[] { xCTIPSMS };
            String xml = ServiceXML.GenericSerialize(packet, true);

            return(xml);
        }
Exemple #2
0
        /// <summary>
        /// Zrób ramkę rejestrującą do modułu SMS
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        public string SMSRegister_REQ(out string rid)
        {
            XCTIP                packet       = new XCTIP();
            XCTIPSMS             xCTIPSMS     = new XCTIPSMS();
            XCTIPSMSRegister_REQ register_REQ = new XCTIPSMSRegister_REQ
            {
                CId = id++.ToString()
            };

            xCTIPSMS.Register_REQ = new XCTIPSMSRegister_REQ[] { register_REQ };
            packet.SMSItems       = new XCTIPSMS[] { xCTIPSMS };
            String xml = ServiceXML.GenericSerialize(packet, true);

            rid = register_REQ.CId;
            return(xml);
        }
Exemple #3
0
        /// <summary>
        /// Zrób ramkę z smsem
        /// </summary>
        /// <param name="number"></param>
        /// <param name="smsId"></param>
        /// <param name="text"></param>
        /// <param name="dontBuffer"></param>
        /// <param name="userData"></param>
        /// <param name="rid"></param>
        /// <returns></returns>
        public string SMSSend_REQ(string number, string smsId, string text, string dontBuffer, string userData, out string rid)
        {
            XCTIP            packet   = new XCTIP();
            XCTIPSMS         xCTIPSMS = new XCTIPSMS();
            XCTIPSMSSend_REQ send_REQ = new XCTIPSMSSend_REQ
            {
                CId        = id++.ToString(),
                Number     = number,
                SMSId      = smsId,
                Type       = "Internal",
                Text       = text,
                DontBuffer = dontBuffer,
                UserData   = userData
            };

            xCTIPSMS.Send_REQ = new XCTIPSMSSend_REQ[] { send_REQ };
            packet.SMSItems   = new XCTIPSMS[] { xCTIPSMS };
            String xml = ServiceXML.GenericSerialize(packet, true);

            rid = send_REQ.CId;
            return(xml);
        }