sipcapture / captagent

100% Open-Source Packet Capture Agent for HEP
https://sipcapture.org
GNU Affero General Public License v3.0
168 stars 75 forks source link

Not seeing all json parsed data for SIP #77

Closed JoeOrtiz closed 8 years ago

JoeOrtiz commented 8 years ago

https://github.com/sipcapture/captagent/blob/master/src/modules/transport/json/transport_json.c#L232-L265

I see I'm suppose to see this extra data but I'm not seeing it in the json output, I just see this:

{"packet_id":"8198","my_time":1468723492,"ip_family":2,"ip_proto":17,"src_ip4":"10.15.8.17","dst_ip4":"10.15.8.21","src_port":5060,"dst_port":5080,"tss":1468723492,"tsu":468870,"payload":"OPTIONS sip:10.15.8.21:5080 SIP/2.0\r\nVia:
 SIP/2.0/UDP 184.178.213.230;branch=z9hG4bKa051.d41d8cd98f00b204e9800998ecf8427e.0\r\nTo: sip:10.15.8.21:5080\r\nFrom: <sip:sbc@testing-ss.com>;tag=106b3e421247d8b1b08929dc2eadc356-f128\r\nCSeq: 14 OPTIONS\r\nCall-ID: 5d214c9952b7b961-10317@10.15.8.16\r\nMax-Forwards
: 70\r\nContent-Length: 0\r\nUser-Agent: OpenSIPS (1.8.2-tls (x86_64/linux))\r\n\r\n:4006@497712.testing.com>;tag=456513032\r\nTo: <sip:4007@497712.testing.com>;tag=QQtkPBJtC10n\r\nCall-ID: 1916819864@192.168.1.86\r\nCSeq: 274 SUBSCRIBE\r\nContact: <sip:f56b31c6f45a
9c5cbfc73973db92b6df@10.15.7.65>\r\nAccept: application/dialog-info+xml\r\nMax-Forwards: 69\r\nUser-Agent: CREX-SIP-230P 6.70.37.11 ac:d1:80:00:20:14\r\nExpires: 3600\r\nEvent: dialog\r\nContent-Length: 0\r\n\r\nrefer\r\nSubscription-State: active;expires=3600\r\nCont
ent-Type: application/dialog-info+xml\r\nContent-Length: 159\r\n\r\n<?xml version=\"1.0\"?>\n<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"174\" state=\"full\" entity=\"sip:1302@504640.testing.com\">\n</dialog-info>\n","proto_type":1,"capt_id":2
001}

I don't want to reparse the payload data, curious on what could I do to make the json transport parse the above data for me and send it over as json?

adubovikov commented 8 years ago

you have to parse SIP message before send it in json transport.

adubovikov commented 8 years ago

I will close the ticket, pleas reopen if need