Host part only in Contact message

Hi all

I am trying to interconnect with a mobile operator that requires only the host part URI in a SIP contact message.

if I set the contact in message to false, the SIP contact returns:
sip:gw+FREESWITCH@192.168.33.1:5060;transport=udp;gw=FREESWITCH

what you should/expect to be receiving:
sip:192.168.33.1:5060;transport=udp;gw=FREESWITCH

any ideas would be gratefully accepted.

Not sure with FS but it seems possible with SBC. You can reach out to us for further discussion and see we can do that.

Good morning @smrdoshi

I have sorted out the malformed SIP header, but editing the source of FS. (freeswitch-1.10.10.-release)
endpoints/mod_sofia/sofia.c
inside the calls to check if extension_in_contact is set.
around Line 4201 in
ā€“ format = strchr(sipip, ā€˜:ā€™) ? ā€œsip:gw+%s@[%s]:%d%s%sā€ : ā€œsip:gw+%s@%s:%d%s%sā€;
++ format = strchr(sipip, ā€˜:ā€™) ? ā€œsip:[%s]:%d%sā€ : ā€œsip:%s:%d%sā€;

Now my interconnect to the mobile operator has passed all the integration tests and we are going live, without the need for an additional SBC.

I hope this helps.

1 Like

Hi all,

Is there a way to unset the core contact header for a gateway, even from sofia.c? Setting gateway ā†’ register_contact = NULL; result in freeswitch using he default contact header.

We needed to set the contact user part of the contact header to the dynamic caller id. This seems impossible as the core contact header is set at gateway registration. The solution seems to be to add a new contact header with the caller id as contact user. However the new header does not replace the core header resulting in 2 contact headers in the invite.

Our gateway provider requires dynamic caller id as contact user of the contact header.

Thanks.

Akeko