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.
Please advice, AR
_________________________________________________________________ Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now. hthttp://clk.atdmt.com/MRT/go/119642558/direct/01/
At this point in time there are no variables that can store a value across dialogs. One alternative would be to store the value into a db during the first transaction and then retrieve it on the second transaction belonging to the same dialog. Use clid/fromtag/totag to identify the dialog.
Regards, Ovidiu Sas
On Tue, Nov 18, 2008 at 10:22 AM, Alex R. S. M alex_rsm@hotmail.com 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.
Please advice, AR
Proud to be a PC? Show the world. Download the "I'm a PC" Messenger themepack now. Download now. _______________________________________________ Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
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);
Cheers, Daniel
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
klaus
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