Example #1
0
        public async static Task <List <portCallMessage> > getEvents(string callID)
        {
            string        date    = "2000-04-03T14:00:34Z";
            List <Filter> filters = new List <Filter>();
            Filter        filter1 = new Filter(FilterType.PORT_CALL, callID);

            filters.Add(filter1);

            string q = await QueueHandler.createFilteredQueue(filters, date);

            var list = await QueueHandler.pollQueue(q);


            return(list);
        }
        public static async Task <List <string> > subscribe(string portCallId)
        {
            List <Filter> filter = new List <Filter>();

            filter.Add(new Filter(FilterType.PORT_CALL, portCallId));

            Console.WriteLine("Creating queue with Filter PORTCALL, " + portCallId + "...");

            string queueId = await QueueHandler.createFilteredQueue(filter);

            Console.WriteLine("Queue created with id: " + queueId + ", adding to subscribed list...");

            subscribedQueues.Add(queueId);

            Console.WriteLine("Added " + queueId + " to list of subscriptions");

            startTimer();

            return(subscribedQueues);
        }