Re: [OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-26 Thread Daniel Zanutti
No, works same way.

Just look at docs of 3.1

On Mon, Sep 26, 2022 at 11:58 AM Saint Michael  wrote:

> I use opensips 3.1, does it matter?
>
>
> On Mon, Sep 26, 2022 at 10:20 AM Daniel Zanutti 
> wrote:
>
>> can you write your own functions with opensips?
>> Yes -> using routes
>>
>> Can you point me to an example?
>> Storing->
>> https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp5880336
>> Retrieving ->
>> https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp5887712
>>
>> Or work with flags, if just true or false value
>> https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp341408
>>
>> Regards
>> On Sun, Sep 25, 2022 at 1:45 PM Saint Michael  wrote:
>>
>>> Question:
>>> can you write your own functions with opensips?
>>>
>>>
>>> On Sun, Sep 25, 2022 at 12:05 PM Saint Michael 
>>> wrote:
>>>
 Dear Daniel
 Can you point me to an example?
 Right now Opensios will get a clogged memory.
 Many thanks.


 On Sun, Sep 25, 2022, 11:45 AM Daniel Zanutti 
 wrote:

> You have to use dialog variable storing.
> Take a look at dialog module.
>
> Em dom., 25 de set. de 2022 10:42, Saint Michael 
> escreveu:
>
>> I noticed that the variable
>> $avp(lineid)
>> set in the section of the code handling the original INVITE, is null
>> when I need to close the call.
>> Is there a way to store a variable that will be available
>> throughout the call, everywhere?
>> I am trying:
>> cache_store("local","lineid_$ci","$avp(lineid)",0);
>> but I need this value to disappear when this call is closed. I cannot
>> set an expiration because the call may last for 2 hours or 2 seconds.
>>
>> many thanks for your help and guidance
>>
>> Philip
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
 ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-26 Thread Saint Michael
I use opensips 3.1, does it matter?


On Mon, Sep 26, 2022 at 10:20 AM Daniel Zanutti 
wrote:

> can you write your own functions with opensips?
> Yes -> using routes
>
> Can you point me to an example?
> Storing->
> https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp5880336
> Retrieving ->
> https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp5887712
>
> Or work with flags, if just true or false value
> https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp341408
>
> Regards
> On Sun, Sep 25, 2022 at 1:45 PM Saint Michael  wrote:
>
>> Question:
>> can you write your own functions with opensips?
>>
>>
>> On Sun, Sep 25, 2022 at 12:05 PM Saint Michael  wrote:
>>
>>> Dear Daniel
>>> Can you point me to an example?
>>> Right now Opensios will get a clogged memory.
>>> Many thanks.
>>>
>>>
>>> On Sun, Sep 25, 2022, 11:45 AM Daniel Zanutti 
>>> wrote:
>>>
 You have to use dialog variable storing.
 Take a look at dialog module.

 Em dom., 25 de set. de 2022 10:42, Saint Michael 
 escreveu:

> I noticed that the variable
> $avp(lineid)
> set in the section of the code handling the original INVITE, is null
> when I need to close the call.
> Is there a way to store a variable that will be available
> throughout the call, everywhere?
> I am trying:
> cache_store("local","lineid_$ci","$avp(lineid)",0);
> but I need this value to disappear when this call is closed. I cannot
> set an expiration because the call may last for 2 hours or 2 seconds.
>
> many thanks for your help and guidance
>
> Philip
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

>>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-26 Thread Daniel Zanutti
can you write your own functions with opensips?
Yes -> using routes

Can you point me to an example?
Storing->
https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp5880336
Retrieving ->
https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp5887712

Or work with flags, if just true or false value
https://opensips.org/html/docs/modules/2.2.x/dialog.html#idp341408

Regards
On Sun, Sep 25, 2022 at 1:45 PM Saint Michael  wrote:

> Question:
> can you write your own functions with opensips?
>
>
> On Sun, Sep 25, 2022 at 12:05 PM Saint Michael  wrote:
>
>> Dear Daniel
>> Can you point me to an example?
>> Right now Opensios will get a clogged memory.
>> Many thanks.
>>
>>
>> On Sun, Sep 25, 2022, 11:45 AM Daniel Zanutti 
>> wrote:
>>
>>> You have to use dialog variable storing.
>>> Take a look at dialog module.
>>>
>>> Em dom., 25 de set. de 2022 10:42, Saint Michael 
>>> escreveu:
>>>
 I noticed that the variable
 $avp(lineid)
 set in the section of the code handling the original INVITE, is null
 when I need to close the call.
 Is there a way to store a variable that will be available
 throughout the call, everywhere?
 I am trying:
 cache_store("local","lineid_$ci","$avp(lineid)",0);
 but I need this value to disappear when this call is closed. I cannot
 set an expiration because the call may last for 2 hours or 2 seconds.

 many thanks for your help and guidance

 Philip


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-25 Thread Saint Michael
Question:
can you write your own functions with opensips?


On Sun, Sep 25, 2022 at 12:05 PM Saint Michael  wrote:

> Dear Daniel
> Can you point me to an example?
> Right now Opensios will get a clogged memory.
> Many thanks.
>
>
> On Sun, Sep 25, 2022, 11:45 AM Daniel Zanutti 
> wrote:
>
>> You have to use dialog variable storing.
>> Take a look at dialog module.
>>
>> Em dom., 25 de set. de 2022 10:42, Saint Michael 
>> escreveu:
>>
>>> I noticed that the variable
>>> $avp(lineid)
>>> set in the section of the code handling the original INVITE, is null
>>> when I need to close the call.
>>> Is there a way to store a variable that will be available throughout the
>>> call, everywhere?
>>> I am trying:
>>> cache_store("local","lineid_$ci","$avp(lineid)",0);
>>> but I need this value to disappear when this call is closed. I cannot
>>> set an expiration because the call may last for 2 hours or 2 seconds.
>>>
>>> many thanks for your help and guidance
>>>
>>> Philip
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-25 Thread Saint Michael
Dear Daniel
Can you point me to an example?
Right now Opensios will get a clogged memory.
Many thanks.


On Sun, Sep 25, 2022, 11:45 AM Daniel Zanutti 
wrote:

> You have to use dialog variable storing.
> Take a look at dialog module.
>
> Em dom., 25 de set. de 2022 10:42, Saint Michael 
> escreveu:
>
>> I noticed that the variable
>> $avp(lineid)
>> set in the section of the code handling the original INVITE, is null when
>> I need to close the call.
>> Is there a way to store a variable that will be available throughout the
>> call, everywhere?
>> I am trying:
>> cache_store("local","lineid_$ci","$avp(lineid)",0);
>> but I need this value to disappear when this call is closed. I cannot set
>> an expiration because the call may last for 2 hours or 2 seconds.
>>
>> many thanks for your help and guidance
>>
>> Philip
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-25 Thread Daniel Zanutti
You have to use dialog variable storing.
Take a look at dialog module.

Em dom., 25 de set. de 2022 10:42, Saint Michael 
escreveu:

> I noticed that the variable
> $avp(lineid)
> set in the section of the code handling the original INVITE, is null when
> I need to close the call.
> Is there a way to store a variable that will be available throughout the
> call, everywhere?
> I am trying:
> cache_store("local","lineid_$ci","$avp(lineid)",0);
> but I need this value to disappear when this call is closed. I cannot set
> an expiration because the call may last for 2 hours or 2 seconds.
>
> many thanks for your help and guidance
>
> Philip
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Question about cache_store and lifetime of variables

2022-09-25 Thread Saint Michael
I noticed that the variable
$avp(lineid)
set in the section of the code handling the original INVITE, is null when I
need to close the call.
Is there a way to store a variable that will be available throughout the
call, everywhere?
I am trying:
cache_store("local","lineid_$ci","$avp(lineid)",0);
but I need this value to disappear when this call is closed. I cannot set
an expiration because the call may last for 2 hours or 2 seconds.

many thanks for your help and guidance

Philip
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users