sipcapture/homer

Howto B2BUA correlation in Homer 7?

ciscospirit opened this issue · 10 comments

Hello,

i am searching now for several hours but i really don't get it out, where i have to set the settings for B2BUA correlation from my Sipwise calls (Hepipe.Js, Heplify, RTPengine).

here in your general FAQ you wrote:
https://github.com/sipcapture/homer/wiki/FAQ

but where I have to write this setting?
Where i find the config File where i have to write this in?

a complete newbie question for sure, but i really don't get it...
It would be nice if you could help me.

This is for Homer 5 but how i do it for Homer7?

I have a B2BUA and I would like to achieve leg correlation in Call-Flow
If your B2B leg are extending/appending the original Call-ID with a suffix (A-Leg: 1234 B-Leg: 1234+suffix) you can enable the following parameters:
define('BLEGCID', "b2b");
define('BLEGTAIL', "-0"); /* session-ID correlation suffix, required for b2b mode */

Please star this repository to motivate the developers and to get higher priority! ⭐

Hey,
can you please assist me with that?
i still can't get it to work. :(

example:

573891eb479623561c10600701addf1d@xxx.xxx.xxx
should correlate with that
573891eb479623561c10600701addf1d@xxx.xxx.xxx_pbx-1

I suppose You just need to suffix the lookup callid with _pbx-1 in the mapping lookup?

how do i have to do that?

this is my CALL mapping setting:

[
    {
        "source_field": "data_header.callid",
        "lookup_id": 100,
        "lookup_profile": "default",
        "lookup_field": "sid",
        "lookup_range": [
            -300,
            200
        ]
    },
    {
        "source_field": "data_header.callid",
        "lookup_id": 5,
        "lookup_profile": "default",
        "lookup_field": "sid",
        "lookup_range": [
            -300,
            200
        ]
    },
    {
        "source_field": "protocol_header.correlation_id",
        "lookup_id": 1,
        "lookup_profile": "call",
        "lookup_field": "sid",
        "lookup_range": [
            -300,
            200
        ]
    },
    {
        "source_field": "data_header.callid",
        "lookup_id": 1,
        "lookup_profile": "call",
        "lookup_field": "data_header->>'callid'",
        "lookup_range": [
            -300,
            200
        ],
        "input_function_js": "var returnData=[]; for (var i = 0; i < data.length; i++) { returnData.push(data[i]+'_b2b-1'); }; returnData;"
    }
]
[
    {
        "id": "sid",
        "type": "string",
        "index": "secondary",
        "name": "Session ID",
        "form_type": "input",
        "position": 1,
        "sid_type": true,
        "hide": false
    },
    {
        "id": "data_header.method",
        "name": "SIP Method",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "form_default": [
            "INVITE",
            "BYE",
            "100",
            "200",
            "183",
            "CANCEL"
        ],
        "position": 2,
        "skip": false,
        "hide": false,
        "method_type": true
    },
    {
        "id": "protocol_header.correlation_id",
        "name": "Correlation ID",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 3,
        "skip": false,
        "hide": true,
        "sid_type": true
    },
    {
        "id": "data_header.callid",
        "name": "CallID",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 4,
        "skip": false,
        "hide": true,
        "sid_type": true
    },
    {
        "id": "data_header.ruri_user",
        "name": "RURI user",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 5,
        "skip": false,
        "hide": true
    },
    {
        "id": "data_header.from_user",
        "name": "SIP From user",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 6,
        "skip": false,
        "hide": false
    },
    {
        "id": "data_header.to_user",
        "name": "SIP To user",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 7,
        "skip": false,
        "hide": false
    },
    {
        "id": "data_header.user_agent",
        "name": "User Agent",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 8,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.srcIp",
        "name": "Source IP",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 8,
        "skip": false,
        "hide": false
    },
    {
        "id": "protocol_header.srcPort",
        "name": "Src Port",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 9,
        "skip": false,
        "hide": false
    },
    {
        "id": "protocol_header.dstIp",
        "name": "Destination IP",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 10,
        "skip": false,
        "hide": false
    },
    {
        "id": "protocol_header.dstPort",
        "name": "Dst Port",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 11,
        "skip": false,
        "hide": false
    },
    {
        "id": "protocol_header.timeSeconds",
        "name": "Timeseconds",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 12,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.timeUseconds",
        "name": "Usecond time",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 13,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.payloadType",
        "name": "Payload type",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 14,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.protocolFamily",
        "name": "Proto Family",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 15,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.protocol",
        "name": "Protocol Type",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 16,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.captureId",
        "name": "Capture ID",
        "type": "integer",
        "index": "none",
        "form_type": "input",
        "position": 17,
        "skip": false,
        "hide": true
    },
    {
        "id": "protocol_header.capturePass",
        "name": "Capture Pass",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 18,
        "skip": true,
        "hide": true
    },
    {
        "id": "data_header.cseq",
        "name": "SIP Cseq",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 19,
        "skip": false,
        "hide": true
    },
    {
        "id": "data_header.from_tag",
        "name": "SIP From tag",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 20,
        "skip": false,
        "hide": true
    },
    {
        "id": "data_header.protocol",
        "name": "SIP Protocol",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 21,
        "skip": false,
        "hide": true
    },
    {
        "id": "raw",
        "name": "SIP RAW",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 22,
        "skip": false,
        "hide": true
    },
    {
        "id": "profile",
        "name": "Profile",
        "type": "string",
        "index": "none",
        "form_type": "select",
        "form_default": [
            "call",
            "registration",
            "default"
        ],
        "position": 23,
        "skip": false,
        "hide": true,
        "profile": true
    },
    {
        "id": "node",
        "name": "Node",
        "type": "string",
        "index": "none",
        "form_type": "multiselect",
        "form_default": [
            {
                "value": "localnode",
                "name": "Local node"
            }
        ],
        "_form_api": "/database/node/list",
        "system_param": true,
        "mapping": "param.location.node",
        "position": 23,
        "skip": true,
        "hide": true
    }
]

"input_function_js": "var returnData=[]; for (var i = 0; i < data.length; i++) { returnData.push(data[i]+'_b2b-1'); }; returnData;"

this is correct, you should see in the homer-app such log:

Input function

and

sid array before JS

so i have to edit this from '_pbx-1' to '_b2b-1' right?
or can i can have also booth?

you can add as many as you wish....

returnData.push(data[i]+'_b2b-0'); returnData.push(data[i]+'_b2b-1'); returnData.push(data[i]+'_pbx-0'); returnData.push(data[i]+'_pbx-1');

does it work for you ?

yes perfect :)
thanks a lot!!

@ciscospirit perfect, don't forget to star our repository :-)