Joe-Palmer / rtmplite

Automatically exported from code.google.com/p/rtmplite
0 stars 0 forks source link

Strange problems with voice from flash client microphone #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Kundan!
I have a following configuration:
a web phone with javascript interface based on flash-videoio.
That web phone uses a rtmplite + p2p-sip as rtmp server.

Sometimes (1 or 2 times in the day) we have strange problems with voice when 
destination 

client (connected via SIP server) does not hear a voice from flashvideoio 
client.

After browser restarting, problem disappears for 3-4 hours of active calls, and 
raises 

again.
More detailed description of the problem:

I've applied a patch to listen ringing sound: 

https://groups.google.com/forum/?pli=1#!topic/myprojectguide/_LbQpzetuu8
But, the problem does not depends on patch, and happens with or without it.

1. I make a call from js: phoneObject.callProperty('call', 'invite', 
callAddress);
2. When i recieve 'ringing' event, i set up 'publish' and 'play' streams: 

phoneObject.setProperty('publish', 'local'); phoneObject.setProperty('play', 
'remote');
3. Then, in most cases, i hear a ringing sound.
4. On accepted event, i do nothing with local and remote sound streamsm, client 
on other SIP 

side hears me, and i hear him too.
5. But, in some cases publishing of local (microphone) stream does not working. 
I've 

attached a screenshot 'bad_session.jpg' (as part of tcpdump log, which is 
attached too 

(dump.dat0). You can explore it with Wireshark).

There, my side (web phone) have address 84.237.234.112, and address of rtmp-sip 
gateway is 

77.108.78.93, and address of SIP server (our phone provider) is 77.108.78.91

As you can see from top of dump.dat0 (bad_session.jpg), web phone sends 
createStream and 

publish commands to sip-rtmp gateway (siprtmp.py), but server does not send 
created stream 

ids (and other parameters back), maybe, it does not create those streams. Also, 
no onStatus 

event sent to web client.

6. In normal case (from the same dump - i retry a call after browser restart), 
as you can 

see from good_session.jpg, everything is ok, and siprtmp.py server creates 
media streams and 

send onStatus events to web client.

Looks very strange... 
It seems like some bad happened in the session data in siprtmp.py of my web 
phone, and, when 

web phone get destroyed, and, another one loaded and connected to siprtmp, it 
uses new 

session, which creates media streams corrrectly.

Please look inside dump.dat0 with WireShark.
Maybe you will give me some idea how to fix this problem, or workaround it.
Maybe, Flash Player gets crazy? Maybe, we should reconnect web client before 
send sip 

invite?

Original issue reported on code.google.com by eag...@gmail.com on 30 Sep 2011 at 3:14

Attachments:

GoogleCodeExporter commented 9 years ago
If you start siprtmp.py with -d option you can see the debug trace. Was there 
any exception in the trace?

I guess one reason could be that if siprtmp detects that a stream name is 
already publishing, it will not allow a new publish for the same stream name, 
and prints a message about it in debug mode.

This issue is not relevant if you cleanup the NetConnection after a call, since 
all streams are cleanup after connection is closed.

I think if you can send the debug trace it will be more useful in identifying 
the problem.

Thanks

Original comment by kundan10 on 30 Sep 2011 at 9:37