Jump to content
Tom Wellige

Archive: How to avoid loops

Recommended Posts

 

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

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • 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.