Peering two asterisk servers with two different accounts

Hi,

I need to peer two asterisk servers with two different accounts via SIP.

Have Server A, which is connected to a PSTN and Server B, which accept calls for two different PSTN numbers coming from Server A and dials out though Server A with two different accounts which need to be billed separately on Server A.

It’s fine with incoming calls from Server A.
The problem is with outgoing calls from Server B as Server A assumes and bills any call coming from Server B from/for one account regardless different username/password in peer configurations I am using to dial out.

Any Ideas?