[Serusers] setflag question
Java Rockx
javarockx at yahoo.com
Wed Sep 29 16:00:58 CEST 2004
Hello All.
I may have stumbled upon the problem. It has to do with not properly handling
CANCEL messages.
In my ser.cfg I have:
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 1)
modparam("acc", "log_fmt", "fisum")
modparam("acc", "report_ack", 1)
modparam("acc", "log_level", 1)
modparam("acc", "failed_transactions", 1)
modparam("acc", "report_cancels", 1)
modparam("acc|auth_db|domain|group|uri_db|usrloc", "db_url",
"mysql://ser:pwd@sipdb01.mycompany.com/ser")
route {
... the usual stuff here
# BUSY and NOANSWER go to voice mail
t_on_failure("1");
# Make sure we handle nathelper stuff
t_on_reply("1");
# Enable accounting for this transaction
setflag(1);
if (!t_relay()) {
sl_reply_error();
};
}
failure_route[1] {
log(1, "Failover to voicemail");
rewritehostport("vm01.mycompany.com:5060");
append_branch();
append_urihf("CC-Diversion: ", "\r\n");
t_relay();
}
onreply_route[1] {
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") {
fix_nated_contact();
force_rtp_proxy();
} else if (nat_uac_test("1")) {
fix_nated_contact();
};
}
I'm thinking that the problem is that a BUSY and CANCEL will both follow the
same logic and execute failure_route[1]. I don't want CANCEL messages to do
this because failure_route[1] is intended for sending BUSY or NOANSWER replies
to the voicemail server.
How can I determine if the negative value returned by t_relay() is caused by a
CANCEL versus a BUSY message?
Regards,
Paul
--- Zeus Ng <zeus.ng at isquare.com.au> wrote:
> Do you have ngrep of the CANCEL call and its' responses?
>
> Zeus
>
> > -----Original Message-----
> > From: serusers-bounces at lists.iptel.org
> > [mailto:serusers-bounces at lists.iptel.org] On Behalf Of Java Rockx
> > Sent: Wednesday, 29 September 2004 12:26 PM
> > To: 'ser users'
> > Subject: RE: [Serusers] setflag question
> >
> >
> > I saw report_cancels in the the acc module documentation, but
> > that records CANCEL messages to the ser/acc table.
> >
> > Isn't there some way to record missed calls to the
> > ser/missed_calls MySQL table so that missed calls appear in
> > the serweb application? Or has this version of serweb to be
> > modified to find CANCEL records in ser/acc rather than
> > looking in the missed_calls table?
> >
> > I'm not really sure which version of serweb I'm using because
> > I checked it out of berlios today using:
> >
> > cvs -z3
> > -d:pserver:anonymous at cvs.serweb.berlios.de:/cvsroot/serweb co iptel
> >
> > Regards,
> > Paul
> >
> > --- Zeus Ng <zeus.ng at isquare.com.au> wrote:
> >
> > > Add this to your config and try again.
> > >
> > > modparam("acc", "report_cancels", 1);
> > >
> > > Zeus
> > >
> > > > -----Original Message-----
> > > > From: serusers-bounces at lists.iptel.org
> > > > [mailto:serusers-bounces at lists.iptel.org] On Behalf Of Java Rockx
> > > > Sent: Wednesday, 29 September 2004 4:09 AM
> > > > To: ser users
> > > > Subject: [Serusers] setflag question
> > > >
> > > >
> > > > Hi All.
> > > >
> > > > I'm trying to get missed call entries to be stored in my
> > > > MySQL database. Calls are being logged to my ser/acc table,
> > > > but the ser/missed_calls table is empty.
> > > >
> > > > I've read the ser admin guide section for Accounting, but
> > > > still have a question.
> > > >
> > > > If I have the following in my ser.cfg
> > > >
> > > > modparam("acc", "db_url", "mysql://ser:mypwd@mycompany.com/ser")
> > > > modparam("acc", "report_ack", 1)
> > > > modparam("acc", "log_level", 1)
> > > > modparam("acc", "failed_transactions", 1)
> > > > modparam("acc", "db_flag", 1)
> > > > modparam("acc", "db_missed_flag", 2)
> > > > modparam("acc", "log_fmt", "fisum")
> > > >
> > > > And in my route plan I have this
> > > >
> > > > setflag(1);
> > > > setflag(2);
> > > >
> > > >
> > > >
> > > >
> > > > if (!t_relay()) {
> > > > sl_reply_error();
> > > > };
> > > >
> > > > Why do I not have records in ser/missed_calls when I call a
> > > > phone and hang up before it answers? Are the setflag() calls
> > > > correct, or does ser do a bitwise AND which means I would be
> > > > calling setflag(3)?
> > > >
> > > > I'm using ser 0.8.99-dev6.
> > > >
> > > > Regards,
> > > > Paul
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Read only the mail you want - Yahoo! Mail SpamGuard.
> > > > http://promotions.yahoo.com/new_mail
> > > >
> > > > _______________________________________________
> > > > Serusers mailing list
> > > > serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
> > > >
> > >
> > >
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> > http://promotions.yahoo.com/new_mail
> >
> > _______________________________________________
> > Serusers mailing list
> > serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
> >
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
More information about the sr-users
mailing list