sipcapture/homer

Standard SIP headers in search form and results

solarmon opened this issue · 13 comments

Hi,

Homer version: 7.10.23

(self-contained docker version from https://github.com/sipcapture/homer7-docker)

I am able to get (non-standard) custom SIP headers to be shown in the search form and in the search results - as per:

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

However, for standard SIP headers, like Privacy, Diversion and Resource-Priority, I cannot get it to work. I cannot use the field to search, and the contents of these headers are not displayed in the search results table.

Is there a technical limitation that prevents standard SIP headers from being added using this method, or is there another/different method to allow for standard DIP headers to be searchable and displayable?

Thank you.

Yes. All standard SIP headers are already parsed so they cannot be handled for custom extraction.
Those should be available already by extending the mapping object to cover them. Do you have a specific example you've tried?

Hi,

For example, I have added the following in the SIP call mapping Fields:

{
        "id": "data_header.Privacy",
        "name": "Privacy",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 24,
        "skip": false,
        "hide": false
    },
    {
        "id": "data_header.Diversion",
        "name": "Diversion",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 24,
        "skip": false,
        "hide": false
    },
    {
        "id": "data_header.Resource-Priority",
        "name": "Resource-Priority",
        "type": "string",
        "index": "none",
        "form_type": "input",
        "position": 24,
        "skip": false,
        "hide": false
    }

image

This is exactly the same place that I have previously added for custom headers, which are working.

Is this not the correct place/method to allow for the standard headers to be searchable and displayed in the results table?

The headers are selectable for the search form, and the columns appear in the results table, but I cannot use to search and the contents for these headers are not displayed in the results table.

I have also added these standard header names to the HEPLIFYSERVER_CUSTOMHEADER docker variable, and reloaded using docker-compose up -d

@lmangani

What do you mean by "extending the mapping object to cover them" - do have any documentation/example I can refer to?

Actually, it seems Resource-Priority is not considered a 'standard' header in Homer, and I can get it working as a 'custom' header using this method - I can search and match on this header, and it gets displayed in the results table.

Hi @solarmon yes, because Resource-Priority is not always present in SIP Header, that's why you need to add as custom.
I think you got the solution anyway :)

@kYroL01

Yes, but I still would like a solution to be able search on and to display the 'standard' header contents - in this example, the Privacy and Diversion headers.

So Privacy and Diversion does not work in your case, but Resource-Priority yes ?
Did you try to use the same method ?

Thanks

@solarmon for best results raising this type of challenge, please consider adding a few hepgen scenarios for others to replicate the exact same condition alongside your settings, as trivial as they might sound.

@lmangani

Sorry, I'm not sure what you mean and what other details you want me to provide. What do you mean by 'hepgen scenarios'?

I have tried to explain that I would like to be able search on specific 'standard' SIP headers and for them be displayed in the results table. I have tried using the method that is used for 'custom' headers, but that is not working.

For the Privacy and Diversion headers I want to be able to have them as searchable fields in the search form. And for these headers to appear in the search results table to be able to show the contents of those headers.

@kYroL01

Yes, as per the original post, I tried using the same method as for 'custom' headers. But because these are considered 'standard' headers, this method does not work.

@solarmon hepgen's purpose is to recreate HEP scenarios for CI validations without any real system and this is exactly when it should be used. You should assume the other party has no setup available to try any of this out to help you find the problem, so in the interest of replicating the same condition you're asking help with, I'm offering a way to do this with a pinch of replicable science. Up to you if you want to take it or work with theory and goodwill alone :)

@lmangani

OK, then that will take me some time and effort to work out how to provide this 'hepgen scenario'.

You mentioned previously, about the standard headers:

"Those should be available already by extending the mapping object to cover them"

What do you mean by that and is there any documentation/examples of how to do this?

Unless, this feature does not currently exist and this ticket is now a feature request for Homer?

OK, then that will take me some time and effort to work out how to provide this 'hepgen scenario'.

That's an option in case you want to make a technically replicable point. It would also take time for us to test this 😄