[Kamailio-Users] global variable for inter-transaction

Daniel-Constantin Mierla miconda at gmail.com
Tue Nov 18 22:52:25 CET 2008


On 11/18/08 23:44, Klaus Darilion wrote:
> Daniel-Constantin Mierla wrote:
>   
>> Hello,
>>
>> On 11/18/08 17:22, Alex R.S.M wrote:
>>     
>>> Hi,
>>>
>>> What type of variable can store a value from one Transaction to 
>>> another Transaction in the same dialog, i.e. to store a value from 
>>> "200 response" and use it  in "BYE request". I tried VAR and AVP and 
>>> they both are being reset in the new Transaction.
>>>       
>> with devel version you can use htable module. You can use call-id plus 
>> some extra text as key (note, call-id is not guaranteed as unique for 
>> calls space, but is very unlikely to happen in same time two calls with 
>> same call-id, if you want to avoid, then you can add to your key the Tags).
>> http://kamailio.org/docs/modules/1.5.x/htable.html
>>
>> Example:
>>
>> $sht($ci::myvalue) = $hdr(abc);
>>     
>
> What about deleting data from the hash table - does it have to be done 
> manually? Or is it possible based on a timer - e.g. if the BYE never 
> arrives the value will be stored in hash table endlessly
>   
manually delete for now -- in the to-do is the automatically remove on 
timer based on expire value that can be set as property to (key,value).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list