Invite has wrong To: domain, carrying SBC/Host

Hello all.

I am trying to resolve an issue with Asterisk chan_sip trunk users connecting to a platform where the user domain is different than the SBC they must connect through. This is probably trivially easy, but I’m not seeing the answer.

To correctly register the register string is as below

npanxxxxxx@server.domain:password@session.border.domain/npanxxxxxxx

This works correctly for registration and receiving calls. The issue is placing outbound.

I’ve configured it thusly

fromdomain=server.domain
host=server.domain
username=npanxxxxxx@server.domain
secret=password
type=peer

All of my invites end up at the correct SBC address in the Register string, and the from user is correct, but the To: field has the SBC address which is not correct

From: sip:npanxxxxxx@server.domain;tag=Something-1234abcde567
To: sip:1npanxxxxxx@session.border.domain

The obvious answer I’m struggling to find here is what I need to set to change that To: header to use the same domain name as the From header.

Thanks for any assistance.

The SBC should not be looking at To address. If you want a different address in the request URI, you will need to define the SBC to be the oujtbound proxy, not the destination, but there is probably a devil in the detail.

Unfortunately the terminating SBC absolutely screens for valid To: @domains. Both the From and To headers have to have the same domain for the call to pass the SBC and reach the SIP server.