2011/6/16 Iñaki Baz Castillo <ibc(a)aliax.net>et>:
I've found isavpflagset() right now:
http://sip-router.org/wiki/cookbooks/core-cookbook/devel#isavpflagset
But it has no description. How is it supposed to work?
The Changelog file says:
-----------------------------------
Every AVP may by flaged from script via setavpflag(avpid, flag)
(it's similar like message flags setflags,resetflags,isflagset).
AVP flags must be declared using avpflags statement. Flags may be
tested via isavpflagset(avpid, flag). Both the setting and
testing may also be processed in a module. It's currently used in
the "rr" module for dialog_cookies. Such module should register
flag using register_avpflag(flag_id).
Example: avpflags myflag, dialog_cookie;
$a = 123; setavpflag($a, "myflag");
if (isavpflagset($a, "myflag")) { ....
$dlg_foo = "foo"; $dlg_bar = "bar";
setavpflag("$f./^dlg_",
"dialog_cookie");
----------------------------------------------
But is says that I must use setavpflag() to set flags in the AVP. In
my case, I retrieve the AVP value from a database (an integer field).
Could it work?
--
Iñaki Baz Castillo
<ibc(a)aliax.net>