示例#1
0
        public Form1()
        {
            InitializeComponent();

            bool success;

            mydel = new PrintDebug(PrintDebugMethod);

            /* Create call back */
            callback = new MyCallback(this);
            /* Create and configure the IMS/LTE stack */
            // stack = new SipStack(callback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM));
            stack = new SipStack(callback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM));

            if (!stack.isValid())
            {
                this.textBoxDebug.Text = "Invalid stack";
                return;
            }

            stack.addHeader("Allow", "INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER");
            stack.addHeader("Privacy", "header; id");
            stack.addHeader("P-Access-Network-Info", "ADSL;utran-cell-id-3gpp=00000000");
            stack.addHeader("User-Agent", "IM-client/OMA1.0 doubango/v1.0.0");

            /* set password */
            success = stack.setPassword(PASSWORD);
            /* Sets Proxy-CSCF */
            success = stack.setProxyCSCF(PROXY_CSCF_IP, PROXY_CSCF_PORT, "udp", "ipv4");
            /* Starts the stack */
            success = stack.start();
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            bool success;

            mydel = new PrintDebug(PrintDebugMethod);

            /* Create call back */
            callback = new MyCallback(this);
            /* Create and configure the IMS/LTE stack */
            // stack = new SipStack(callback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM));
            stack = new SipStack(callback, String.Format("sip:{0}", REALM), String.Format("{0}@{1}", USER, REALM), String.Format("sip:{0}@{1}", USER, REALM));

            if (!stack.isValid())
            {
                this.textBoxDebug.Text = "Invalid stack";
                return;
            }

            stack.addHeader("Allow", "INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER");
            stack.addHeader("Privacy", "header; id");
            stack.addHeader("P-Access-Network-Info", "ADSL;utran-cell-id-3gpp=00000000");
            stack.addHeader("User-Agent", "IM-client/OMA1.0 doubango/v1.0.0");

            /* set password */
            success = stack.setPassword(PASSWORD);
            /* Sets Proxy-CSCF */
            success = stack.setProxyCSCF(PROXY_CSCF_IP, PROXY_CSCF_PORT, "udp", "ipv4");
            /* Starts the stack */
            success = stack.start();
        }