Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEPLIFYSERVER_ALEGIDS not working #87

Open
vandykew opened this issue Aug 18, 2020 · 24 comments
Open

HEPLIFYSERVER_ALEGIDS not working #87

vandykew opened this issue Aug 18, 2020 · 24 comments
Assignees

Comments

@vandykew
Copy link

Has anyone gotten the AlegIDs environment variable to work on this docker ?

I have tried it a few ways and it now working

  • "HEPLIFYSERVER_ALEGIDS=["X-CID"]"
  • "HEPLIFYSERVER_ALEGIDS=X-CID"

any other ideas ?

@adubovikov
Copy link
Member

I have replied to the similar issue on the Homer's issue tracker. You have already a correlation ID in your HEP that asterisk sends to you. To avoid using it you have to create two blocks in the correlation mapping schema

  1. Make an correlation by data_header->>xcid
  2. Make at the end again the fetch from main call table

@adubovikov
Copy link
Member

sipcapture/homer#410
please read this comment as well:
sipcapture/homer#410 (comment)

@vandykew
Copy link
Author

i have added this to the top of the mapping and its not working

{
    "source_field": "data_header.X-CID",
    "lookup_id": 100,
    "lookup_profile": "default",
    "lookup_field": "sid",
    "append_sid": true,
    "lookup_range": [
        -300,
        200
    ]
},

@vandykew
Copy link
Author

Also iI noticed you said asterix however im using freeswitch

@vandykew
Copy link
Author

Also I have

"HEPLIFYSERVER_FORCEALEGID=true"

@adubovikov
Copy link
Member

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

@vandykew
Copy link
Author

This is not working either

@adubovikov
Copy link
Member

@vandykew what do you have in your database ? Do you have extracted X-CID in the data_header field ?

@vandykew
Copy link
Author

I'm not sure this is a docker i didn't think i could access the database

@adubovikov
Copy link
Member

you can always login into docker. Anyway, without to understand what do you have inside it will be almost impossible to help you.

@vandykew
Copy link
Author

Ok after looking in the DB im not seeing X-CID in te data header field

{
"cseq": "",
"callid": "",
"method": "",
"to_user": "",
"from_tag": "",
"from_user": "",
"ruri_user": "",
"user_agent": "",
"ruri_domain": ""
}

@adubovikov
Copy link
Member

@vandykew
Copy link
Author

I know in the non-docker homer 7 I able to add this to the toml file "AlegIDs=["X-CID"]" and this worked

in the docker i have tried

"HEPLIFYSERVER_ALEGIDS=["X-CID"]"
"HEPLIFYSERVER_ALEGIDS=X-CID"

@adubovikov
Copy link
Member

can you please be sure that you have this X-CID in the message ?
@lmangani do we have some special flags for docker component ?

@vandykew
Copy link
Author

Yes i can confirm that X-CID is in the message

@lukeescude
Copy link

It seems none of the HEPLIFYSERVER_X fields in the docker-compose file are honored - I've opened a similar ticket: #86

@vandykew
Copy link
Author

vandykew commented Sep 3, 2020

@lmangani Do you have any insight on this ?

@lmangani
Copy link
Member

lmangani commented Sep 3, 2020

@vandykew @lukeescude thanks for this report and the additional details, will try reproduce this. What docker and compose version are you using?

@lmangani
Copy link
Member

@vandykew somehow this seems to work for me, on a slightly older docker release from the latest tho - could kindly you try and echo the ENV within your container?

@vandykew
Copy link
Author

I am running the latest

[root@test-voip]# docker exec homer-webapp env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=66f29ea22e7b
LOKI_HOST=loki
PROM_HOST=prometheus
DB_HOST=db
DB_USER=root
DB_PASS=**************
HOME=/root

[root@test-voip dirad]# docker exec heplify-server env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=dc6c9c63b154
HEPLIFYSERVER_HEPADDR=0.0.0.0:9060
HEPLIFYSERVER_HEPTLSADDR=0.0.0.0:9060
HEPLIFYSERVER_HEPTCPADDR=
HEPLIFYSERVER_DBSHEMA=homer7
HEPLIFYSERVER_DBDRIVER=postgres
HEPLIFYSERVER_DBADDR=db:5432
HEPLIFYSERVER_DBUSER=root
HEPLIFYSERVER_DBPASS=************
HEPLIFYSERVER_DBDATATABLE=homer_data
HEPLIFYSERVER_DBCONFTABLE=homer_config
HEPLIFYSERVER_DBROTATE=true
HEPLIFYSERVER_DBDROPDAYS=5
HEPLIFYSERVER_LOGLVL=info
HEPLIFYSERVER_LOGSTD=true
HEPLIFYSERVER_PROMADDR=0.0.0.0:9096
HEPLIFYSERVER_DEDUP=false
HEPLIFYSERVER_LOKIURL=http://loki:3100/api/prom/push
HEPLIFYSERVER_LOKITIMER=2
HEPLIFYSERVER_ALEGIDS=["X-CID"]
HEPLIFYSERVER_FORCEALEGID=true
HOME=/root
[root@test-voip]#

@vandykew
Copy link
Author

@lmangani did you happen to find anything ?

@lmangani
Copy link
Member

Trying to resolve this but I cannot replicate it. Could you provide the output of docker logs heplify-server

@lukeescude
Copy link

@lmangani I apologize I never got this info from you:

docker --version

Docker version 19.03.6, build 369ce74a3c

docker info

Client:
Debug Mode: false

Server:
Containers: 9
Running: 9
Paused: 0
Stopped: 0
Images: 9
Server Version: 19.03.6
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-1062.12.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.638GiB
Name: omitted
ID: omitted
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

@lmangani
Copy link
Member

This seems to work fine with a string in my test, did not test arrays yet

      - "HEPLIFYSERVER_ALEGIDS=X-CID"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants