The answer to this one was not all that easy because it is hidden on the source code and undocumented as far as I can tell.


sofia_glue.c has a function called sofia_glue_do_invite. Right there is where all this is generated and you can pretty much change any header you want using channel variables. The contact relevant ones you are looking for are:


sip_invite_contact_params

sip_contact_user



contact_params is what goes after the URI (after the ;) and the contact_user is 5122046107, which in your case you want to change to TCAPI_User.

What I would really ask you to do is to go ahead and document those on the wiki, please. A lot of these variables are not documented anywhere and few ppl know of their existence.

Regards,
-- 
João Mesquita
Sent with Sparrow

On Friday, March 2, 2012 at 4:01 PM, Andrew Melton wrote:

I know this has been asked before, but I can't seem to put my finger on the answer, any suggestions of where to look are appreciated.

Freeswitch (Sofia) is rewriting the Conact header on calls originating on a trunk ('inbound' context), routing to another trunk ('outbound' context).  None of the calls are from registered users or extensions, this is more of an SBC configuration (LCR). 

For example, 

incoming to Freeswitch:
Contact: <sip:5122046107@74.37.201.198:5060;user=phone>

Outbound from Freeswitch:
Contact: <sip:TCAPI_User@84.19.135.13:5060;transport=udp;gw=trunk_2>

I really don't want to modify the from userpary, nor do I want to include gw=trunk_2.  I just can't figure out the right syntax or parameter to change it.  Is it a parameter in the dialplan, or should I be using a regex on the outbound interface?

Thanks.

_________________________________________________________________________
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