[Home]

Summary:ASTERISK-24958: Forwarding loop detection inhibits certain desirable scenarios
Reporter:Mark Michelson (mmichelson)Labels:
Date Opened:2015-04-13 15:06:24Date Closed:2015-04-17 15:59:13
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:11.17.1 13.3.2 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Way back in the old days, a feature was added to Asterisk to prevent infinite loops from happening due to call forwards. A basic scenario this was supposed to thwart was something like:

* Bob's phone is programmed to automatically forward calls to Carol.
* Carol's phone is programmed to automatically forward calls to Bob.
* Alice calls Bob.

By keeping track of who we have dialed, an infinite loop of call forwards is prevented and the call simply fails once one person is dialed a second time.

The problem with this setup is that call forwarding has progressed to new frontiers. Namely, people can manually forward incoming calls to whatever they may feel like. This means a few things:

* Call forwards do not necessarily mean the absence of a person at the destination.
* There is the possibility for human error when performing a call forward.

As such, there are scenarios now where dialing the same person twice is the desired behavior. Since there is no way to override the dialed_interfaces on a channel, dialplan and ARI application writers are forced to use arcane methods in order to work around the problem.

There is no patch on the issue for this, but the suggestion for a fix for this problem is to switch to a method by which the number of interfaces that have been dialed is counted. When the number reaches a defined maximum, then the call can be considered failed. This allows for the loop situation to still be thwarted, but it also allows for more flexible uses. This also has the side benefit of allowing easy integration with features such as SIP's Max-Forwards header.
Comments: