I’m routing calls based on their DID using Trixbox. Now, I’m poking around the config files, trying to understand how that routing is effected. In my zapata.conf, I have
context=from-pstn. By the time a call hits the [ext-did] context, the DID has been mapped to the called extension. What I mean by that is that a line in [ext-did] of the form
exten => 9469,1,Set(FROM_DID=9469) matches a DID of 9469, as if 9469 were the called extension. I don’t see anything in [from-pstn] which would cause the DID to be mapped to the called extension. Where did the mapping take place? Also, I don’t see where the variable FROM_DID is used in the dialplan.