Jump to content

Archive: How to avoid loops


Tom Wellige
 Share


Go to solution Solved by Tom Wellige,

Recommended Posts

  • Solution

 

The following forum topic is restored from the Swyx Forum Archive (2007-2014)

 

Quote

2011-07-11 13:08:07, AchimB

 

Hello,
how can I avoid a Loop during call diversion?
For example: A user x is diverting his phone to user y, now I want to prevent that user y is able to divert to user x.
Thanks in advance
Achim

 

Quote

2011-07-11 13:24:19, Tom Wellige

 

You can't prevent user y to configure such a loop.
But you can stop the execution of the loop (if you don't want the server to do it for you by disconnecting the call).

 

To do so, just place a small rule in front of all other rules of a user:

 

Only problem with this approach is, that within the PBXScript.PreviousScripts collection there aren't any user numbers but just user names available, so

 

Update 2019-09-03: on restoring this topic from the archive I just wrote a such a function: IsRedirectionLoopConfigured

 

Another and most likely more robust attempt would be to check if the current script user is already in the PBXScript.PreviousScripts collection by using the function IsRedirectedFromByName and if so simply connect the call using the Connect To block.

 

Update 2019-09-03: on restoring this topic from the archive I just wrote a such a function: IsLoopConfigured

 

Use this kind of script for every user where you don't want to allow loops which would be detected by the server and disconnected. To get it for every user you can use the script as PreProcessing script. See the SwyxWare admin manual for details on this.

 

Regards, Tom.

 

Quote

2011-07-11 14:03:45, AchimB

 

Thanks Tom, I'll try and return the results
Best Regards
Achim

 

Quote

2011-07-11 23:16:04, Tom Wellige

 

Just a word on why it is possible anyway to configure loops within SwyxWare:

 

Redirections / Forwardings can not only be set in the SwyxIt! configuration but also within the call routing, the rule wizard or the graphical script editor. Especially the GSE provides such a flexibility that it is simply impossible to prevent a user (or two user independently from each other) to configure loops.

 

So what happens if there is a redirection loop configured?

 

Well, SwyxServer identifies he loop after a short moment and stops it by disconnecting the call and writing an event log entry.
If the administrator uses for example the provided event log monitor he will get notified immediately and will be able to take action (like removing the loop).
In my previous post I have suggested what to do, i.e. how to build a small script, to prevent loops before the server detects them and disconnects the call.

 

If I find time, I will make a complete and ready to use function out of it (if wanted).

 

Tom.

 

Quote

2011-07-12 08:36:48, markus.wallner

 

Hi Tom, 
such a function would be great.
I think it would be the best to redirect such calls to a specific number where the calls can be handled (like the number for undeliverable calls in the location settings)
-Markus

 

Quote

2011-07-12 14:50:28, AchimB

 

Thanks Tom, I'm trying to implement your suggestion, but till now, without luck.
Yeah, I'll appreciate if you take care of it, since there is a demand for it.
Best regards
Achim

 

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.