On Thursday 10 January 2008 18:03:36 CSB wrote:
I want to provide for forwarding of calls to voicemail
in various
circumstances, one of which is when the user is not registered with the
registrar. I've looked at various example configuration files that include
forwarding (e.g.
http://www.sipwise.com/wizard,
onsip.org) and have not
seen an implementation of this. Could anyone provide any tips regarding
this or is it as simple as:
route[3] {
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
<snip>
if (!lookup("location")) {
if (avp_db_load("$ruri/username", "$avp(i:20116)"))
{
avp_pushto("$ruri", "$avp(i:20116)");
t_relay;
return;
} else {
sl_send_reply("404", "User Not Found");
return;
};
<snip>
Am I missing something obvious or is this really quite simple?
You could reply a:
181 Call Is Being Forwarded
before the "t_relay":
if (avp_db_load("$ruri/username", "$avp(i:20116)")) {
sl_send_reply("181","Call Is Being
Forwarded");
avp_pushto("$ruri", "$avp(i:20116)");
t_relay;
return;
But AFAIK you are rigth. How you tried it? ;)
- 181 Call Is Being Forwarded
Regards
Cameron
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es