[Asterisk-Users] Error forwarding calls to Voicemail from SER

Rafael J. Risco G.V. rafael.risco at gmail.com
Mon Nov 8 09:58:36 MST 2004


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");
}



Asterisk Voicemail server sip debug:
_______________________->>
*CLI> 

Sip read: 
INVITE sip:6609990 at 200.110.2.132:5060 SIP/2.0
Record-Route: <sip:200.110.2.131;ftag=bb0036aea4;lr=on>
Via: SIP/2.0/UDP 200.110.2.131;branch=z9hG4bKe24b.b9e800b5.1
Via: SIP/2.0/UDP 10.0.1.27:5060;rport=5060;branch=z9hG4bKbb0036aea4125
From: <sip:6603000 at call.millicom.com.pe>;tag=bb0036aea4
To: <sip:6609990 at call.millicom.com.pe>
Call-ID: bb9af400-6417-3677-81ae-0002a40055b2 at 10.0.1.27
CSeq: 125 INVITE
Supported: timer, replaces
Min-SE: 1800
Date: Sun, 05 Jul 1970 12:53:15 GMT
User-Agent: AddPac SIP Gateway
Contact: <sip:6603000 at 10.0.1.27:5060>
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 285
Max-Forwards: 16
P-hint: usrloc applied


---------- Forwarded message ----------
From: Rafael J. Risco G.V. <rafael.risco at gmail.com>
Date: Fri, 5 Nov 2004 14:53:29 -0500
Subject: Voicemail: Strange behavior if caller-user cancels the call
To: serusers at iptel.org, sems at iptel.org


Hi
I need to solve this problem I´ve reported several times:
please take a look into this report:
http://mail.iptel.org/pipermail/serusers/2004-August/010930.html

...If the called-user belongs to the voicemail group and the
caller-user cancels the call I see irregular behavior in both SER
instances and No "Sip-Response-Code=487" is recorded in radius acc
(just an start record without stop)... same problem if I use Asterisk
as a voicemail system, please send me some advice.

thank you
Rafael

--

rrgv


-- 

rrgv



More information about the asterisk-users mailing list