The dialplan is simple, the main logic in lua script

   <extension name="external_call">
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="ignore_early_media =true"/>
        <action application="log" data="INFO original transfer was:${sip_refer_to} ${sip_h_referred-by} {caller_id_number}"/>
        <condition field="destination_number" expression="\d{7,}"/>
        <condition field="${sip_from_host}" expression="^(domain\.com|sbc\.domain\.com|10\.9\.0\.2)$">
            <action application ="lua" data="ans.lua"/>
            <action application="export" data="fax_enable_t38_request=true" />
            <action application="set" data="execute_on_answer=t38_gateway peer" />
            <action application="export" data="t38_passthru=true"/> -->
            <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ANSWER,NO_ROUTE_DESTINATION,OUTGOING_CALL_BARRED,UNALLOCATED_NUMBER"/>
            <action application="bridge" data="${dialstring}"/>
        </condition>
    </extension>

In luascript do the bridge bridge:

[...]
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);
[...]
session:setVariable('dialstring',session_call);


I'm suspect I have something wrong in profile settings, but what..


--
Best regards
Rogoshchenkov Nikolay


On Fri, Mar 7, 2014 at 2:46 PM, Russell Treleaven <rtreleaven@bunnykick.ca> wrote:
Can you show us the dialplan?


On Fri, Mar 7, 2014 at 2:17 PM, Nikolay Rogoshchenkov
<nickolayr@gmail.com> wrote:
> Thank's for your answer Russell.
> Strange, but it does not work. I still can't proxy call from internal
> profile to external. In SDP from FS side I still have internal media IP
> originator server instead of FS IP.
>
> BTW, have no problem to proxy call inside internal profile.
>
>
> --
> Best regards
> Rogoshchenkov Nikolay
>
>
> On Fri, Mar 7, 2014 at 11:49 AM, Russell Treleaven <rtreleaven@bunnykick.ca>
> wrote:
>>
>> you would need proxy_media=true and possibly bypass_media=false
>>
>> see https://wiki.freeswitch.org/wiki/Proxy_media
>>
>> On Fri, Mar 7, 2014 at 10:51 AM, Nikolay Rogoshchenkov
>> <nickolayr@gmail.com> wrote:
>> > Hello,
>> >
>> > Is it possible to proxy media only(!) for specific gateway?
>> >
>> > By default in dialplan I have
>> >   <action application="set" data="bypass_media=true"/>
>> >
>> > and I use a lua script for dynamic routing, so can I simply add
>> > [bypass_media=false,...] to my dialstring when specific gateway will be
>> > chosen?
>> >
>> >
>> > Thank you.
>> >
>> >
>> > PS: Freeswitch Version 1.5.6b
>> >
>> > --
>> > Best regards
>> > Rogoshchenkov Nikolay
>> >
>> >
>> >
>> >
>> > _________________________________________________________________________
>> > Professional FreeSWITCH Consulting Services:
>> > consulting@freeswitch.org
>> > http://www.freeswitchsolutions.com
>> >
>> > FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>> > http://www.cudatel.com
>> >
>> > Official FreeSWITCH Sites
>> > http://www.freeswitch.org
>> > http://wiki.freeswitch.org
>> > http://www.cluecon.com
>> >
>> > FreeSWITCH-users mailing list
>> > FreeSWITCH-users@lists.freeswitch.org
>> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> > http://www.freeswitch.org
>> >
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting@freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>> http://www.cudatel.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users@lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting@freeswitch.org
> http://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org