sipcapture / homer-app

HOMER 7.x Front-End and API Server
http://sipcapture.io
GNU Affero General Public License v3.0
204 stars 79 forks source link

Use custom header for correlation ID? #436

Closed pengweichu closed 3 years ago

pengweichu commented 3 years ago

Hi,

Say in my SIP server, for some scenarios, like MOH, transfer, ring group, there have a lot of legs that need to be correlated for a call, I have added an X-Unique-Id header for these legs, when sending the SIP messages to HOMER( I integrated the HepAgent in our application), shall I use the value of header X-Unique-Id as the correlation ID?

On the HOMER server-side, how to set the mapping for the X-Unique-Id?

I've read this issue: https://github.com/sipcapture/homer-app/issues/278 and see there has an example as the below, how to modify it to support my X-Unique-Id? Thanks


[
    {
       "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
        ]
    }
]
adubovikov commented 3 years ago

Please read this: https://github.com/sipcapture/homer/issues/484

and https://github.com/sipcapture/homer/wiki/Custom-Header-Searching-and-Correlation

after you will have an idea how to use it.

pengweichu commented 3 years ago

Please read this: sipcapture/homer#484

and https://github.com/sipcapture/homer/wiki/Custom-Header-Searching-and-Correlation

after you will have an idea how to use it.

Thanks for reply,but I can't find the /etc/heplify-server.toml in the host server, and docker container instances: homer-webpp, heplify-server

adubovikov commented 3 years ago

this is config for your heplify-server, I don't have any idea how and where you installed this service :-)

adubovikov commented 3 years ago

also, don't forget to star our project like I asked you last time :-) https://github.com/sipcapture/homer/stargazers

pengweichu commented 3 years ago

this is config for your heplify-server, I don't have any idea how and where you installed this service :-)

I followed this guide to installed: https://github.com/sipcapture/homer7-docker/tree/42796c31ead32735b5a9d97ec492790bf79e8e31

adubovikov commented 3 years ago

homer is our main project :-) star it

about docker, you have to modify Dockerfile and add the params like in this example

https://github.com/sipcapture/homer/issues/484#issuecomment-901898508

pengweichu commented 3 years ago

Understand, thanks, already start it! really a great product!

adubovikov commented 3 years ago

Understand, thanks, already start it!

nop, you start the homer-app, but not the homer :-)

https://github.com/sipcapture/homer/stargazers

pengweichu commented 3 years ago

Understand, thanks, already start it!

nop, you start the homer-app, but not the homer :-)

https://github.com/sipcapture/homer/stargazers

Done! Now I get the bash installed, working on the custom header as your guide, have a good day!

adubovikov commented 3 years ago

Thanks :-) have a nice week end!