<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>"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"><<a href="mailto:roman.kudinov@novelapp.com" target="_blank">roman.kudinov@novelapp.com</a>></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>
> <extension name="conference_set_auto_outcall"><br>
> <condition field="destination_number" expression="123"><br>
> <action application="answer"/><br>
> <action application="set" data="conference_auto_outcall_caller_id_name=$${effective_caller_id_name}"/><br>
> <action application="set" data="conference_auto_outcall_caller_id_number=$${effective_caller_id_number}"/><br>
> <action application="set" data="conference_auto_outcall_profile=default"/><br>
> <action application="conference_set_auto_outcall" data="{ignore_early_media=true}sofia/gateway/sip_profile/number"/><br>
> <action application="conference" data="$1+flags{moderator|endconf|mute}"/><br>
> </condition><br>
> </extension><br>
===================================================<br>
<br>
================ This one does not work ================<br>
> <extension name="phone_only_session"><br>
> <condition field="destination_number" expression="456"><br>
> <action application="set" data="ignore_early_media=true"/><br>
> <action application="set" data="absolute_codec_string=PCMU,PCMA,opus"/><br>
> <action application="bridge" data="sofia/gateway/sip_profile/number"/><br>
> </condition><br>
> </extension><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>
> m=audio 18684 RTP/AVP 0 102 103 104 105 8 101 106 108 110<br>
> a=rtpmap:0 PCMU/8000<br>
> a=rtpmap:102 SPEEX/8000<br>
> a=rtpmap:103 SPEEX/16000<br>
> a=rtpmap:104 SPEEX/32000<br>
> a=rtpmap:105 opus/48000/2<br>
> a=fmtp:105 useinbandfec=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40<br>
> a=rtpmap:8 PCMA/8000<br>
> a=rtpmap:101 telephone-event/8000<br>
> a=fmtp:101 0-16<br>
> a=rtpmap:106 telephone-event/16000<br>
> a=fmtp:106 0-16<br>
> a=rtpmap:108 telephone-event/32000<br>
> a=fmtp:108 0-16<br>
> a=rtpmap:110 telephone-event/48000<br>
> a=fmtp:110 0-16<br>
> a=ptime:20<br>
<br>
But the directly bridged call offers incoming codec only, e.g. speex<br>
> m=audio 24972 RTP/AVP 102 101<br>
> a=rtpmap:102 SPEEX/16000<br>
> a=rtpmap:101 telephone-event/16000<br>
> a=fmtp:101 0-16<br>
> 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>
> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,G722,OPUS,PCMA"/><br>
in vars.xml<br>
<br>
I tried to change<br>
> <param name="inbound-codec-negotiation" value="generous"/><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>
> <param name="inbound-late-negotiation" value="false"/><br>
> <param name="inbound-zrtp-passthru" value="false"/><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">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>