[Freeswitch-users] TCAPI_User in Contact
João Mesquita
jmesquita at freeswitch.org
Sun Mar 4 07:23:12 MSK 2012
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 (mailto:5122046107 at 74.37.201.198), 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 (http://www.sparrowmailapp.com/?sig)
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 at 74.37.201.198 (mailto:5122046107 at 74.37.201.198):5060;user=phone>
>
>
> Outbound from Freeswitch:
> Contact: <sip:TCAPI_User at 84.19.135.13 (mailto:TCAPI_User at 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 at freeswitch.org (mailto:consulting at freeswitch.org)
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org (mailto:FreeSWITCH-users at lists.freeswitch.org)
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120304/8ceffc5d/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list