<div dir="ltr">This topic was talked about on the list in the past week:  <a href="https://freeswitch.org/jira/browse/FS-8321">https://freeswitch.org/jira/browse/FS-8321</a><div><br></div><div>&quot;BEHAVIOR CHANGE Add variable media_mix_inbound_outbound_codecs to mix inbound and outbound codecs&quot;</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">roman.kudinov@novelapp.com</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=&quot;conference_set_auto_outcall&quot;&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;123&quot;&gt;<br>
&gt;      &lt;action application=&quot;answer&quot;/&gt;<br>
&gt;      &lt;action application=&quot;set&quot; data=&quot;conference_auto_outcall_caller_id_name=$${effective_caller_id_name}&quot;/&gt;<br>
&gt;      &lt;action application=&quot;set&quot; data=&quot;conference_auto_outcall_caller_id_number=$${effective_caller_id_number}&quot;/&gt;<br>
&gt;      &lt;action application=&quot;set&quot; data=&quot;conference_auto_outcall_profile=default&quot;/&gt;<br>
&gt;      &lt;action application=&quot;conference_set_auto_outcall&quot; data=&quot;{ignore_early_media=true}sofia/gateway/sip_profile/number&quot;/&gt;<br>
&gt;      &lt;action application=&quot;conference&quot; data=&quot;$1+flags{moderator|endconf|mute}&quot;/&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
===================================================<br>
<br>
================ This one does not work ================<br>
&gt; &lt;extension name=&quot;phone_only_session&quot;&gt;<br>
&gt;    &lt;condition field=&quot;destination_number&quot; expression=&quot;456&quot;&gt;<br>
&gt;      &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot;/&gt;<br>
&gt;      &lt;action application=&quot;set&quot; data=&quot;absolute_codec_string=PCMU,PCMA,opus&quot;/&gt;<br>
&gt;      &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/sip_profile/number&quot;/&gt;<br>
&gt;    &lt;/condition&gt;<br>
&gt; &lt;/extension&gt;<br>
========================<br>
<br>
I&#39;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=&quot;set&quot; data=&quot;outbound_codec_prefs=PCMU,G722,OPUS,PCMA&quot;/&gt;<br>
in vars.xml<br>
<br>
I tried to change<br>
&gt; &lt;param name=&quot;inbound-codec-negotiation&quot; value=&quot;generous&quot;/&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=&quot;inbound-late-negotiation&quot; value=&quot;false&quot;/&gt;<br>
&gt; &lt;param name=&quot;inbound-zrtp-passthru&quot; value=&quot;false&quot;/&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&#39;ve upgraded to FS 1.6.6 and now it doesn&#39;t work. It looks like I missed an important setting that makes &quot;bridge&quot; application to work in<br>
proxy media mode.<br>
I checked I don&#39;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">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="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">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><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">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</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>