Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uuid_media_reneg API fails to add audio component to existing video-only call leg #1862

Open
figaro2015 opened this issue Nov 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@figaro2015
Copy link
Contributor

Describe the bug
The user is not able to add an audio component to the existing video-only call leg using the uuid_media_reneg API while passing both video and audio codecs as parameters to the API.

To Reproduce
Steps to reproduce the behavior:

  1. Create video-only call leg using originate API while having outbound_codec_prefs variable set to video only codec (VP8). Example: originate sofia/external/1004@192.168.86.66 3000 XML public. For the far end, it is recommended to use a video-capable SIP softphone, like Linphone. For the dial plan configuration, this call can be placed into a conference.
  2. Answer the phone call on the client side.
  3. Try to add an audio component to the previously created video-only call using the uuid_media_reneg API by specifying both audio and video codecs as parameters to the API (VP8 and OPUS). Example: uuid_media_reneg <channel_uuid> =VP8,OPUS
  4. Observe that the audio media component doesn't get added to the SDP in the INVITE the API generates and the call remains to be video-only.

Expected behavior
Newly generated SDP in the INVITE should contain both audio and video media components that are using OPUS and VP8 codecs correspondently. Example:

v=0
o=FreeSWITCH 1668598456 1668598460 IN IP4 192.168.86.35
s=FreeSWITCH
c=IN IP4 192.168.86.35
t=0 0
m=audio 22410 RTP/AVP 103 101
a=rtpmap:103 opus/48000/2
a=fmtp:103 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40
a=rtpmap:101 telephone-event/48000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
m=video 26018 RTP/AVP 102
b=AS:3072
a=rtpmap:102 VP8/90000
a=sendrecv
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 ccm tmmbr
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli

Package version or git hash
FreeSWITCH Version 1.10.9-dev+git20221107T233635Zbb682fc~64bit (git bb682fc 2022-11-07 23:36:35Z 64bit)

Analysis
The root cause of the problem appears to be the fact that switch_core_media_gen_local_sdp routine doesn't allow for the audio media component to be processed and consequently added to the SDP if 'rmode' of the audio engine in the session is set to SWITCH_MEDIA_FLOW_DISABLED, while audio engine 'rmode' is set to SWITCH_MEDIA_FLOW_DISABLED after the video-only call is established.
I have a fix for the problem and am ready to submit a pull request with the fix. Please let me know if I should submit it.

@figaro2015 figaro2015 added the bug Something isn't working label Nov 16, 2022
@figaro2015 figaro2015 changed the title uuid_media_reneg API fails to add audio component to existing video only call leg uuid_media_reneg API fails to add audio component to existing video-only call leg Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant