<div><div dir="auto">Hi Carsten,</div></div><div dir="auto"><br></div><div dir="auto">I have a setup exactly like that... I’ll get you the combination of settings I have for FS to handle the codecs. </div><div dir="auto"><br></div><div dir="auto">As for your second problem, I can tell you it will not work, I have a quote from FS devs to implement the reinvite with video but as of right now you cannot switch from audio to audio+video (unless you proxy_media which of course you don’t want). </div><div dir="auto"><br></div><div dir="auto">Joel. </div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 26, 2018 at 14:56 Carsten Bock <<a href="mailto:carsten@ng-voice.com">carsten@ng-voice.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am using FreeSwitch Release:<br>
FreeSWITCH (Version 1.9.0 -n20180903T123919Z-1~jessie+1git 5dd4451<br>
2018-08-31 19:05:39Z 64bit) is ready<br>
<br>
I have the following, rather simple scenario, where I can't figure<br>
out, how to configure it properly. I use FreeSwitch as Transcoding<br>
B2B-UA/SBC. All the logic is done on a Kamailio in Front of<br>
FreeSwitch. Thus my dialplan is rather simple:<br>
<br>
  <context name="public"><br>
    <extension name="other"><br>
      <condition><br>
        <action application="bridge"<br>
data="sofia/internal/${destination_number}@${loadbalancer}"/><br>
      </condition><br>
    </extension><br>
  </context><br>
<br>
In order to provide transcoding, I have set the following in my<br>
internal.xml profile:<br>
<br>
    <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/><br>
    <param name="outbound-codec-prefs" value="$${global_codec_prefs}"/><br>
<br>
    <param name="disable-transcoding" value="false"/><br>
    <param name="inherit_codec" value="false"/><br>
<br>
    <!--set to 'greedy' if you want your codec list to take precedence --><br>
    <param name="inbound-codec-negotiation" value="generous"/><br>
<br>
    <!-- Let calls hit the dialplan before selecting codec for the a-leg --><br>
    <param name="inbound-late-negotiation" value="true"/><br>
<br>
In vars.xml, I have the following:<br>
<br>
  <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G722,PCMU,PCMA"/><br>
  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G722,PCMU,PCMA"/><br>
<br>
  <X-PRE-PROCESS cmd="set" data="media_mix_inbound_outbound_codecs=true"/><br>
  <X-PRE-PROCESS cmd="set" data="rtp_pass_codecs_on_stream_change=true"/><br>
  <X-PRE-PROCESS cmd="set" data="sip_renegotiate_codec_on_reinvite=true"/><br>
<br>
This works like a charm for all Voice-Calls, the B-Party gets an offer<br>
including all the codecs from the list, e.g. A-Party supports only<br>
G722, B-Party supports only PCMU, so FreeSwitch does the transcoding.<br>
<br>
However, it leads to issues, when it comes to Video. As soon as I add<br>
H264 and VP8 to the codecs list (global_codec_pref /<br>
outbound_codec_prefs), the call to my B-Party includes the offer for<br>
Video as well, even if the A-Party did not offer Video initially. Is<br>
there an easy way to solve this? What are the right settings for such<br>
scenario?<br>
<br>
I tried the following in my dialplan:<br>
<br>
      <!-- Here we check for Video to add it back into the SDP if we want --><br>
      <condition field="${switch_r_sdp}" expression="/(.*)(m=video<br>
\d+)(.*)/s" break="never"><br>
        <anti-action application="export"<br>
data="nolocal:absolute_codec_string=G722,PCMA,PCMU"/><br>
      </condition><br>
<br>
This would remove the Video from the initial invite, if the A-Party<br>
did not offer Video initially. However, if I then enable Video at a<br>
later stage (Re-INVITE with m=video), FreeSwitch will not forward the<br>
new stream to the B-Party and then instead just send a re-INVITE with<br>
Audio only to the B-Party.<br>
<br>
Where did I go wrong? Any ideas?<br>
<br>
Thanks,<br>
Carsten<br>
<br>
--<br>
<br>
Carsten Bock<br>
CEO (Geschäftsführer)<br>
<br>
ng-voice GmbH<br>
Millerntorplatz 1<br>
20359 Hamburg / Germany<br>
<br>
<a href="http://www.ng-voice.com" rel="noreferrer" target="_blank">http://www.ng-voice.com</a><br>
mailto:<a href="mailto:carsten@ng-voice.com" target="_blank">carsten@ng-voice.com</a><br>
<br>
Office +49 40 5247593-40<br>
Fax +49 40 5247593-99<br>
<br>
Sitz der Gesellschaft: Hamburg<br>
Registergericht: Amtsgericht Hamburg, HRB 120189<br>
Geschäftsführer: Carsten Bock<br>
Ust-ID: DE279344284<br>
<br>
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:<br>
<a href="http://www.ng-voice.com/imprint/" rel="noreferrer" target="_blank">http://www.ng-voice.com/imprint/</a><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div></div>