cavus38 / sipml5

Automatically exported from code.google.com/p/sipml5
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Call from chrome to softphone through asterisk cause only noise #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
a) Before posting your issue you MUST answer to the questions otherwise it
will be rejected (invalid status) by us
b) Please check the issue tacker to avoid duplication
c) Please provide network capture (Wireshark) or Javascript console log
if you want quick response

What steps will reproduce the problem?
1. Setup asterisk according to https://code.google.com/p/sipml5/wiki/Asterisk 
on wirtual machine
2. Register and call from sipml5 (my revision 109) to softphone
3. Answer to call in softphone

What is the expected output? What do you see instead?
Expected normall call, but there is only noise.

What version of the product are you using? On what operating system?
sipml5 rev 109, chrome 21.0.1180.89, asterisk os - debian 6, chrome and 
softphone os windows7-64

Please provide any additional information below.
As asked Mamadou chrome console from page open to call end is attached.
192.168.225.204 asterisk url, 192.168.225.183 chrome and softphone url.
Any other info will be provided if needed.

Original issue reported on code.google.com by teih...@gmail.com on 26 Sep 2012 at 12:17

Attachments:

GoogleCodeExporter commented 9 years ago
Some additional info can be found in 
https://groups.google.com/forum/?hl=en&fromgroups=#!topic/doubango/1Kd74RzdlmY

Original comment by teih...@gmail.com on 26 Sep 2012 at 12:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@ln.nima.nl
"22.0.1229.79" is not STABLE chrome but beta. STABLE is at 21....

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 1:59

GoogleCodeExporter commented 9 years ago
I have the similar problem when I connect from chrome on Ubuntu 12.04 -64 
bit(same pc I am running Asterisk on ).
incoming calls are ok , but calls from chrome are connected successfully but 
audio does not work. I see this error in Asterisk console: 
[Sep 26 15:18:09] WARNING[6679][C-00000018]: res_srtp.c:395 ast_srtp_unprotect: 
SRTP unprotect failed with: authentication failure 110
[Sep 26 15:18:11] WARNING[6679][C-00000018]: res_srtp.c:395 ast_srtp_unprotect: 
SRTP unprotect failed with: authentication failure 110

wireshark shows packets are being transmitted between chrome and asterisk and 
packets are coming from softphone but no packet is being sent from asterisk to 
the 2nd client ( xlite or any other sip , in my case a pstn gateway ).
I am hearing either noise or silence in chrome.
but running chrome and xlite on another pc works fine for me and I have two way 
audio for incoming and outgoing.
for the record:
server Ip : 192.168.2.105
chrome version : stable chrome , 22.0.1229.79
I am calling extension 101 which refers to xlite account.
chrome console log is attached .
thanks

Original comment by ln.nima...@gmail.com on 26 Sep 2012 at 2:00

Attachments:

GoogleCodeExporter commented 9 years ago
comment #3 no longer make sense because "ln.nima.nl" removed it's comment (#2).

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 2:01

GoogleCodeExporter commented 9 years ago
dear bossiel, it is the latest update (today morning ).
it is stable, am I wrong ?
chrome updated automatically on all my platforms (win7 , ubuntu , win xp )
anyways I had the similar problem with version 21 on previous days.

Original comment by ln.nima...@gmail.com on 26 Sep 2012 at 2:02

GoogleCodeExporter commented 9 years ago
sorry , I decided to edit the text to avoid misunderstanding.
my mistake :)

Original comment by ln.nima...@gmail.com on 26 Sep 2012 at 2:06

GoogleCodeExporter commented 9 years ago
Previous days are previous days

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 2:06

GoogleCodeExporter commented 9 years ago
@teihrib
I'm not surprised that there is no audio because there is a big javacript 
parsing error ("SYNTAX_ERR: DOM Exception 12") in your logs.
I'm using same chrome version (21.0.1180.89) on windows Vista and OSX but I 
have no js errors.
Do you have a Vista or OS X for tests?
What if chrome is the called party?

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 2:15

GoogleCodeExporter commented 9 years ago
Tested with "22.0.1229.79 m" and it's working as expected

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 2:23

GoogleCodeExporter commented 9 years ago
There is an Asterisk server running (will be shutdown on Friday 28, 2012) on 
sipml5.org for tests.
4 accounts: 1060, 1061, 1062, 1063. Even numbers for chrome.
WebSocket connection: ws://sipml5.org:8088/ws
UDP connection: udp://sipml5.org:3060

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 2:28

GoogleCodeExporter commented 9 years ago
Until now I was only thinking that it is a bug in Asterisk but since you 
implied that it has something to do with browser , I feel that something is 
wrong with chrome in 64 bit systems , because "teihrib" is using 64 bit and I 
only have this problem on 64 bit system and I remember another user on doubango 
forum (James) who has similar problem and his system is 64 bit as far as I 
remember.

Original comment by ln.nima...@gmail.com on 26 Sep 2012 at 2:28

GoogleCodeExporter commented 9 years ago
I tested with the online server.
The problem is the same and I still get DOM exception and noise when I call 
from chrome on Ubuntu 64 bit to any other client (softphone or chrome on 
win7-32).
From chrome on win7-32 to chrome on ubuntu-64 works fine and I have two way 
audio.

I will be very thankful if you can try it yourself on some 64 bit system to see 
if it works for you.

Thanks for the support

Original comment by ln.nima...@gmail.com on 26 Sep 2012 at 6:56

GoogleCodeExporter commented 9 years ago
The exception is caused by the SRTP crypto type.
Your chrome version try to use "AES_CM_128_HMAC_SHA1_32" while only 
"AES_CM_128_HMAC_SHA1_80" is supported by chrome. 
Open javascript console, type navigator.userAgent and tell us what is the 
result.

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 8:40

GoogleCodeExporter commented 9 years ago
oops... I meant "...is supported by webrtc"

Original comment by boss...@yahoo.fr on 26 Sep 2012 at 8:42

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm here now.
navigator.userAgent
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) 
Chrome/22.0.1229.79 Safari/537.4" I'll try sipml5.org asterisk now. So I get 
these results. When I call from softphone to chrome everything is ok. When I 
call from one chrome to another I get the same noise. When I call from chrome 
to softphone, softphone doesn't rrecieve this call, inspite of in chrome the 
call is answered (but there is only silence) I attached my chrome console logs 
for these calls.

Original comment by teih...@gmail.com on 27 Sep 2012 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
Another info. Folowing Mamadou advice I tryed to use public sip services 
(ekiga.net in my case). I registered two accounts. Then I called from one 
chrome to another and everything is fine (there is no DOM exception). Then I 
called from softphone to chrome and get dom exception. I think it's because of 
INVITE message from softphone, that comes with RTP/AVP, not RTP/SAVPF. 

Original comment by teih...@gmail.com on 27 Sep 2012 at 6:11

GoogleCodeExporter commented 9 years ago
Here is chrome console (caller side) for ekiga.net. Hope this helps

Original comment by teih...@gmail.com on 27 Sep 2012 at 6:24

Attachments:

GoogleCodeExporter commented 9 years ago
@bossiel : I see : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, 
like Gecko) Chrome/22.0.1229.79 Safari/537.4" . Do you think there is any 
solution for crypto problem from client and server side ? or it should be 
resolved by google chrome WebRTC team ?

@teihrib : When you try public sip accounts on sipml5.org , webrtc2sip 
websocket server  is used and it does not have anything to do with media, it 
just proxies the sip messages and it's a totally different scenario compared to 
Asterisk. so chrome to chrome must be fine , and softphone to chrome does not 
work , as you said , because of profile mismatch .

Original comment by ln.nima...@gmail.com on 27 Sep 2012 at 8:30

GoogleCodeExporter commented 9 years ago
I forgot to say that you can use doubango softphone clients and make direct 
calls from softphone to chrome and vice versa .
have a look at here : 
http://code.google.com/p/sipml5/wiki/Calling_SIP_clients

Original comment by ln.nima...@gmail.com on 27 Sep 2012 at 8:33

GoogleCodeExporter commented 9 years ago
@ln.nima.nl it's just strange for me, because it looks like chrome is ok in 
this case? or I missed something.

Original comment by teih...@gmail.com on 27 Sep 2012 at 10:17

GoogleCodeExporter commented 9 years ago
I verified the outgoing SDP and it's really strange .You are right, when I use 
chrome on win7-32 , there is only one crypto line (AES_CM_128_HMAC_SHA1_80) but 
using chrome un ubuntu-64 , SDP has two crypto lines , first is 32 and second 
is 80 , and apparently Asterisk only handles the first crypto line which is 32 
and that's the source of this issue. (although both pcs load the same webpage 
and same problem when I tried with online server)
I got the Idea from this post 
:https://groups.google.com/d/msg/discuss-webrtc/YhI5fUpx1jc/DOJv90wSZaIJ
that removing the first line is gonna solve the problem .
Can you point me to some direction on how to do it ?
which Java script source file should I modify? or is it possible to teach 
Asterisk to handle both crypto lines and only accept "AES_CM_128_HMAC_SHA1_80" ?
Thank you

Original comment by ln.nima...@gmail.com on 27 Sep 2012 at 11:49

GoogleCodeExporter commented 9 years ago
I modified tmedia_session_jsep.js function decorate_lo to remove crypto string 
with _32. Then the call established and there is no domexception anymore, but I 
hear only silence. And in asterisk log there again 
[Sep 28 01:42:31] WARNING[22993][C-00000015] res_srtp.c: SRTP unprotect failed 
with: authentication failure 10
[Sep 28 01:42:33] WARNING[22993][C-00000015] res_srtp.c: SRTP unprotect failed 
with: authentication failure 110
Also there is new message 
[Sep 28 01:35:46] WARNING[22925][C-00000012] app.c: No audio available on 
SIP/1060-00000024??
Any thoughts?

Original comment by teih...@gmail.com on 28 Sep 2012 at 6:15

GoogleCodeExporter commented 9 years ago
OMG, it's working! I don't know what was wrong (possible browser cache), but 
now it's working! Here is modified code (just for test, not for regular use). 
When run this code there is no more message app.c: No audio available on 
SIP/1060, but "SRTP unprotect failed with:" still appears.

Original comment by teih...@gmail.com on 28 Sep 2012 at 6:28

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you very much Anton. You did a great job .
My problem is solved now.
Now I can call out from my chrome on ubuntu-64 and everything works perfect and 
as expected . I don't see any errors not in chrome , not in Asterisk . (Unlike 
you I don't see: SRTP unprotect failed). Incoming calls are also fine.
And I need to add that it did not affect other clients that were working 
correctly before(my chrome on win7-32).
Try to restart everything (web and asterisk server and your pcs) and also clear 
all the cache on browser, and try again and see if it works for you.
I don't know if Mamadou will accept this hacked code and add it to the source 
officially and change the status of this issue to FIXED . but it will be great 
if he accepts this .
looking forward to that .
Regards

Original comment by ln.nima...@gmail.com on 28 Sep 2012 at 9:26

GoogleCodeExporter commented 9 years ago
No, this code isn't good enough to be added to main sipml5 code, it's just a 
proof of hypothesis about AES :)

Original comment by teih...@gmail.com on 28 Sep 2012 at 9:51

GoogleCodeExporter commented 9 years ago
Further testing gives me another result. When I call through asterisk to real 
voip provider, I get the same DOM exception, but in chrome log there are 
another messages:
[6604:7880:1541542568:INFO:CONSOLE(55)] "State machine: 
c0000_Outgoing_2_Connected_X_i2xxINVITE", source: 
http://192.168.224.226/src/tinySAK/src/tsk_utils.js?svn=10 (55)
[3844:8012:1541542584:VERBOSE3:webrtcsdp.cc(1253)] Ignored line: a=fmtp:101 0-16
[3844:8012:1541542584:VERBOSE3:webrtcsdp.cc(1253)] Ignored line: 
a=silenceSupp:off - - - -
[3844:8012:1541542584:VERBOSE3:webrtcsdp.cc(1253)] Ignored line: a=ptime:20
[3844:8012:1541542584:VERBOSE3:webrtcsdp.cc(1253)] Ignored line: 
a=ice-options:google-ice
[3844:8012:1541542584:VERBOSE1:webrtcsession.cc(372)] SetRemoteDescription 
called with action in wrong state, action: 2 state: 6
And the main inconvinience is that in case of local voip in lan (ip 192.168...) 
there is all ok (bidirectional sound even with this DOMException), but when use 
public voip provider there is sound only in "from browser" direction and no 
sound coming to browser. What may be wrong?

Original comment by teih...@gmail.com on 1 Oct 2012 at 8:50

GoogleCodeExporter commented 9 years ago
Try to put on hold and then resume. (I experienced also what you encountered)

Original comment by cristian...@gmail.com on 4 Oct 2012 at 10:09

GoogleCodeExporter commented 9 years ago
I've tryed it, nothing changed after resuming... 

Original comment by teih...@gmail.com on 5 Oct 2012 at 6:04

GoogleCodeExporter commented 9 years ago
A quick update:
With chrome stable (23.0.1271.64 m) and sipml5 r131 , I don't have this problem 
any more and I don't need a patch.
Looks like the issue is removed and sipml5 is working on my ubuntu 12.04-64 
with the default source.
Now I only see one line of crypto (80) in SDP for my outgoing calls.

Original comment by ln.nima...@gmail.com on 14 Nov 2012 at 9:46

GoogleCodeExporter commented 9 years ago
Confirm only one line with crypto 80 in chrome 23.0.1271.64 m. Issue should be 
closed:)

Original comment by teih...@gmail.com on 15 Nov 2012 at 4:22

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 15 Nov 2012 at 1:43

GoogleCodeExporter commented 9 years ago
i have the same issue on the newest chrome. I tried this guys patch but now I 
have no audio.. 

Original comment by Jimster...@gmail.com on 31 Jul 2013 at 10:47

GoogleCodeExporter commented 9 years ago
The same problem exists on Chrome 32.0.1700.102 :(

Original comment by iskomor...@gmail.com on 29 Jan 2014 at 11:38

GoogleCodeExporter commented 9 years ago
same problem here too. sipml5 sends AES 32 + 80.

static sound in receiving end, but sipml5 client can hear audio from called 
client.

Original comment by ole.stub...@gmail.com on 15 May 2014 at 5:58

GoogleCodeExporter commented 9 years ago
also have the same issue with chrome Version 40.0.2214.115 (64-bit), in 
asterisk res_srtp.c:407 ast_srtp_unprotect: SRTP unprotect failed with: 
authentication failure 10 

Original comment by bhak...@safesoft.io on 13 Mar 2015 at 1:57

GoogleCodeExporter commented 9 years ago
The same problem, call is ok with audio but after about 1 minute get silence
Tryed on 2 Asterisk servers
Chrome Version 41.0.2272.101
In tcpdump packets coming but can't see in Asterisk rtp debug 
[Apr  1 11:27:50] WARNING[9154][C-00000000]: res_srtp.c:406 ast_srtp_unprotect: 
SRTP unprotect failed with: authen                                              
       tication failure 10

Original comment by alexande...@myphone.ge on 1 Apr 2015 at 12:47

GoogleCodeExporter commented 9 years ago
It's very strange, because we can't reproduce this anymore. Also you should 
avoid using SDES-SRTP (with "crypto" line), because only DTLS-SRTP is mandatory 
(for example Firefox not supports SDES at all).
Also I think that you faced with other kind of problem and you should fill 
separate issue or fill request in doubango google group.

Original comment by teih...@gmail.com on 1 Apr 2015 at 1:01

GoogleCodeExporter commented 9 years ago
Fixed now
Increasing dtlsrekey parameter solved my problem

Original comment by alexande...@myphone.ge on 1 Apr 2015 at 1:27