Open chinarui-na opened 2 months ago
Unfortunately we can't reproduce such an issue, working properly here. Each metadata for caller uuid and the callee is sent properly. Can you please tell me how to reproduce it and of course I will investigate it to see if there is a potential issue.
A potential issue here can be a change that you did before websocket start (printing info). It doesn't work like that, and can cause unpredictable behaviour. When you obtain a session using _switch_core_sessionlocate, the session is under a lock and you must unlock it when you're done with it.
mm@desktop:~/wsServer$ ./server
Waiting for incoming connections...
Connection opened, addr: 192.168.0.19
I receive a message: initial1 (8), from: 192.168.0.19, type:1
Connection opened, addr: 192.168.0.19
I receive a message: initial22 (9), from: 192.168.0.19, type:1
Connection closed, addr: 192.168.0.19
Connection closed, addr: 192.168.0.19
This a working example, initial1 was the initial message from the caller, and initial22 from the callee.
I delete log.
I started two audio streams in the answer event, one is caller and the other is callee, and they carry metadata.
I found that m_initial_meta
would be changed between the start of the websocket connection and the success of the connection, possibly because there was a problem with the source data.
by the way, It's a question of probability.
Thanks. I see. Ok, do some more tests please when you can. As I said, I can't reproduce it and it's working fine here. Can't see how it could possibly change. But, if it still happens for you for some reason, I will move it from the class and make it a member of private data of the channel, but first we'll need to find why it's being changed (i see on your pics char pointer points to some weird location).
Okay, when I find out, I'll come back here.
Is there any new progress? I have the same problem. Two different calls, different metadata, the same value is printed when sending initial metadata,metadata value is overwritten
metadata value is truncated
i have the same issue. its like a playing coin toss. sometimes i get, sometimes i cant get metadata that i send. if i receive, last parts are truncated sometimes. needs to be fixed.
You can fix this problem by modifying the code
i dont want to ruin the code. cuz im not good at c++. but in my view, there is like zero problems to send metadata wrong. but i got still strange metadata that i dont want to receive. Example :
2024-08-16 12:02:57.527718 93.83% [DEBUG] mod_audio_stream.c:150 mod_audio_stream cmd: 8e378083-3205-44f6-81e1-18e1de804cab start ws://Address/pub/audiostream mono 16k {"age":1,"type":"sometype","someID":"66becf604af36c1543b13ec8"}
2024-08-16 12:02:57.527718 93.83% [DEBUG] mod_audio_stream.c:81 calling stream_session_init.
2024-08-16 12:02:57.527718 93.83% [DEBUG] audio_streamer_glue.cpp:368 (8e378083-3205-44f6-81e1-18e1de804cab) resampling from 8000 to 16000
2024-08-16 12:02:57.527718 93.83% [DEBUG] audio_streamer_glue.cpp:379 (8e378083-3205-44f6-81e1-18e1de804cab) stream_data_init
2024-08-16 12:02:57.527718 93.83% [DEBUG] mod_audio_stream.c:87 adding bug.
2024-08-16 12:02:57.527718 93.83% [DEBUG] switch_core_media_bug.c:976 Attaching BUG to sofia/external/<PHONE NUMBER>@IPHost
2024-08-16 12:02:57.527718 93.83% [DEBUG] mod_audio_stream.c:91 setting bug private data.
2024-08-16 12:02:57.527718 93.83% [DEBUG] mod_audio_stream.c:94 exiting start_capture.
2024-08-16 12:02:57.807709 93.83% [DEBUG] audio_streamer_glue.cpp:135 sending initial metadata sivep
2024-08-16 12:03:05.867727 93.70% [NOTICE] sofia.c:1065 Hangup sofia/external/><PHONE NUMBER>@IPHost [CS_EXECUTE] [NORMAL_CLEARING]
i cant find what kind of code makes my metadata to sivep. did you find out your problem ? if you do, Can u explain the problem to me?
您可以通过修改代码来解决这个问题
您可以通过修改代码来解决这个问题
Can you submit a PR?
I want voice recognition on the called party in real time. I was called the Connect event again, initiating a two-way media bug. caller
callee
websocket receives two connections, but only once metadata, sometimes caller_number, sometimes callee_number, or caller and callee.
my websocket handler code