Skip to content

652 logger for in/out Xuc messages (Ami, webscocket)

username-removed-730944 requested to merge 652-external-messages-logger into master

Prepare logger:

  • for all incoming and outgoing Xuc messages (AMI, WebSockets,...)
  • log as JSON
  • logging to separate file inside ./logs/
  • turned off by default, enable/disable per channel and direction

Closes #652

Sample log content:

14:45:48.366 - ►►► OUT AMI {
  "class": "getlist",
  "commandid": 65,
  "function": "updateconfig",
  "listname": "users",
  "tid": "1",
  "tipbxid": "xivo"
}
14:45:48.366 - ►►► OUT WS.user=aaaa {
  "msgType" : "UserStatusUpdate",
  "ctiMessage" : {
    "status" : "available"
  }
}
14:45:48.366 - ◀◀◀ IN WS.user=aaaa {
  "msgType" : "UserStatusUpdate",
  "ctiMessage" : {
    "status" : "available"
  }
}
14:45:48.367 - ◀◀◀ IN AMI {
  "function" : "updateconfig",
  "listname" : "users",
  "tipbxid" : "xivo",
  "timenow" : 1.484574348347448E9,
  "tid" : "1",
  "config" : {
    "enablednd" : false,
    "destrna" : "",
    "enablerna" : 0,
    "firstname" : "aaaa",
    "lastname" : "aaaa",
    "enableunc" : 0,
    "destbusy" : "1001",
    "enablebusy" : 0,
    "voicemailid" : 1,
    "incallfilter" : 0,
    "destunc" : "",
    "enablevoicemail" : 1,
    "xivo_uuid" : "2d5813d9-d72a-423c-9941-8bcde39c8785",
    "enablexfer" : 1,
    "fullname" : "aaaa aaaa",
    "agentid" : 5,
    "mobilephonenumber" : "01230041305",
    "linelist" : [ "1" ]
  },
  "class" : "getlist"
} -> org.xivo.cti.message.UserConfigUpdate@2af5ea37[userId=1,dndEnabled=false,naFwdEnabled=false,naFwdDestination=,uncFwdEnabled=false,uncFwdDestination=,busyFwdEnabled=false,busyFwdDestination=1001,firstName=aaaa,lastName=aaaa,fullName=aaaa aaaa,mobileNumber=01230041305,agentId=5,lineIds=[1],voiceMailId=1,voiceMailEnabled=true]
14:45:48.371 - ►►► OUT AMI {
  "class": "getlist",
  "commandid": 66,
  "function": "updatestatus",
  "listname": "voicemails",
  "tid": "1",
  "tipbxid": "xivo"
}

Merge request reports