Plan with E1 card

I have plan like this, where HQ office connected to asterisk with TE110P E1 connected to current PBX ( i need 32 channels) so all remote client can dial to hq line (FXO) as a ip pbx client.
Is it possible ? if it possibe how can i configure extension for hq extension number ?
Thanks
PS: the PBX use Panasonic KX TD500 series with E1 slot installed.