Question : forward DID from Asterisk to Asterisk server

Say, I have 10 DID's that terminate on Asterisk A and I need to forward them to Asterisk B. Asterisk B then needs to forward them based on the DID. How do we do this? I've to identical SIP entries on both *A and *B. However *B sees all calls as coming from the Context - ignoring the DID.

Answer : forward DID from Asterisk to Asterisk server

Well if you don't send the DID number to AstB then how do you expect it to know what it was? Just because you send AstB a number (e.g. ${EXTEN}@trkAstB), this does not mean that AstB will have to send the call to a *local* extension. You can modify the dial plan on AstB to forward the call to wherever you want based on the dialled number, just like you are doing on AstA.

CALLERID(num) will set the number it appears to have been called from, not the number that was dialled. You should be able to read that value on AstB if you really want to do it like that, but it seems more natural to me that you send the dialled number (the DID) as the dialled number and not as the Caller ID.
Random Solutions  
 
programming4us programming4us