Yes, this is possible, here are snippets from the extensions.conf and sip.conf of our main pbx and a from a test server, the main pbx forward a call for a specific DID to the test server, through a sip trunk (a sip friend defined in sip.conf) called vvcc (the test server):
extensions.conf, main pbx (inbound_context is the context for the inbound calls coming from our SIP/E1 gateway, defined in sip.conf as a sip friend):