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