This is from my modparam for db_extra.
modparam("acc", "db_extra", "from_uri=$fU; to_uri=$tU; ip=$si; ua=$hdr(User-Agent)")
$fU is from username variables and from_uri is the databse table field
$tu is to URI variable and to_uri is the databse table field
$si is source Ip and ip is the database table field
$hdr(Use-Agent) is user agent headr informaiton and ua is the database table field.
hope this help
Newbie on opensips, i was able to mysql accounting, but when i looked at
the table logs: