.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Collections.Generic;

using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

using System.Linq;
					
public class Program
{
	public static void Main()
	{
             string input = @"42[""cti-agentes"",""{
    \""6139\"":{
        \""id_agents_interface\"":\""453\"",
        \""agent\"":\""6139\"",
        \""interface\"":\""contact1\"",
        \""logintime\"":\""2019-11-26 15:08:46\"",
        \""pausetime\"":\""2019-12-31 13:28:36\"",
        \""paused\"":\""si\"",
        \""id_pausa\"":null,
        \""invalid\"":\""no\"",
        \""invalidtime\"":null,
        \""fullcontact\"":\""contact1\"",
        \""textoterminal\"":\""contact1\""
        },
    \""6197\"":{
        \""id_agents_interface\"":\""5743\"",
        \""agent\"":\""6197\"",
        \""interface\"":\""contact1\"",
        \""logintime\"":\""2020-01-16 10:16:17\"",
        \""pausetime\"":null,
        \""paused\"":\""no\"",
        \""id_pausa\"":null,
        \""invalid\"":\""no\"",
        \""invalidtime\"":null,
        \""fullcontact\"":\""contact2\"",
        \""textoterminal\"":\""contact2\""
        }
}""]";
		Console.WriteLine(input);
		
		var withoutNumberPrefix = new string(input.SkipWhile(c=> Char.IsDigit(c)).ToArray());
		var fixedSize = input.Substring(2, input.Length - 2);
		var always42 = input.TrimStart(new[] { '4', '2' });


		var listResults = JsonConvert.DeserializeObject<string[]>(fixedSize);
		
		// my guess is that The first string is the name of the type. and the second the dictionary holding them.
		Console.WriteLine(listResults[0]);
		
		var result =  JsonConvert.DeserializeObject<Dictionary<int,CtiAgentes>>(listResults[1]);
		result[6139].Dump();
		
	}
	 public partial class CtiAgentes
    {
        [JsonProperty("id_agents_interface")]
        public int IdAgentsInterface { get; set; }

        [JsonProperty("agent")]
        public int Agent { get; set; }

        [JsonProperty("interface")]
        public string Interface { get; set; }

        [JsonProperty("logintime")]
        public DateTimeOffset Logintime { get; set; }

        [JsonProperty("pausetime")]
        public DateTimeOffset? Pausetime { get; set; }

        [JsonProperty("paused")]
        public string Paused { get; set; }

        [JsonProperty("id_pausa")]
        public object IdPausa { get; set; }

        [JsonProperty("invalid")]
        public string Invalid { get; set; }

        [JsonProperty("invalidtime")]
        public object Invalidtime { get; set; }

        [JsonProperty("fullcontact")]
        public string Fullcontact { get; set; }

        [JsonProperty("textoterminal")]
        public string Textoterminal { get; set; }
    }
}
;