Tom Wellige

Persistent Variables

Recommended Posts

If you use variables in your script the content of these variables will be lost when the current call ends. Furthermore it is not possible to share the content of a variable with other simultaneously running scripts (same scripts, different scripts of the same or other user). There are lots of cases where you need to "remember" the content of a variable or simply share information between simultaneously running scripts.
 
Persistent Variables solve this problem. This extension provides an easy to use VBScript class (PersistentVariable) which stores it's content into a database and retrieves it from there.
 
The visibility, i.e. scope, of a persistent variable can be configured finely grained:
  • User
  • Global
  • Namespace
 
A variable with the scope User is accessible form all scripts of the current user. A user scope variable of another user with the same name does not interfere.
 
A variable with the scope Global is accessible from all scripts of all users.
 
A variable with the scope Namespace is accessible from any script (of any user) defining the same namespace. A variable being stored in another namespace but with the same name does not interfere.
 
The default scope is User, i.e. each user has his own set of persistent variables without need to worry to interfere with other user's scripts.

 

 

Example: Night Switch
 
Based upon the Persistent Variables extension this is an example on how to implement night switch functionality. There are two scripts included
 
  • Night Switch Manager
    Modify the night switch status via DTMF menu or Post Dialing Digits (e.g. as called from speed dial keys)
     
  • Night Switch enabled call routing script
    A simple example on how to use the night switch persistent variable in a call routing script to differ between day and night routing

 

 


 

 

License

 

Persistent Variables for SwyxWare Extended Call Routing
v1.0.1

 

This is a Swyx Forum Open Source Project.
https://www.swyx-forum.com/forum/64-projects/

 

Copyright (c) 2011-2017 by Swyx Forum
Copyright (c) 2011-2017 by Tom Wellige
All Rights Reserved.

 

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

 

The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software.

 

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 

 


 

Documentation

 

Below you will find detailed setup and usage instructions. 

 

You can also follow this video (oder dieses Video) which contains a Swyx webinar explaining setup and usage of the persistent variables.

 

1 Preparations

 

2 Setup

 

3 Usage

 

4 Properties

 

5 Scopes

 

6 Miscellaneous

 

Appendix A

 

Appendix B

 

 

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.