Contact header field issue

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Contact header field issue

Postby martinnystrom » Mon Dec 14, 2015 7:23 am

Asterisk 11.7.0

I have a bit of an issue regarding the header contact. Currently we're using Asterisk as a B2BUA and bridge sip legs. In this bridging process the Asterisk seem to change the Contact header, removing the incoming header and replacing it with its own, or what it seems CALLERID(num).

Incoming contact header is as follows:
Contact: <sip:anonymous@foobar.com>
Outgoing contact header is as follows:
Contact: <sip:+4690303030@sip.proxy.address.com>

So basically we are losing the anonymous content from our contact header which present some issues with upstream operators. In this specific case the number is displayed at the called endpoint instead of "Anonymous".

Why is Asterisk doing this and can I avoid it and save our little "anonymous" string?
martinnystrom
Newsterisk
 
Posts: 2
Joined: Mon Dec 14, 2015 7:18 am

Re: Contact header field issue

Postby david55 » Mon Dec 14, 2015 8:04 am

Because it is a back to back user agent, not a proxy, so the Contact header represents the address to contact it, not the upstream user agent.

The ITSP is broken if they are reading any meaning into Contact other than the the SIP URI to which to direct re-INVITEs and BYEs, on a one hop basis!

They should be taking the caller ID from Remote-Party-ID or P-Asserted-Identity headers, and, if these are not present, from the the From header. See the sendrpid option for the first two.

If Asterisk forwarded the Contact header, when the ITSP tried to end the call, it would (assuming it is marginally compliant) send the BYE to foobar.com, which would reject it, because the call ID on the B leg from Asterisk is not not that from foobar.com.

Before that, it would have sent the ACK to foobar.com, which would have ignored it. As a result, Asterisk would have closed the call when the limit on sending 200 OK was exceeded.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: Contact header field issue

Postby martinnystrom » Mon Dec 14, 2015 8:50 am

Thank you David,

We will look into changing and using the PAI instead.
martinnystrom
Newsterisk
 
Posts: 2
Joined: Mon Dec 14, 2015 7:18 am


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest