[Serusers] t_on_failure and accounting

Zeus Ng zeus.ng at isquare.com.au
Thu May 6 18:23:21 CEST 2004


Hi all,

Can anyone suggest a better logic for me. What I want is to account "Busy"
or "DND" as missed calls and forward the request to voicemail.

In my config (attached), I have a t_on_failure block which will relay the
request to voicemail system. The trouble is, once the request is relayed,
SER will not treat this as a missed call. Instead, SER will treat it as a
successful call with the duration of the voicemail. It will also account two
BYEs.

I have tried to send a 'redirect to voicemail' reply to UA in the failure
block. But than, the account reason becomes a "300" response, not "4xx"
response.

failure_route[2] {
	xlog(L_NOTICE", "Callee busy or DND, forwarding to voicemail\n");
	revert_uri();
	lookup("aliases");
	subst_uri('/(sip:)(.*)@(.*)/<\1voicemail-\2@\3>/i');
	t_reply("300", "Redirect to voicemail");
}

Unless I can use acc_db_request() to do manual accounting or
sl_send_reply("300", ...) to send the redirect in the failure block, I don't
know to change the logic to get what I want. Any idea?


Zeus Ng
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ser_acc.txt
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040507/62779b2a/attachment.txt>


More information about the sr-users mailing list