I have an analog line that I have forwarded to one of the DIDs of my pbx. How can I direct calls that have been forwarded from this analog line to a specific extension? I’m assuming inbound routes, but I think the CID is passed of the caller, not the forwarding number.
You have a line that is directly connected to the PSTN You have directed the PSTN exchange to forward calls, associated with the number of that analogue line, before they become analogue, to a number associated with one of you SIP accounts. You want calls that are forwarded in this way to be routed, by FreePBX in a specific way, but you want other calls arriving at that SIP account phone number to be handled in a different way. You believe that the PSTN operator forwards the original CLI along with the forwarded call. Is this a correct description of your situation and requirements.
There is no standard way that the PSTN to SIP gateway would have the identity of line with which the forwarding is associated. Even ANI is unlikely to help as it will be the account associated with the forwarded number that is likely to be being billed.
You need to look at the SIP INVITE request (details depend on the channel driver in use) and see if it contains any information on which the decision can be made. If not, this is not going to be possible. You will have to use a dedicated number on the SIP system (as you would do with true Direct In Dialling, in which every extension would have a different direct in dialling number).
You are correct, and thank you for the information. I was thinking this was going to be the case.
With most providers, there would be a Diversion header in the incoming INVITE on forwarded calls. Your customized context for the trunk would detect this and route the call accordingly.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.