Thanks for your replay. Setting sip_req_uri variable was giving me internal server error.

<anti-action application="bridge" data="{sip_invite_req_rui=${sip_invite_req_rui}sofia/external/${destination}@${sip_h_X-Dest}"/>

fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:40 sofia/external/14703999454@45.56.70.29:5070 Standard INIT
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:48 (sofia/external/14703999454@45.56.70.29:5070) State Change CS_INIT -> CS_ROUTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:516 (sofia/external/14703999454@45.56.70.29:5070) State INIT going to sleep
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:473 (sofia/external/14703999454@45.56.70.29:5070) Running State Change CS_ROUTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] sofia.c:6760 Channel sofia/external/14703999454@45.56.70.29:5070 entering state [terminated][900]
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [NOTICE] sofia.c:7779 Hangup sofia/external/14703999454@45.56.70.29:5070 [CS_ROUTING] [NORMAL_UNSPECIFIED]
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:532 (sofia/external/14703999454@45.56.70.29:5070) State ROUTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] mod_sofia.c:141 sofia/external/14703999454@45.56.70.29:5070 SOFIA ROUTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:532 (sofia/external/14703999454@45.56.70.29:5070) State ROUTING going to sleep
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:473 (sofia/external/14703999454@45.56.70.29:5070) Running State Change CS_HANGUP
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:739 (sofia/external/14703999454@45.56.70.29:5070) Callstate Change DOWN -> HANGUP
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:741 (sofia/external/14703999454@45.56.70.29:5070) State HANGUP
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] mod_sofia.c:431 Channel sofia/external/14703999454@45.56.70.29:5070 hanging up, cause: NORMAL_UNSPECIFIED
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:60 sofia/external/14703999454@45.56.70.29:5070 Standard HANGUP, cause: NORMAL_UNSPECIFIED
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:741 (sofia/external/14703999454@45.56.70.29:5070) State HANGUP going to sleep
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:508 (sofia/external/14703999454@45.56.70.29:5070) State Change CS_HANGUP -> CS_REPORTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:473 (sofia/external/14703999454@45.56.70.29:5070) Running State Change CS_REPORTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:827 (sofia/external/14703999454@45.56.70.29:5070) State REPORTING
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:104 sofia/external/14703999454@45.56.70.29:5070 Standard REPORTING, cause: NORMAL_UNSPECIFIED
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:827 (sofia/external/14703999454@45.56.70.29:5070) State REPORTING going to sleep
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_ivr_originate.c:3751 Originate Resulted in Error Cause: 31 [NORMAL_UNSPECIFIED]
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:499 (sofia/external/14703999454@45.56.70.29:5070) State Change CS_REPORTING -> CS_DESTROY
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_session.c:1646 Session 50 (sofia/external/14703999454@45.56.70.29:5070) Locked, Waiting on external entities
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [NOTICE] switch_core_session.c:1664 Session 50 (sofia/external/14703999454@45.56.70.29:5070) Ended
    fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [NOTICE] switch_core_session.c:1668 Close Channel sofia/external/14703999454@45.56.70.29:5070 [CS_DESTROY]
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:630 (sofia/external/14703999454@45.56.70.29:5070) Running State Change CS_DESTROY
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [INFO] mod_dptools.c:3379 Originate Failed.  Cause: NORMAL_UNSPECIFIED
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [NOTICE] switch_channel.c:4804 Hangup sofia/external/sipp@104.237.140.13:5061 [CS_EXECUTE] [NORMAL_UNSPECIFIED]
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:640 (sofia/external/14703999454@45.56.70.29:5070) State DESTROY
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] mod_sofia.c:341 sofia/external/14703999454@45.56.70.29:5070 SOFIA DESTROY
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:111 sofia/external/14703999454@45.56.70.29:5070 Standard DESTROY
fd3863cc-ecd6-481f-80c6-102fb0d31fbe 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:640 (sofia/external/14703999454@45.56.70.29:5070) State DESTROY going to sleep
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_session.c:2796 sofia/external/sipp@104.237.140.13:5061 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:539 (sofia/external/sipp@104.237.140.13:5061) State EXECUTE going to sleep
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:473 (sofia/external/sipp@104.237.140.13:5061) Running State Change CS_HANGUP
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:739 (sofia/external/sipp@104.237.140.13:5061) Callstate Change RINGING -> HANGUP
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:741 (sofia/external/sipp@104.237.140.13:5061) State HANGUP
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] mod_sofia.c:425 sofia/external/sipp@104.237.140.13:5061 Overriding SIP cause 480 with 900 from the other leg
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] mod_sofia.c:431 Channel sofia/external/sipp@104.237.140.13:5061 hanging up, cause: NORMAL_UNSPECIFIED
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] mod_sofia.c:568 Responding to INVITE with: 900
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:60 sofia/external/sipp@104.237.140.13:5061 Standard HANGUP, cause: NORMAL_UNSPECIFIED
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:741 (sofia/external/sipp@104.237.140.13:5061) State HANGUP going to sleep
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:508 (sofia/external/sipp@104.237.140.13:5061) State Change CS_HANGUP -> CS_REPORTING
9f034ddd-6548-449c-8299-408d0d5cba9b 2016-02-06 17:23:18.139328 [DEBUG] switch_core_state_machine.c:473 (sofia/external/sipp@104.237.140.13:5061) Running State Change CS_REPORTING
send 296 bytes to udp/[104.237.140.13]:5061 at 17:23:18.156113:


But got solution by using fs_path. 

 <anti-action application="bridge" data="sofia/external/${sip_req_uri};fs_path=sip:${sip_h_X-Dest}}"/>



On 6 February 2016 at 22:07, Sergey Safarov <s.safarov@gmail.com> wrote:
Try set sip_req_uri variable.

Sergey

On Sat, Feb 6, 2016 at 7:01 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
Hi,

I receive Invite from vendor with i  need to forward to a destination ip set in special header X-Dest without changing the RURI.

When I try to bridge this invite 

  <action application="bridge" data="sofia/external/${destination}@${sip_h_X-Dest}" />
It changes the RURI. I need to preserve the RURI but set destination to X-Dest header. 

How can i forward call to that IP without changing the RURI. 


Best Regard. 
This email has been sent from a virus-free computer protected by Avast.
www.avast.com

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

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.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

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.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