I need a simple way to set either a boolean flag (or integer
value) during the INVITE of a given call in ser.cfg, and test
that value via "if" elsehere in ser.cfg during the 183/200
response messages for that same call.
This would be a data object unique to a given call,
which should disappear/lose persistence/end scope when
a given call ends. Not global, no need to write the
value to disk, doesn't need to survive a restart of SER, etc.
The various SER documents describe a number of things that
could do this, but most seem overly complex, storing the object
in a MYSQL database on disk or something, and these all seem
so excessive. There also appear to be a few built-in flags,
but the documentation suggests that all are actually there
for specific uses and so use for other things might not work.
I simply want to make a determination of something during
the INVITE for call 12345, and be able to refer to that
flag or integer value later on when the various response
messages for the same call (#12345) are coming back
through. I can't make the same determination on each
message after the INVITE because the original src_ip
address value where the INVITE came from doesn't seem
to be in a testable variable when handling reply
messages, or at least not in one that is clearly
documented.
I've chased a number of possible ways this might be done,
but tire of being referred away from the doc that came with
the source and over to web sites that tell me this or that module
that might do part of what I need is deprecated and to use
this other module, but the web site for the other module says
that the first module is better suited to what I want to
do (a circle), doesn't show how the set value can actually
be tested, or the web page just doesn't work anymore.
So, assuming there is a simple way to do this, I need a
quick code snip showing how to set/clear/assign a value to such
a beast within INVITE handling, and a quick code snip of how
to test it in an "if" statement during 183/200/110 type
response messages. Whatever it is, the value set, cleared
or being tested in one call should not affect any other
call.
Thanks in advance!