Open Shkiperon opened 3 years ago
Seems like you completely skipped a proper introduction with description of what you're doing there, your setup, versions, agents and expectations, etc. Agents can inject correlation as well. Assume people on the other side know nothing about your setup.
Hello. Sorry, this is my setup: Asterisk with heplify-agent on one machine + OpenSIPS as mid_registrar with HEP monitoring by OpenSIPS module + two sip-clients that registered on Asterisk through the OpenSIPS server. Asterisk is SIP-gateway to the VoIP provider.
I'm trying to visualize correlation of calls in homer-app. In homer_data database (PostgreSQL) I see some troubles, that makes impossible completion of my task (in some cases correlation_id based on X-CID SIP header, that defined in heplify-server.toml in array AlegIDs, but in other cases correlation_id based on call_id).
172.16.XXX.YYY - external IP of VoIP provider's server on separated VLAN 172.20.XXX.ZZZ - external IP of Asterisk on separated VLAN 10.0.BBB.CCC - internal IP of OpenSIPS 10.0.BBB.DDD - internal IP of Asterisk
Heplif-Server:
# heplify-server -version
VERSION: heplify-server 1.32
On Asterisk server:
# asterisk -rx 'core show version'
Asterisk 13.29.2
# heplify -version
heplify 1.57
On OpenSIPS server:
# opensips -V
version: opensips 3.1.1 (x86_64/linux)
Modules that used in OpenSIPS configuration for HEP monitoring: proto_hep
, proto_tcp
and tracer
(HEP packets sends to heplify-server via UDP transport).
@lmangani you wrote that "Agents can inject correlation as well.". Does it mean that adding X-CID SIP header via dialplan function in Asterisk is wrong way?
Not necessarily. So which element is producing the faulty correlation here?
In either case, could you try adding this parameter to your heplify-server config? ForceALegID
to confirm if this is related?
} else if config.Setting.ForceALegID && h.SIP.XCallID != "" {
h.CID = h.SIP.XCallID
}
I added this line:
ForceALegID = true
After making call i checked the database - correlation_id and callid in B-part of call is the same in internal call. If make an external call (from sip client to external number) correlation works fine.
So the ForceALegID = true
doesn't make any effect to the result in homer_data database.
part of heplify-server.toml:
Info from hep_proto_1:
As you can see in call 1 (which was external call) correlation_id = X-CID header, but in call 2 (which was internal call) correlation_id = callid. Another strange thing - in both cases X-CID isn't defined as callid_aleg (callid_aleg is empty).
I don't understand why heplify-server doesn't get correlation_id from X-CID SIP header in case of internal call. Is it a bug?