<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Brian,<br>
    <br>
    I saw this variable but looks like used it the wrong way. Thanks for
    the help, the codecs negotiation works properly now!<br>
    <br>
    <br>
    <div class="moz-cite-prefix">16.02.2016 19:16, Brian West:<br>
    </div>
    <blockquote type="cite">
      <div class="moz-text-html" lang="x-unicode">
        <div dir="ltr">This topic was talked about on the list in the
          past week:  <a
            href="https://freeswitch.org/jira/browse/FS-8321"><a class="moz-txt-link-freetext" href="https://freeswitch.org/jira/browse/FS-8321">https://freeswitch.org/jira/browse/FS-8321</a></a>
          <div><br>
          </div>
          <div>"BEHAVIOR CHANGE Add variable
            media_mix_inbound_outbound_codecs to mix inbound and
            outbound codecs"</div>
          <div><br>
          </div>
          <div>/b</div>
        </div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, Feb 16, 2016 at 6:40 AM,
            Roman Kudinov <span dir="ltr">&lt;<a
                href="mailto:roman.kudinov@novelapp.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:roman.kudinov@novelapp.com">roman.kudinov@novelapp.com</a></a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
              <br>
              I have a problem with bridging a call. My FS 1.6.6 is
              setup to bridge calls from RTMP-based source (using
              mod_rtmp) to a SIP gateway.<br>
              I have two branches in the dial plan.<br>
              <br>
              1) One works through mod_conference which calls an
              outbound number using conference_set_auto_outcall<br>
              <br>
              2) Another works by the direct bridging of incoming rtmp
              call into outbound SIP call.<br>
              <br>
              Whilst the first branch works just fine, the second one
              does not. They both use the same sofia profiles, SIP
              gateways and outbound SIP numbers.<br>
              They both are called from the same RTMP source. Here are
              the snippet of codes.<br>
              <br>
              ================== This one works
              ====================================<br>
              &gt; &lt;extension name="conference_set_auto_outcall"&gt;<br>
              &gt;    &lt;condition field="destination_number"
              expression="123"&gt;<br>
              &gt;      &lt;action application="answer"/&gt;<br>
              &gt;      &lt;action application="set"
data="conference_auto_outcall_caller_id_name=$${effective_caller_id_name}"/&gt;<br>
              &gt;      &lt;action application="set"
data="conference_auto_outcall_caller_id_number=$${effective_caller_id_number}"/&gt;<br>
              &gt;      &lt;action application="set"
              data="conference_auto_outcall_profile=default"/&gt;<br>
              &gt;      &lt;action
              application="conference_set_auto_outcall"
              data="{ignore_early_media=true}sofia/gateway/sip_profile/number"/&gt;<br>
              &gt;      &lt;action application="conference"
              data="$1+flags{moderator|endconf|mute}"/&gt;<br>
              &gt;    &lt;/condition&gt;<br>
              &gt; &lt;/extension&gt;<br>
              ===================================================<br>
              <br>
              ================ This one does not work ================<br>
              &gt; &lt;extension name="phone_only_session"&gt;<br>
              &gt;    &lt;condition field="destination_number"
              expression="456"&gt;<br>
              &gt;      &lt;action application="set"
              data="ignore_early_media=true"/&gt;<br>
              &gt;      &lt;action application="set"
              data="absolute_codec_string=PCMU,PCMA,opus"/&gt;<br>
              &gt;      &lt;action application="bridge"
              data="sofia/gateway/sip_profile/number"/&gt;<br>
              &gt;    &lt;/condition&gt;<br>
              &gt; &lt;/extension&gt;<br>
              ========================<br>
              <br>
              I'd like to outline that they use the same SIP profiles,
              they are called from the same RTMP-source (they differs by
              the destination_number), they<br>
              call the same SIP number.<br>
              I turned on SIP tracing on and found that the call that is
              initiated by mod_conference offers the codecs according to
              outbound_codec_prefs set<br>
              in vars.xml, here is the piece of log:<br>
              &gt;      m=audio 18684 RTP/AVP 0 102 103 104 105 8 101
              106 108 110<br>
              &gt;      a=rtpmap:0 PCMU/8000<br>
              &gt;      a=rtpmap:102 SPEEX/8000<br>
              &gt;      a=rtpmap:103 SPEEX/16000<br>
              &gt;      a=rtpmap:104 SPEEX/32000<br>
              &gt;      a=rtpmap:105 opus/48000/2<br>
              &gt;      a=fmtp:105 useinbandfec=1;
              maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20;
              minptime=10; maxptime=40<br>
              &gt;      a=rtpmap:8 PCMA/8000<br>
              &gt;      a=rtpmap:101 telephone-event/8000<br>
              &gt;      a=fmtp:101 0-16<br>
              &gt;      a=rtpmap:106 telephone-event/16000<br>
              &gt;      a=fmtp:106 0-16<br>
              &gt;      a=rtpmap:108 telephone-event/32000<br>
              &gt;      a=fmtp:108 0-16<br>
              &gt;      a=rtpmap:110 telephone-event/48000<br>
              &gt;      a=fmtp:110 0-16<br>
              &gt;      a=ptime:20<br>
              <br>
              But the directly bridged call offers incoming codec only,
              e.g. speex<br>
              &gt;      m=audio 24972 RTP/AVP 102 101<br>
              &gt;      a=rtpmap:102 SPEEX/16000<br>
              &gt;      a=rtpmap:101 telephone-event/16000<br>
              &gt;      a=fmtp:101 0-16<br>
              &gt;      a=ptime:20<br>
              <br>
              I tried everything I could imagine. I set
              absolute_codec_string in the dialplan (you can see it in
              the above snippet).<br>
              I explicitly set<br>
              &gt; &lt;X-PRE-PROCESS cmd="set"
              data="outbound_codec_prefs=PCMU,G722,OPUS,PCMA"/&gt;<br>
              in vars.xml<br>
              <br>
              I tried to change<br>
              &gt; &lt;param name="inbound-codec-negotiation"
              value="generous"/&gt;<br>
              from generous to greedy<br>
              <br>
              I tried with true/false in the following parameters in
              internal.xml and<br>
              external.xml SOFIA profiles<br>
              &gt; &lt;param name="inbound-late-negotiation"
              value="false"/&gt;<br>
              &gt; &lt;param name="inbound-zrtp-passthru"
              value="false"/&gt;<br>
              Nothing changes.<br>
              <br>
              Moreover the direct bridging worked fine on FS 1.4.7, it
              offered PCMU and Speex codecs to SIP.<br>
              I've upgraded to FS 1.6.6 and now it doesn't work. It
              looks like I missed an important setting that makes
              "bridge" application to work in<br>
              proxy media mode.<br>
              I checked I don't have neither bypass or proxy words in
              vars.xml, sofia.conf.xml, internal.xml, external.xml,
              public.xml or they are commented.<br>
              <br>
              Does anybody have any ideas about the reason for such
              behavior?<br>
              <br>
              <br>
              Thanks,<br>
              Roman<br>
              <br>
              <br>
_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              <a href="http://www.freeswitchsolutions.com"
                rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a href="http://www.freeswitch.org" rel="noreferrer"
                target="_blank">http://www.freeswitch.org</a><br>
              <a href="http://confluence.freeswitch.org"
                rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
              <a href="http://www.cluecon.com" rel="noreferrer"
                target="_blank">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
                rel="noreferrer" target="_blank"><a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>
              UNSUBSCRIBE:<a
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
                rel="noreferrer" target="_blank"><a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br>
              <a href="http://www.freeswitch.org" rel="noreferrer"
                target="_blank">http://www.freeswitch.org</a><br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <p><font face="courier new, monospace"><b><i><font
                                        size="4">Brian West</font></i></b><br>
                                  <span style="font-size:x-small"><a
                                      href="mailto:brian@freeswitch.org"
                                      target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:brian@freeswitch.org">brian@freeswitch.org</a></a></span></font></p>
                              <p><font size="1" face="courier new,
                                  monospace"><img shrinktofit="true"
                                    src="cid:part13.04080505.07000900@novelapp.com"><br>
                                </font></p>
                              <p><font size="2" face="monospace,
                                  monospace"><b><i>Twitter: @FreeSWITCH
                                      , @briankwest</i></b><br>
                                  <a
                                    href="http://www.freeswitchbook.com"
                                    target="_blank"><a class="moz-txt-link-freetext" href="http://www.freeswitchbook.com">http://www.freeswitchbook.com</a></a><br>
                                  <a
                                    href="http://www.freeswitchcookbook.com"
                                    target="_blank"><a class="moz-txt-link-freetext" href="http://www.freeswitchcookbook.com">http://www.freeswitchcookbook.com</a></a></font></p>
                              <p><font face="monospace, monospace">Got
                                  Bugs? Report them <a
                                    href="https://freeswitch.org/jira"
                                    target="_blank">here</a>! | Reddit: <a
href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
                              <p><font size="2" face="monospace,
                                  monospace"><b>T:</b>+19184209001 | <b>F:</b>+19184209002
                                  | <b>M:</b>+1918424WEST (9378)<br>
                                  <b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543
                                  | <b>Skype:</b>briankwest</font></p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>