Please read the getting started documentation from http://www.iptel.org/doc. This is a bit old, and I strongly suggest to use ser 2.x instead of 0.9.x, therefore some additional documents might be also useful: http://www.iptel.org/ser/doc/010whatsnew.
Regards, Miklos
p.s. Please post all the questions/answers to the serusers list, others might be interested as well.
On 03/03/2009 08:35 PM, Martin Lane wrote:
Where can I learn the syntax or regexp format of the ser config file?
On Thu, Feb 26, 2009 at 3:50 AM, Miklos Tirpak miklos@iptel.org wrote:
Hello,
for simple and very fast boolean checks you can use the flags:
- declare the flag(s) at the beginning of the config:
flags FLAG_FOO, FLAG_BAR;
- Call the setflag(FLAG_FOO) and resetflag(FLAG_FOO) functions to set and
clear the flag when the INVITE is processed.
- Use "if (isflagset(FLAG_FOO)) {...}" to check the state of the flag in
the reply route.
For storing integer or string values you can use AVPs:
# during INVITE processing $foo = "myvalue"; $bar = 2;
# in reply_route: if ($foo == "myvalue") {...} if ($bar) {...}
Have a look at etc/ser-oob.cfg for examples. The values are attached to the transaction in both cases, therefore you need to forward the request with tm module.
Miklos
On 02/24/2009 06:40 AM, Frank Durda IV wrote:
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!
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers