SER example accounting
SIP Express Router
example: accounting calls to numerical destinations
- $Id: acc.cfg,v 1.3 2003/06/03 03:18:12 jiri Exp $
- ------------------ module loading ----------------------------------
loadmodule "modules/tm/tm.so"
loadmodule "modules/acc/acc.so"
loadmodule "modules/sl/sl.so"
loadmodule "modules/maxfwd/maxfwd.so"
loadmodule "modules/rr/rr.so"
- ----------------- setting module-specific parameters ---------------
- — acc params --
- set the reporting log level
- number of flag, which will be used for accounting; if a message is
- labeled with this flag, its completion status will be reported
- ------------------------- request routing logic -------------------
- main routing logic
route{
/* ********* ROUTINE CHECKS ********************************** */
- filter too old messages
log("LOG: Too many hops\n");
sl_send_reply("483","Too Many Hops");
break;
};
if (len_gt( max_len )) {
sl_send_reply("513", "Wow — Message too large");
break;
};
- Process record-routing
- labeled all transaction for accounting
- record-route INVITES to make sure BYEs will visit our server too
- forward the request statefuly now; (we need *stateful* forwarding,
- because the stateful mode correlates requests with replies and
- drops retranmissions; otherwise, we would have to report on
- every single message received)
sl_reply_error();
break;
};
}
See also
Back to SER tips and tricks
Created by: oej, Last modification: Fri 19 of Sep, 2003 (19:43 UTC)
Featured -
Search:

Page Changes














