Ejemplo n.º 1
0
        private void astCon_Link(object sender, LinkEvent e)
        {
            if ((e.CallerId1 != e.CallerId2) && (e.Channel1 != e.Channel2))
            {
                // We have something to show.... the IDs are different....
                // Callerid1 is the callerid
                // Channel2 is the extn that answered

                String[] arrRegEx = System.Text.RegularExpressions.Regex.Split(e.Channel2, "/.+-");
                String extn = e.Channel2;

                foreach (String foo in arrRegEx)
                {
                    extn = extn.Replace(foo, "");
                }

                extn = extn.Replace("/", "");
                extn = extn.Replace("-", "");

                astTrayNotify.ShowBalloonTip(3000, "Answered Call", string.Format("AMI 1.0 - Answered call from {0} on extn {1}", e.CallerId1, extn), ToolTipIcon.Info);

            }
        }
Ejemplo n.º 2
0
		static void dam_Link(object sender, LinkEvent e)
		{
			Console.WriteLine("Link Event"
				+ "\n\tChannel1:\t" + e.Channel1
				+ "\n\tChannel2:\t" + e.Channel2
				);
			if (e.Channel1.StartsWith(ORIGINATE_CHANNEL) || e.Channel2.StartsWith(ORIGINATE_CHANNEL))
				monitorChannel = e.Channel1;
		}