[asterisk-users] Forward loop protection...
dk at donkelly.biz
dk at donkelly.biz
Wed Jun 3 07:43:31 CDT 2015
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of A J Stiles
Sent: Wednesday, June 3, 2015 3:08 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Forward loop protection...
On Tuesday 02 Jun 2015, Carlos Chavez wrote:
> Ia had a server overload today because someone did a call forward
> to their own extension. To do a call forward I write a key called
> CFWD with the extensión number and number to dial . The main script
> tests if the key/value exists and dials the number stored in the
> database. What is an easy way to prevent dumb people from creating a loop?
There currently is no easy way to prevent an infinite forwarding loop. If you come up with one, then you might well earn yourself a Nobel Prize for solving the Halting Problem .....
The obvious bodge is to set a hard limit on depth of recursion; if an actual real, live person is not reached within, say, five hops then the call should go to (the originally-called party's) voicemail.
--
AJS
Deciding on the mailbox to use is problematic! The dialed-party may be away for an extended period and wants voice mail handled by the forwarded-to party.
--Don
More information about the asterisk-users
mailing list