Skip to content

Commit

Permalink
SIP: export metadata via json
Browse files Browse the repository at this point in the history
Fix:1bda2bf41
  • Loading branch information
IvanNardi committed Nov 26, 2024
1 parent d93fd27 commit 14cbefe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/ndpi_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,19 @@ int ndpi_dpi2json(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_serialize_end_of_block(serializer);
break;

case NDPI_PROTOCOL_SIP:
ndpi_serialize_start_of_block(serializer, "sip");
if(flow->protos.sip.from)
ndpi_serialize_string_string(serializer, "from", flow->protos.sip.from);
if(flow->protos.sip.from_imsi[0] != '\0')
ndpi_serialize_string_string(serializer, "from_imsi", flow->protos.sip.from_imsi);
if(flow->protos.sip.to)
ndpi_serialize_string_string(serializer, "to", flow->protos.sip.to);
if(flow->protos.sip.to_imsi[0] != '\0')
ndpi_serialize_string_string(serializer, "to_imsi", flow->protos.sip.to_imsi);
ndpi_serialize_end_of_block(serializer);
break;

case NDPI_PROTOCOL_TLS:
case NDPI_PROTOCOL_DTLS:
ndpi_tls2json(serializer, flow);
Expand Down

0 comments on commit 14cbefe

Please sign in to comment.