Sip to iax2 by registering asterisk server?

I am going nuts with a sip phone behing nat trying to connect to a remote Asterisk pbx also behind a nat but with all kinds of problems. I can connect just fine with an IAX softphone though. Here’s the thing, I want to be able to register the SIP phone on my home Asterisk PBX and have it go to the remote system at the office. There’s GXP-2000 phones there which use the busy lamp buttons, so just trunking with a dialplan doesn’t show me as being available. I have seen someone register his Asterisk box on another, through a sip extension to IAX2, but never saw the config files. Anyone know how to do this?

I cant help you with the status (too tired to think of a solution) but as far as using your home box as an IAX to SIP converter you can have your phone register with your server at home with a SIP account and then have your server at home register with your asterisk server via IAX. To pass the call from your home box to your sip phone you would do:
Exten => xxxxx,n,Dial(SIP/1234)
And to send calls to your remote asterisk server you would send any dialed digits to the remote server. Something like this:
Exten => X.,1,Dial(IAX2/xxxxx@IP/${EXTEN})