look at sofia_glue.c in the  do_invite function :)

/b 

On Fri, Jan 27, 2017 at 3:10 PM Mohit Gupta <mohit.g81@gmail.com> wrote:
Hello - Can someone explain me how can I configure a gateway so that it sets/unsets full or part of the SIP message fields specifically RURI, TO, FROM, CONTACT and USER AGENT dynamically for each call 'bridged' to this gateway. Also the SIP OPTIONS ping to use some statically configured values?

I can play with the params/variables for leg A (incoming) but unable to do the same for leg B (outgoing). Exporting or static config aren't helping much.

One example is if I like to use a SIP domain name e.g. sipdev.example.com in SIP messages e.g. RURI of SIP OPTIONS.
But sipdev.example.com cannot be used for DNS lookup.
It is common across multiple instances and I would like send the calls to specific instance based on called number.
If I set this in Gateway param "proxy", sofia tries to perform DNS lookup before sending out SIP OPTIONS.
I am unable to find a way so that sofia takes the IP to send the message to but uses the configured domain to format the SIP messages.

Is it possible by configuration or does it need some source modification?

Regards,
Mohit
_________________________________________________________________________
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
--

Brian West
brian@freeswitch.org


Twitter: @FreeSWITCH , @briankwest
http://www.freeswitchbook.com 
http://www.freeswitchcookbook.com

https://www.gofundme.com/freeswitch_ubuntu

Got Bugs? Report them here! | Reddit: /r/freeswitch

T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
Skype:briankwest