I got my hardcoded forwarding working, so I thought I'd
createa table and make it real. I created a new table, called
onbusy, that is exactly like 'aliases'. I then modified serctl
to support it, and inserted a forwardint record.
Then, in my code, I added:
#
# forward to location
#
route[2]
{
log(1,"IN ROUTE2");
if(method=="INVITE" | method=="BYE" |
method=="PRACK")
{
log(1,"TRACE: addRecordRoute()");
setflag(1);
setflag(2);
addRecordRoute();
};
t_on_negative("2");
if(!t_relay())
{
sl_reply_error();
break;
};
}
reply_route[2]
{
log(1,"REPLY_ROUTE:");
revert_uri();
#
# check to see if there is a number to forward to
#
if (!lookup("onbusy"))
{
t_reply_unsafe("487", "Busy Here?");
break;
};
append_branch();
t_on_negative("2");
}
However, it doesn't work...I get...
Jun 7 10:22:28 rave ser[752]: ERROR: reply cannot be parsed
Jun 7 10:22:28 rave ser[752]: on_negative_reply: Error in do_action
Any ideas???
---greg