This is a fairly straight-forward way to do it:
if (method=="INVITE" ||
method=="BYE" || method=="ACK")
{
setflag(1);
};
Put it at the top after sanity checks, but before loose routing etc.
g-)
---- Original Message ----
From: Mr Greg Plater
To:
serusers@lists.iptel.org
Sent: Monday, June 06, 2005 11:41 PM
Subject:
[Serusers] Acc SetFlag issue
> When I have setflag in this location a
call logs three times.
>
> Were should I place the setflag if I
wish for all calls to log in acc
> with mysql?
>
>
>
Ser.cfg
> Snip:
>
> modparam("acc", "db_url",
"mysql://ser:heslo@localhost/ser")
> modparam("acc", "log_level",
1)
> modparam("acc", "log_flag", 1)
> modparam("acc", "log_fmt",
"cdfimorstup")
> modparam("acc", "db_flag", 1)
> modparam("acc",
"log_missed_flag", 2)
> modparam("acc", "db_missed_flag", 2)
>
modparam("acc", "report_cancels", 1)
>
>
> #
-----------------------------------------------------------------
>
# Loose Route Section
> #
>
-----------------------------------------------------------------
>
> #setflag(1);
>
> if (loose_route()) {
>
> if (has_totag()
&& (method=="INVITE" || method=="ACK")) {
>
>
if
(client_nat_test("3")||search("^Route:.*;nat=yes")){
>
setflag(6);
>
use_media_proxy();
>
};
> };
>
>
route(1);
>
break;
> };
>
>
>
>
>
> _______________________________________________
>
Serusers mailing list
> serusers@lists.iptel.org
>
http://lists.iptel.org/mailman/listinfo/serusers