The original context of your question is decidedly off-topic for Server Fault (it does sound like you're trying to do this for home use), and this is somewhat esoteric even if it were in the context of a business/corporate phone system, but it's an interesting problem so I'll take a swing at it.
The way it sounds to me is that you have two SIP accounts,
You receive an incoming call on
SIP1 and want to forward it to your cell phone via
I'll start by saying that you really need a VOIP PBX to do this easily. You can probably hack something together with SIP proxies and the like, but a PBX is a far better solution.
I'm using the FreePBX installable distribution but there are lots of other options based around Asterisk/FreePBX out there.
To do what you want you would need to go through the following steps:
- Configure Asterisk to connect to both SIP accounts
- Create an extension and call-forward it to your cell phone.
- Create an inbound route from
SIP1 and point it at that extension.
- Create an outbound route through
SIP2 to handle all outgoing calls.
When you receive a call the system will call your cell phone through the SIP2 account.
If the caller ID needs customizing you can do that with some minor Asterisk hackery.
Making it so you can use
SIP2 from other locations is a bit trickier -- the PBX won't unregister from a provider. You would need to create another device/user account and connect your phone to your PBX in order to make outbound calls using
SIP2 from other locations. (The call would go to your PBX, and then be placed over the
SIP2 outbound route.)
Rather than going through all of these awful gyrations you should really shell out some cash for a SIP Trunk Provider (Ask Google. I use VoicePulse's business services and they've been quite good). This will let you have one or more phone numbers and multiple channels (simultaneous calls) on one SIP account registration.
The PBX administration bits then become much more conventional (the inbound/outbound routing is symmetric and all you need to worry about are your device/user accounts).