Voxalot / SIP Broker Support Forums

Voxalot / SIP Broker Support Forums (https://forum.sipbroker.com/index.php)
-   Voxalot Support (https://forum.sipbroker.com/forumdisplay.php?f=4)
-   -   Static variable in Ruby? (https://forum.sipbroker.com/showthread.php?t=3371)

shkaff 09-02-2008 01:01 PM

Static variable in Ruby?
 
Hi there

Is there any approach to store some info in a static variable?
I mean a kind of variable, which keeps their value durring different calls, i.e. doesn't lost the value after execution of the ruby script.

It might be useful to arrange counters for statistic, etc
Counters might be used for call management, for example

Any idea would be appreciated,
Alexey

emoci 09-03-2008 03:47 AM

Quote:

Originally Posted by shkaff (Post 18771)
Hi there

Is there any approach to store some info in a static variable?
I mean a kind of variable, which keeps their value durring different calls, i.e. doesn't lost the value after execution of the ruby script.

It might be useful to arrange counters for statistic, etc
Counters might be used for call management, for example

Any idea would be appreciated,
Alexey

You're asking this in the wrong forum....

You want the MySipSwitch Forums....

In any case as far as MSS is concerned:

1. Any hardcoded value (eg. number = 14162223333) will maintain that value with each run of the cycle, because it will be reassigned everytime

2. Any value assigned during the cycle will usually be lost (eg. cid = req.Header.From.FromURI.User )

Go to MySipSwitch https://www.mysipswitch.com/forum/index.php clarify what you're trying to achieve, and I'm sure someone will help....


All times are GMT. The time now is 06:37 PM.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.