Open vandykew opened 4 years ago
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
https://github.com/sipcapture/homer/issues/410 please read this comment as well: https://github.com/sipcapture/homer/issues/410#issuecomment-675288139
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
]
},
Also iI noticed you said asterix however im using freeswitch
Also I have
"HEPLIFYSERVER_FORCEALEGID=true"
{
"source_field": "data_header.callid",
"lookup_id": 1,
"lookup_profile": "call",
"lookup_field": "data_header->>'X-CID'",
"lookup_range": [
-300,
200
]
},
This is not working either
@vandykew what do you have in your database ? Do you have extracted X-CID in the data_header field ?
I'm not sure this is a docker i didn't think i could access the database
you can always login into docker. Anyway, without to understand what do you have inside it will be almost impossible to help you.
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": "" }
this means you have to enable X-CID extraction first. or as a ALeg: https://github.com/sipcapture/heplify-server/blob/master/example/homer7_config/heplify-server.toml#L58
or as a custom Header:
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"
can you please be sure that you have this X-CID in the message ? @lmangani do we have some special flags for docker component ?
Yes i can confirm that X-CID is in the message
It seems none of the HEPLIFYSERVER_X fields in the docker-compose file are honored - I've opened a similar ticket: https://github.com/sipcapture/homer7-docker/issues/86
@lmangani Do you have any insight on this ?
@vandykew @lukeescude thanks for this report and the additional details, will try reproduce this. What docker and compose version are you using?
@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?
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]#
@lmangani did you happen to find anything ?
Trying to resolve this but I cannot replicate it. Could you provide the output of docker logs heplify-server
@lmangani I apologize I never got this info from you:
Docker version 19.03.6, build 369ce74a3c
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
This seems to work fine with a string in my test, did not test arrays yet
- "HEPLIFYSERVER_ALEGIDS=X-CID"
Has anyone gotten the AlegIDs environment variable to work on this docker ?
I have tried it a few ways and it now working
any other ideas ?