Girish
I have just followed your advise and it works perfect now, ser
accounting module reports "Sip-Response-Code=487" and no "invite"
goes
to asterisk again, ...thank you very much for your invaluable help .
Rafael
On Wed, 10 Nov 2004 04:58:15 -0800 (PST), Girish <gr_sh2003(a)yahoo.com> wrote:
Rafael,
As i said in my previous mail, it just was a guess. Can you try modifying your route[1]
something
like this. I think this will send only the unanswered calls to voicemail. All other 4**
status
will be ignored. I havent tested it though.
Also, you were right. It is route[1], not route[4].
route[1] {
if (t_check_status("408")){
revert_uri();
rewritehostport("200.110.2.132:5060");
append_branch();
t_relay ();
break;
}
}
Good Luck,
--- "Rafael J. Risco G.V." <rafael.risco(a)gmail.com> wrote:
hello Girish
I did some test using t_check_status ("487") in failure_route[1] like this:
failure_route[1] {
if (t_check_status("487")){
revert_uri ();
rewritehostport ("200.110.2.132:5060");
append_branch();
t_relay_to_udp("200.110.2.132", "5060");
}
...but did not work, can you send us more details about how to use
t_check_status("487") in route[4]?
thanks
rafael
On Tue, 9 Nov 2004 02:25:26 -0800 (PST), Girish <gr_sh2003(a)yahoo.com> wrote:
> Hello,
>
> Just a guess.. Can you add t_check_status (487) in your route[4] and see if the
INVITE goes to
> Asterisk after cancelling?
>
>
>
> --- "Rafael J. Risco G.V." <rafael.risco(a)gmail.com> wrote:
>
> > Hello
> > I have to insist in this issue since I´ve done several test using Sems
> > and asterisk with very simple configuration files including the
> > original example from ser-cvs... in brief: if I call to a user who
> > belongs to voicemail group and I cancel the call before VM forward
> > routine begin then an "invite" is sent to a voicemail server
> > generating and sending a file with No audio, and I cant account this
> > call with "Sip-Response-Code=487" (just an start record without
> > stop)...
> >
> > does someone know how to solve this problem????
> >
> > thanks in advance
> >
> > Rafael
> >
> > PS:
> > ser.cfg and asterisk debug for this test:
> >
> > #
> > # SER SIMPLE CFG for VM without acc...
> > # ----------- global configuration parameters ------------------------
> >
> > #debug=3 # debug level (cmd line: -dddddddddd)
> > #fork=yes
> > #log_stderror=no # (cmd line: -E)
> >
> > #/* Uncomment these lines to enter debugging mode
> > debug=9
> > fork=yes
> > log_stderror=yes
> > #*/
> >
> > listen=127.0.0.1
> > port=5060
> >
> > # simple proxy script for forwarding to voicemail server
> > # for unavailable users
> > #
> >
> > loadmodule "/usr/local/lib/ser/modules/sl.so"
> > loadmodule "/usr/local/lib/ser/modules/tm.so"
> > loadmodule "/usr/local/lib/ser/modules/rr.so"
> > loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> > loadmodule "/usr/local/lib/ser/modules/mysql.so"
> > loadmodule "/usr/local/lib/ser/modules/group.so"
> > loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> > loadmodule "/usr/local/lib/ser/modules/registrar.so"
> >
> > # time to give up on ringing -- global timer, applies to
> > # all transactions
> > modparam("tm", "fr_inv_timer", 90)
> >
> > # database with user group membership
> > modparam("group", "db_url",
"mysql://ser:heslo@localhost/ser")
> >
> >
> > # --------------------- request routing logic -------------------
> > route {
> >
> > if (!mf_process_maxfwd_header("10")) {
> > log("LOG: Too many hops\n");
> > sl_send_reply("483", "Alas Too Many
Hops");
> > break;
> > };
> >
> > if (!(method=="REGISTER")) record_route();
> > if (loose_route()) {
> > t_relay();
> > break;
> > };
> >
> > if (!uri==myself) {
> > t_relay();
> > break;
> > };
> >
> > if (method == "REGISTER") {
> > if (!save("location")) {
> > sl_reply_error();
> > };
> > break;
> > };
> >
> > # does the user wish redirection on no availability? (i.e., is he
> > # in the voicemail group?) -- determine it now and store it in
> > # flag 4, before we rewrite the flag using UsrLoc
> > if (is_user_in("Request-URI", "voicemail")) {
> > setflag(4);
> > };
> >
> > # native SIP destinations are handled using our USRLOC DB
> > if (!lookup("location")) {
> > # handle user which was not found
> > route(4);
> > break;
> > };
> >
> > # if user is on-line and is in voicemail group, enable redirection
> > if (method == "INVITE" && isflagset(4)) {
> > t_on_failure("1");
> > };
> > t_relay();
> > }
> >
> > # ------------- handling of unavailable user ------------------
> > route[4] {
> >
> > # non-Voip -- just send "off-line"
> > if (!(method == "INVITE" || method == "ACK" ||
method == "CANCEL")) {
> > sl_send_reply("404", "Not Found");
> > break;
> > };
> >
> > # not voicemail subscriber
> > if (!isflagset(4)) {
> > sl_send_reply("404", "Not Found and no voicemail
turned on");
> > break;
> > };
> >
> > # forward to voicemail now
> > rewritehostport("200.110.2.132:5060");
> > t_relay_to_udp("200.110.2.132", "5060");
> > }
> >
> > # if forwarding downstream did not succeed, try voicemail running
> > # at 200.110.2.132:5060
> >
> > failure_route[1] {
> > revert_uri();
> > rewritehostport("200.110.2.132:5060");
> > append_branch();
> > t_relay_to_udp("200.110.2.132", "5060");
> > }
> >
> >
=====
Girish Gopinath <gr_sh2003(a)yahoo.com>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com