theintencity / rtmplite

Flash RTMP server and SIP-RTMP gateway in Python
Other
202 stars 88 forks source link

Asterisk / SIP with rtmplite problems #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to interconnect SIP and flash using Asterisk as the SIP server, on 
my LAN. Here is one of the tests I have done, and its log. 
I am using Ekiga, it connects to Asterisk fine and can make calls from and to 
other SIP clients.
- First I connect the flash VideoPhone application to rtmplite
- Then I make Ekiga call the VideoPhone
- Then I pick up on the VideoPhone. It instantly connects and disconnects. 
Ekiga believes it is still connected, using speex. After 7 seconds, Ekiga hangs 
up automatically.
- At this time the VideoPhone starts ringing again (as if it is receiving a 
call), but picking up doesn't do anything of course, except reset the 
VideoPhone to standby mode, waiting for new calls.

Notice the same symptoms seem to happen when doing flash to flash calls using 
asterisk (but not p2psip, there it works fine), flash to phone and phone to 
flash (p2psip and asterisk), but asterisk with VideoPhone and Android native 
Gingerbread SIP client works fine, and so does Ekiga with the Android SIP 
client.

The log of the above described situation (Ekiga calls VideoPhone) is in the 
attached file (inlined), as well as the log of a flash to flash call over 
asterisk (both are using videophones) with the following scenario:

- First I register the first compouter (1001)
- Next I register the second computer (1004)
- Then 1001 calls 1004
- 1004 picks up and instantly connection is cut

Thanks for any help anyone may provide,
Yannack

Original issue reported on code.google.com by yann...@gmail.com on 7 Jul 2011 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago
After investigating with the user, the conclusions are as follows:

1. It was picking the incorrect IP address because of wrong hostname or 
/etc/hosts file content. After using -l xx.xx.xx.xx with local IP address of 
the machine, it started using the correct IP address. Updated siprtmp FAQ to 
reflect this.

2. The RTP padding was not supported by Ekiga so it was not playing the sound 
and would disconnect after some time if RTP sent by siprtmp had padding. 
Earlier, using speex/16000 packet from siprtmp to Ekiga worked well (probably 
because the packet size was multiple of 4 and didn't require RTP padding).

To work around this, changed in p2p-sip r39 to disable RTP Padding by default 
in outbound packets. Use _padding flag to True if you need to enable padding. 
Tested with X-Lite as well and no-padding works fine.

Original comment by kundan10 on 7 Jul 2011 at 5:38