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;

    };