<div dir="ltr">The dialplan is simple, the main logic in lua script<div><br></div><div><div><i> <extension name="external_call"></i></div><div><i> <action application="set" data="hangup_after_bridge=true"/></i></div>
<div><i> <action application="set" data="ignore_early_media =true"/></i></div><div><i> <action application="log" data="INFO original transfer was:${sip_refer_to} ${sip_h_referred-by} {caller_id_number}"/></i></div>
<div><i> <condition field="destination_number" expression="\d{7,}"/></i></div><div><i> <condition field="${sip_from_host}" expression="^(domain\.com|sbc\.domain\.com|10\.9\.0\.2)$"></i></div>
<div><i> <action application ="lua" data="ans.lua"/></i></div><div><i> <action application="export" data="fax_enable_t38_request=true" /></i></div>
<div><i> <action application="set" data="execute_on_answer=t38_gateway peer" /></i></div><div><i> <action application="export" data="t38_passthru=true"/> --></i></div>
<div><i> <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ANSWER,NO_ROUTE_DESTINATION,OUTGOING_CALL_BARRED,UNALLOCATED_NUMBER"/></i></div><div><i> <action application="bridge" data="${dialstring}"/></i></div>
<div><i> </condition></i></div><div><i> </extension></i></div></div><div><br></div><div>In luascript do the bridge bridge:</div><div><i><br></i></div><div><i>[...]</i></div><div><i>session_call= string.format("[leg_timeout=30,ignore_early_media=true,hangup_after_bridge=true,origination_caller_id_number=".. cid .."]sofia/gateway/%s/%s",gwlist[gw_index],dn);<br>
</i></div><div><i>[...]</i></div><div><i>session:setVariable('dialstring',session_call);</i><br></div><div><i><br></i></div><div><i><br></i></div><div>I'm suspect I have something wrong in profile settings, but what..</div>
</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br>--<div>Best regards<br>Rogoshchenkov Nikolay</div></div></div>
<br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 2:46 PM, Russell Treleaven <span dir="ltr"><<a href="mailto:rtreleaven@bunnykick.ca" target="_blank">rtreleaven@bunnykick.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you show us the dialplan?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, Mar 7, 2014 at 2:17 PM, Nikolay Rogoshchenkov<br>
<<a href="mailto:nickolayr@gmail.com">nickolayr@gmail.com</a>> wrote:<br>
> Thank's for your answer Russell.<br>
> Strange, but it does not work. I still can't proxy call from internal<br>
> profile to external. In SDP from FS side I still have internal media IP<br>
> originator server instead of FS IP.<br>
><br>
> BTW, have no problem to proxy call inside internal profile.<br>
><br>
><br>
> --<br>
> Best regards<br>
> Rogoshchenkov Nikolay<br>
><br>
><br>
> On Fri, Mar 7, 2014 at 11:49 AM, Russell Treleaven <<a href="mailto:rtreleaven@bunnykick.ca">rtreleaven@bunnykick.ca</a>><br>
> wrote:<br>
>><br>
>> you would need proxy_media=true and possibly bypass_media=false<br>
>><br>
>> see <a href="https://wiki.freeswitch.org/wiki/Proxy_media" target="_blank">https://wiki.freeswitch.org/wiki/Proxy_media</a><br>
>><br>
>> On Fri, Mar 7, 2014 at 10:51 AM, Nikolay Rogoshchenkov<br>
>> <<a href="mailto:nickolayr@gmail.com">nickolayr@gmail.com</a>> wrote:<br>
>> > Hello,<br>
>> ><br>
>> > Is it possible to proxy media only(!) for specific gateway?<br>
>> ><br>
>> > By default in dialplan I have<br>
>> > <action application="set" data="bypass_media=true"/><br>
>> ><br>
>> > and I use a lua script for dynamic routing, so can I simply add<br>
>> > [bypass_media=false,...] to my dialstring when specific gateway will be<br>
>> > chosen?<br>
>> ><br>
>> ><br>
>> > Thank you.<br>
>> ><br>
>> ><br>
>> > PS: Freeswitch Version 1.5.6b<br>
>> ><br>
>> > --<br>
>> > Best regards<br>
>> > Rogoshchenkov Nikolay<br>
>> ><br>
>> ><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" target="_blank">http://www.freeswitchsolutions.com</a><br>
>> ><br>
>> > FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> > <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>> ><br>
>> > Official FreeSWITCH Sites<br>
>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> > <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> > <a href="http://www.cluecon.com" 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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><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" target="_blank">http://www.freeswitchsolutions.com</a><br>
>><br>
>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>><br>
>> Official FreeSWITCH Sites<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> <a href="http://www.cluecon.com" 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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><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" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" 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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><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" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" 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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>