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? -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez +52 (55)9116-91161
> 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?Right after you have read the number to call forward to, compare it to the number you are call forwarding from. If it matches, play the user an error message and have them try again. And no matter what you do, the dumb people will come up with more creative ways to tank your phone system. A large amount of my dialplan code is taking into account the stupid things they have done and handling it properly if they do it again. I swear, if you could harness their creativity for good you could solve the world's problems 10 times over. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150602/372340b5/attachment.html>
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Kevin Larsen Sent: Tuesday, June 2, 2015 4:09 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Forward loop protection...> 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?Right after you have read the number to call forward to, compare it to the number you are call forwarding from. If it matches, play the user an error message and have them try again. And no matter what you do, the dumb people will come up with more creative ways to tank your phone system. A large amount of my dialplan code is taking into account the stupid things they have done and handling it properly if they do it again. I swear, if you could harness their creativity for good you could solve the world's problems 10 times over. The loop checking is a bit more challenging than that. If Bob forwards to Fred and Fred forwards to Sue, all is well when Bob and Fred head out for a beer. A little later, we?re in deep doo-do0 when Sue forwards to Bob. --Don -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150602/787eb893/attachment.html>
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 Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
-----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