public void phoneRinging(System.Collections.Generic.Dictionary <string, string> mctabuff_msg) { string cg = mctabuff_msg["CALL_ID"]; string ani = UrlGet(mctabuff_msg, "ANumber"); string bni = UrlGet(mctabuff_msg, "BNumber"); string cad = UrlGet(mctabuff_msg, "ExtraData"); string rmi = UrlGet(mctabuff_msg, "REMOTE_INFO"); //remote info containing caller names Console.WriteLine("RMI in alerting phase: " + rmi); //ani = (rmi, "EN"); //crete new phoneCall object phoneCall pcall = new phoneCall(cg, ani, bni, ani, cad, "InComing"); //add call to dict to hold the ongoing calls callsDict.Add(pcall.callId, pcall); //add call also ToListView; display caller number; expecting an incoming call image to be in postion 0 ListViewItem call = new ListViewItem(pcall.CallerNumber, 0); call.Tag = pcall.callId; listCalls.Items.Add(call); if (listCalls.Items.Count == 1) { listCalls.Items[0].Focused = true; listCalls.Items[0].Selected = true; } handleCallAttachedData(cad); this.toolStripStatusLabel2.Text = "Ringing"; //later update remote info on top of ani handleRemoteInfo(getRemoteInfo("EN", rmi), pcall.callId); }
public void callOut(System.Collections.Generic.Dictionary <string, string> mctabuff_msg) { string cg = mctabuff_msg["CALL_ID"]; string bni = UrlGet(mctabuff_msg, "BNumber"); string cad = UrlGet(mctabuff_msg, "ExtraData"); //create new phoneCall object phoneCall pcall = new phoneCall(cg, "Me", bni, bni, cad, "OutGoing"); //add call to dict of ongoing calls callsDict.Add(pcall.callId, pcall); //add call ToListView; show calledNumber; expecting call out image to be in postion 1 ListViewItem call = new ListViewItem(pcall.CalledNumber, 1); call.Tag = pcall.callId; listCalls.Items.Add(call); if (listCalls.Items.Count == 1) { listCalls.Items[0].Focused = true; listCalls.Items[0].Selected = true; } this.toolStripStatusLabel2.Text = "Calling.."; }