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

sending HEP3 payload to ws://xx.xx.xx.xx:3000 encapsulate buffer via hep.js showing Malformed packet #497

Open
sudoGenie opened this issue Aug 22, 2022 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@sudoGenie
Copy link

sudoGenie commented Aug 22, 2022

We are trying to send HEP3 payload buffer array (hep.js) over to ws://xx.xx.xx.xx:3000

I only see 1 log in /var/log/messages and i get this showing from decoder.go

heplify-server: 2022/08/22 06:09:21.900048 decoder.go:111: WARN malformed packet with length 1906 which is neither hep nor protobuf encapsulated

When I send the 418 byte payload its showing 1980byes on the tcpdump trace.

https://github.com/sipcapture/homer/wiki/HEP-WS-WSS-Socket (this was what i was referencing to find any documentation going the ws route)

    var hep_encoder = await HEPjs.encapsulate(payload, rcinfo); // returns data buffer

i took the buffer from hepgen.js and took the raw payload and tried to send that.

not sure if theres an example payload to send via ws:// or what is a good UDP payload i need to convert to to send

echo -ne "$(echo '4845503301c1XXXX' sed -e 's/../\\x&/g')" | nc -4u -w0 xx.xx.xx.xx 9060

@sudoGenie
Copy link
Author

sudoGenie commented Aug 23, 2022

Update:

so i found that sending that payload via Postman (now supports ws://)

i was able to take the data payload with the HEP3 section from the wireshark and hepgen.js and upload that into ws:// and connect to socket (interesting enough auth doesn't care on this ws:// connection.

I send it as Binary (Hexadecimal) and HEP was able to extract / parse as it had to start with 48455033
....

a few things i noticed though is overtime our ws:// sockets stop working and i have to restart heplifiy-server to get that back online to send but i would need more debug ws:// logs to determine if that is something to warrant as a new type of bug.

@kYroL01
Copy link

kYroL01 commented Sep 12, 2023

Hi @sudoGenie Thanks a lot for trying and giving us feedback.
Feel free to send a PR or suggest how to improve in order to share with the community.

@kYroL01 kYroL01 added enhancement New feature or request question Further information is requested labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants