[Home]

Summary:ASTERISK-26050: chan_sip: WebRTC Audio + Video Negotiation Problem
Reporter:Sebastian Gutierrez (sum)Labels:
Date Opened:2016-05-23 14:27:38Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Channels/chan_sip/General
Versions:13.9.0 Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-26240 chan_sip: No Sound on playback when dialing on Video Call
Environment:WebRTC Ubuntu 16.04Attachments:( 0) agent1001.log
( 1) agent1004.log
( 2) DialplanVerbose
( 3) full.txt
( 4) fulllog
( 5) fulllog.txt
( 6) LogClonfgBrdigeonlyaudio.txt
( 7) LogConfBridgevideoNoPlayBackSound
( 8) pcap.rar
( 9) sip_integra.txt
(10) sip.txt
(11) sipdebug.txt
Description:Im having an issue that I think is on sdp negotiation. using webrtc

basically is one way audio, but this is not nat related, the problem is when I have 2 peers with audio and video capability, when both have this capability the part that answer the call answers with video even when on the initial INVITE theres is no video, but I think is using the capabilities of the peer instead of the offer. as the ice negotiation use different ports for audio and video seems that if I dont answer with video enable I dont have audio.

Peer             User/ANR         Call ID          Format           Hold     Last Message    Expiry     Peer      
192.168.99.127   1003             bjkrs1u8ui42ot3  (alaw)           No       Rx: ACK                    1003      
192.168.99.249   (None)           244fb0d764f9f25  (nothing)        No       Rx: OPTIONS                <guest>  
192.168.99.124   1001             5a99af5106c996d  (alaw|vp8)       No       Tx: ACK                    1001  


I attach a sip log from asterisk.

Let me know if Im not clear enough.
Comments:By: Asterisk Team (asteriskteam) 2016-05-23 14:27:39.231-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Sebastian Gutierrez (sum) 2016-05-23 14:31:03.169-0500

debug attached

By: Rusty Newton (rnewton) 2016-05-23 16:56:57.548-0500

Please attach the configuration of the peers.

(More > Attach Files)

Attach the files as .txt. Thanks!

By: Sebastian Gutierrez (sum) 2016-05-23 17:15:39.716-0500

sip configuration (chan_sip)

By: Sebastian Gutierrez (sum) 2016-05-24 19:04:18.800-0500

let me know if you need more information or test some patch

By: Rusty Newton (rnewton) 2016-05-25 16:42:45.152-0500

Thanks, can you also include a new debug file that includes both the SIP trace integrated with verbose,debug,error,warning and notice log channels? Be sure to turn verbose and debug up to 5 each.

By: Sebastian Gutierrez (sum) 2016-05-25 16:55:17.797-0500

Attached a full log 1002 called 1001, 1001 cant hear audio, 1002 can.

both with video and audio capabilities

if you need me to add some compiler flags on asterisk to get more verbosity  let me know

thanks

By: Sebastian Gutierrez (sum) 2016-06-01 20:01:20.922-0500

any update on this? please let me know if I can do anything to help

By: Sebastian Gutierrez (sum) 2016-06-10 08:22:32.799-0500

can someone point me on the right direction of the code where the sdp is generated? so I can try to make a patch?

thanks

By: Rusty Newton (rnewton) 2016-06-15 16:07:47.010-0500

Re-attaching fulllog as fulllog.txt so it is readable from browser.

By: Rusty Newton (rnewton) 2016-06-15 16:13:18.927-0500

{quote}
the problem is when I have 2 peers with audio and video capability, when both have this capability the part that answer the call answers with video even when on the initial INVITE theres is no video
{quote}

The codecs offered on the initial invite won't matter for the second leg of the call. The second leg will use the codec configured in the peer for that leg.

Can you provide a fulllog that also has the SIP trace included within it?



By: Sebastian Gutierrez (sum) 2016-06-19 12:07:27.097-0500

the log has sip debug on, what log do you mean?

By: Rusty Newton (rnewton) 2016-06-20 09:49:54.166-0500

Sorry, I could have been more clear.

What you provided for "fulllog" - would be more helpful if it had the SIP trace within it as well. I don't see any SIP debug inside the log, only in a separate file.

By: Sebastian Gutierrez (sum) 2016-06-21 12:45:40.303-0500

1002 calls1001, 1002 hears ok, 1001 no sound
(full.txt attached)

By: Sebastian Gutierrez (sum) 2016-06-26 11:27:32.469-0500

let me know if you need anything else.


By: Joshua C. Colp (jcolp) 2016-06-27 13:54:23.112-0500

What does the output of the WebRTC client say? (Usually in the browser Javascript console). Anything of note? Does it fail the ICE negotiation? Can you get a packet capture?

By: Sebastian Gutierrez (sum) 2016-06-27 17:14:09.854-0500

in the client I can see the invite like this:

INVITE sip:902bgr1l@38aqm6okrur0.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WS 192.168.99.247:5060;branch=z9hG4bK12470f2e;rport
Max-Forwards: 70
From: "Agente3" <sip:...@192.168.99.247>;tag=as01241992
To: <sip:902bgr1l@38aqm6okrur0.invalid;transport=ws>
Contact: <sip:1003@192.168.99.247:5060;transport=WS>
Call-ID: 6cc70e4b63e333ba3c0e8d3c13be32f5@192.168.99.247:5060
CSeq: 102 INVITE
User-Agent: integraccs
Date: Mon, 23 May 2016 18:11:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 1548

v=0
o=root 173926305 173926305 IN IP4 192.168.99.247
s=Asterisk PBX 13.9.0
c=IN IP4 192.168.99.247
b=CT:384
t=0 0
m=audio 11618 RTP/SAVPF 107 101
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:60
a=ice-ufrag:5aa0bc4a0a8c859b65cab5a867615742
a=ice-pwd:6b8ad0943e2964c56562a8b9148f5951
a=candidate:Hc0a863f7 1 UDP 2130706431 192.168.99.247 11618 typ host
a=candidate:Sba3609d7 1 UDP 1694498815 186.54.9.215 11618 typ srflx raddr 192.168.99.247 rport 11618
a=candidate:Hc0a863f7 2 UDP 2130706430 192.168.99.247 11619 typ host
a=candidate:Sba3609d7 2 UDP 1694498814 186.54.9.215 11619 typ srflx raddr 192.168.99.247 rport 11619
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 ED:C4:F0:B1:AB:97:6A:67:80:2A:BC:5E:B8:80:37:E3:94:61:DC:02:18:A1:97:79:FE:ED:38:6D:2C:0B:82:4D
a=sendrecv
m=video 15120 RTP/SAVPF 100
a=ice-ufrag:758d9a2a6e6701c82242fef41043a6d1
a=ice-pwd:7178441742ee7cd604bf36db4bda3888
a=candidate:Hc0a863f7 1 UDP 2130706431 192.168.99.247 15120 typ host
a=candidate:Sba3609d7 1 UDP 1694498815 186.54.9.215 15120 typ srflx raddr 192.168.99.247 rport 15120
a=candidate:Hc0a863f7 2 UDP 2130706430 192.168.99.247 15121 typ host
a=candidate:Sba3609d7 2 UDP 1694498814 186.54.9.215 15121 typ srflx raddr 192.168.99.247 rport 15121
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 ED:C4:F0:B1:AB:97:6A:67:80:2A:BC:5E:B8:80:37:E3:94:61:DC:02:18:A1:97:79:FE:ED:38:6D:2C:0B:82:4D
a=rtpmap:100 VP8/90000
a=rtcp-fb:* ccm fir
a=sendrecv


this is asterisk invite has to comply with

https://tools.ietf.org/html/rfc3264
https://tools.ietf.org/html/rfc4317

a think this  "m=video 15120 RTP/SAVPF 100" shouldn't be there


By: Sebastian Gutierrez (sum) 2016-06-27 17:15:55.068-0500

I will get a pcap on the client side with no audio

By: Joshua C. Colp (jcolp) 2016-06-27 17:20:09.688-0500

You have force_avp set which will cause it to be RTP/SAVPF. If you want it to be the correct value, UDP/TLS/RTP/SAVPF, then turn it off.

By: Sebastian Gutierrez (sum) 2016-06-29 08:58:32.361-0500

changin force_avp to no still same issue

By: Sebastian Gutierrez (sum) 2016-06-29 08:59:13.506-0500

attached pcaps 1001 without sound

By: Joshua C. Colp (jcolp) 2016-06-30 09:32:46.930-0500

I think we'll also need to see the javascript console log from the browser.

By: Sebastian Gutierrez (sum) 2016-07-01 11:50:45.889-0500

1001 calls 1004

1001 has audio
1004 has no audio

By: Sebastian Gutierrez (sum) 2016-07-08 10:30:15.588-0500

any update on this? do you need any other log, test or something?



By: Joshua C. Colp (jcolp) 2016-07-08 10:46:05.843-0500

Any updates will be posted on this issue and any requests for logs/tests/etc will also be posted. As of this time I am unaware of anyone actively working on the issue but it has been accepted.

By: Sebastian Gutierrez (sum) 2016-10-17 13:23:40.507-0500

there is a new commit on branch 13 that sets videosupport=yes to no add the video on the sdp, could this be related?

the commit is from Author: Michael Kuron <m.kuron@gmx.de>

By: Sebastian Gutierrez (sum) 2016-10-27 09:50:35.939-0500

the commit I mention resolve the issue with the sdp, now is generated as it should you can close this issue

By: Rusty Newton (rnewton) 2016-10-28 08:46:54.251-0500

[~sum]  Add description and logs for the aspect of the issue that wasn't fixed on here.

By: Sebastian Gutierrez (sum) 2016-10-28 09:45:12.813-0500

Add diferent logs, let me know if its ok.

the main issue here is that when a video call is made I cant hear the playback of sounds made from dialplan or applications but I can hear other participants, so I suppose asterisk is sending those playbacks to a different port???