asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
1.96k stars 920 forks source link

[bug]: res_hep uses wrong source IP #718

Open thaeger71 opened 1 week ago

thaeger71 commented 1 week ago

Severity

Major

Versions

18.20.2

Components/Modules

res_hep.so

Operating Environment

freePBX/RHEL

Frequency of Occurrence

Constant

Issue Description

If freePBX/asterisk has to source IP addresses, for example 192.168.1.100 and 192.168.2.100 (even in this order), every package which is reported to HEP Server contains 192.168.2.100 as source address, even it was sent from 192.168.1.100 in reality.

Relevant log output

No response

Asterisk Issue Guidelines

jcolp commented 1 week ago

I assume you are referring to SIP messages using PJSIP. What is the transport configuration?

Additionally, res_hep is community supported.

thaeger71 commented 1 week ago

yes, it's PJSIP. So the problem ist maybe located in res_hep_pjsip.so Transport doesn't matter, I tried UDP and TLS.

Transport configuration looks like this:

;--------------------------------------------------------------------------------; ; Do NOT edit this file as it is auto-generated by FreePBX. ; ;--------------------------------------------------------------------------------; ; For information on adding additional paramaters to this file, please visit the ; ; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ; ; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ; ; is totally deliberate. ; ;--------------------------------------------------------------------------------;

include pjsip.transports_custom.conf

[192.168.1.100-udp] type=transport protocol=udp bind=192.168.1.100 allow_reload=no tos=cs3 cos=3 local_net=192.168.1.0

[192.168.2.100-udp] type=transport protocol=udp bind=192.168.2.100 external_media_address=85.215.175.45 external_signaling_address=85.215.175.45 allow_reload=no tos=cs3 cos=3 local_net=192.168.2.0

[192.168.1.100-tcp] type=transport protocol=tcp bind=192.168.1.100 allow_reload=no tos=cs3 cos=3 local_net=192.168.1.0

[192.168.2.100-tcp] type=transport protocol=tcp bind=192.168.2.100 external_media_address=85.215.175.45 external_signaling_address=85.215.175.45 allow_reload=no tos=cs3 cos=3 local_net=192.168.2.0

[192.168.1.100-tls] type=transport protocol=tls bind=192.168.1.100 ca_list_file=/etc/pki/tls/certs/ca-bundle.crt cert_file=/etc/asterisk/keys/testlab.1und1.net-fullchain.crt priv_key_file=/etc/asterisk/keys/testlab.1und1.net.key method=tlsv1_2 verify_client=no verify_server=no allow_reload=no tos=cs3 cos=3 local_net=192.168.1.0

[192.168.2.100-tls] type=transport protocol=tls bind=192.168.2.100 external_media_address=85.215.175.45 external_signaling_address=85.215.175.45 ca_list_file=/etc/pki/tls/certs/ca-bundle.crt cert_file=/etc/asterisk/keys/testlab.1und1.net-fullchain.crt priv_key_file=/etc/asterisk/keys/testlab.1und1.net.key method=tlsv1_2 verify_client=no verify_server=no allow_reload=no tos=cs3 cos=3 local_net=192.168.2.0