We have a Cisco 2811 at a remote site that is connected to our hub via a VPN. We are interested in terminating a service provider SIP trunk onto this 2811 using CUBE so phones at the remote site can use the SIP trunk on the 2811 as their gateway. The problem that I'm having relates inbound calls. Calls come in from the SIP trunk and appear to be terminated correctly. The problem is that when the call setup is attempted with CUCM, the source address in the SIP header is the public IP address on the 2811. It needs to be the internal IP address (assigned to loopback0). I see that I can change the SIP binding address and also re-write the source address in the SIP header, but the problem is that this applies to all traffic. If I bind SIP to the loopback0 (with the private IP), then incoming SIP calls from the service provider break. If i re-write our public IP address in the SIP header, then again everything breaks.
How can the SIP headers between the serviced provider and our 2811 use a public IP as the source address and the SIP headers between our 2811 and CUCM use an internal address?