Hi All,<br><br>I have followed a tutorial and set up Asterisk as a voice mail server. <br><br><a href="http://www.voip-info.org/wiki/view/Realtime+Integration+Of+Asterisk+With+OpenSER">http://www.voip-info.org/wiki/view/Realtime+Integration+Of+Asterisk+With+OpenSER
</a><br><br>It works fine when the UA is offline. Now, I want a call forwarded to the Voice mail server when there is no answer from the UA after 60 seconds(UA is registered on the openser).<br><br>What should I do? Below is my config (copy from the above link).
<br><br><br><pre>                # requests for Media server<br>                if(is_method("INVITE") && !has_totag() && uri=~"sip:\*9") {<br>                        route(3);<br>                        exit;<br>                }<br><br>                # mark transaction if user is in voicemail group
<br>                if(is_method("INVITE") && !has_totag()<br>                        && is_user_in("Request-URI","voicemail"))<br>                {<br>                        xdbg("user [$ru] has voicemail redirection enabled\n");<br>
                        # backup R-URI<br>                        avp_write("$ruri", "i:10");<br>                        setflag(2);<br>                };</pre><br><pre>                # native SIP destinations are handled using our USRLOC DB<br>                if (!lookup("location")) {<br>                        if(isflagset(2)) {
<br>                                # route to Asterisk Media Server<br>                                prefix("1");<br>                                rewritehostport("<a href="http://10.10.10.11:5060">10.10.10.11:5060</a>");<br>                                route(1);<br>                        } else {<br>                                sl_send_reply("404", "Not Found");
<br>                                exit;<br>                        }<br>                };<br><br># voicemail access<br># - *98 - listen caller's voice messages, being prompted for pin<br># - *981 - listen voice messages, being promted for mailbox and pin<br># - *98XXXX - leave voice message to XXXX
<br>#<br>route[3] {<br>         # direct voicemail<br>        if (uri =~ "sip:\*98@" ) {<br>         rewriteuser("1");<br>                xdbg("voicemail access\n");<br>        } else if (uri =~ "sip:\*981@" ) {<br>
                strip(4);<br>                rewriteuser("11");<br>        } else if (uri =~ "sip:\*98.+@" ) {<br>                 strip(3);<br>                prefix("1");<br>        } else {<br>                xlog("unknown media extension $rU\n");<br>                sl_send_reply("404", "Unknown media service");
<br>                exit;<br>        }<br><br>        # route to Asterisk Media Server<br>        rewritehostport("<a href="http://10.10.10.11:5060">10.10.10.11:5060</a>");<br>        route(1);<br>}<br><br>failure_route[1] {<br>        if (t_was_cancelled()) {
<br>                xdbg("transaction was cancelled by UAC\n");<br>                return;<br>        }<br>        # restore initial uri<br>        avp_pushto("$ruri", "i:10");<br>        prefix("1");<br>        # route to Asterisk Media Server
<br>        rewritehostport("<a href="http://10.10.10.11:5060">10.10.10.11:5060</a>");<br>        resetflag(2);<br>        route(1);<br><br>}<br></pre><br>