For a) you would have normally route the calls out on a VOIP trunk rather than using the scarce resource of the ISDN line.
If you had an analogue interface card in the asterisk box with FXO modules it would connect to extension lines from the Panasonic, or to incoming analogue PSTN if available (I've done the latter, not the former).
You could configure the above so that a VoIP extension user dialling an 01xxx xxxxxx number would be trunked out to a VoIP service with fallback to the PBX if the VoIP trunk was down or busy. The trunk pointing at the PBX would need to add any PBX prefixes like 9 for an outside line.
To force a call out the PBX from a VoIP phone you could prefix the number with an 8 or 9 or whatever to tell Asterisk to use the PBX trunk.
b) pbx -> Asterisk user calls would be handled by the same FXO port(s) on the asterisk receiving calls from the PBX extension users. It would route these to the Asterisk users in the same way its going to have to accept incoming calls. Perhaps the pbx user will dial 8 for an asterisk user followed by their asterisk extension number.
Asterisk -> pbx user calls would be handled by trunking calls to pbx extensions out to the pbx via a prefix or dial plan. A more elegant solution would be a "virtual extension" on the Asterisk system that when dialled by another * user called a pbx extension.