Understand drachtio message types and structure
mainDrachtio uses JSON messaging over TCP to control the server. All messages include a type property which can be one of three values:
request: A command sent to the server. Must be acknowledged by exactly one response.rid: A unique string generated by the sender to match responses to requests.command: A string indicating the action.data: An object containing command-specific parameters.
response: An acknowledgment of a request.rid: Theridfrom the original request.data: An object containing response details.
sip: A message containing SIP data.msg: The SIP message data.transactionId: Used to match SIP responses to requests.