HQ PBX has two E&M T1 CAS, connecting to GW's two T1 CAS ports. DID numbers for HQ is not seperated between the CAS ports. There are two remote sites with GW connecting to its local PBX. Now my question is: Is it possible that using connection tie-line can make sure call from Rs1 to HQ always use T1 port 1 on HQ, and call from RS2 to use T1 port 2 on HQ. Remember HQ DID number are in one pool. Dial peer on RS are same. Thanks. Somebody mentioned to me that tie line is like a tunnel that you can define to use which port on the other end for outbound. But it seems that it doesn't work that way.
The router will make no confusion as long the numbers used in dial-peer are correctly configured. Eg, if you have a mix of "router private" and "PBX dialplan" numbers, these do not overlap.
If you like the idea of using "connection trunk" tecnique with PRI too, it is possible to do that as well. It is called t-ccs (transparent CCS). Signaling timeslot is transported transparently with codec tccs, and voice channels can be compressed and VAD applied as desired.
Personally, unless proprietary ISDN IEs are used and the router is unable to pass them, I see no advantage in doing that.
The links about sending calls coming from VoIP to specific POTS, based on calling number: