sipcapture / homer

HOMER - 100% Open-Source SIP, VoIP, RTC Packet Capture & Monitoring
https://sipcapture.org
GNU Affero General Public License v3.0
1.58k stars 239 forks source link

3 Legs/call-ids Correlation Mapping #601

Closed idanam-del closed 1 year ago

idanam-del commented 1 year ago

Hey, this the example mapping for a 2 way correlation

Full Example for 2-way correlation Mapping

[
    {
       "source_field": "data_header.callid",
        "lookup_id": 1,
        "lookup_profile": "call",
        "append_sid": true,
        "lookup_field": "data_header->>'X-CID'",
        "lookup_range": [
            -300,
            200
        ]
    },
    {
        "source_field": "data_header.X-CID",
        "lookup_id": 1,
        "lookup_profile": "call",
        "append_sid": true,
        "lookup_field": "data_header->>'X-CID'",
        "lookup_range": [
            -300,
            200
        ]
    },
    {
        "source_field": "data_header.X-CID",
        "lookup_id": 1,
        "lookup_profile": "call",
        "append_sid": true,
        "lookup_field": "data_header->>'callid'",
        "lookup_range": [
            -300,
            200
        ]
    },
    {
        "source_field": "data_header.callid",
        "lookup_id": 1,
        "lookup_profile": "call",
        "lookup_field": "sid",
        "lookup_range": [
            -300,
            200
        ]
    }
]

What would be an example of a 3 way correlation?

  1. Phone -> Sip Server
  2. Sip Server -> SBC
  3. SBC -> Provider
lmangani commented 1 year ago

Correlation is cascading. If your X-CID logic cascades over multiple sessions, there's nothing else you should need to configure for correlation to work. If you have different headers at play, you'll need additional rules. Hope this helps!