Detecting Original distination number on incoming forwarded call

I have been searching for weeks on a way to route an incoming call based on the following conditions:

  1. The incoming call was forwarded.
  2. read the originally dialed phone number.
  3. Route the incoming call to specific destination based on a match on the originally dialed number.

In short, I want to create a voicemail platform that will recieve busy/unanswered forwarded calls and route them to the proper mailbox from a single DID.

My provider is flowroute and the calls would be forwarded by AT&T Wireless.

What would it take to do this? I have tried looking into Asterisk Logs but the call information does not provide any info that would help divert a call that was forwarded. I suspect that this “detection” would need to be done on the SIP header level.

I can almost guarantee you that the Wireless provider will not prove that call information to you when a call is forwarded to your flowroute DID.

1 Like

AT&T does send the information when a call is forwarded. For example, third party voicemail platforms receive incoming forward calls (busy, unavailable, rejected) from numerous subscribers into a single DID. The voicemail switch then extracts the originally dialed number along with the callers number to route the call to the correct voicemail box. The originating caller ID is stored in the voicemail envelope. Example would be YouMail voicemail service.