If this method is not working, maybe the best solution is to put this phone on site A connecting directly to the 2nd ipbx (B), and make some group management presence to make everything transparent and good outbound rules to make this phone able to make calls directly from the site A even if he is registred on ipbx B
If its webclient, its very easy to do it, if its desk phone, use stun or sbc.