<div>HI Bogdan,</div>
<div> </div>
<div>Thank you for your reply. I did that but i forget to include in this email.</div>
<div> </div>
<p>route[1] {<br> #check for nat flag<br> if (isflagset(2))<br> {<br> fix_nated_contact();<br> use_media_proxy();<br> }</p>
<p> t_on_reply("1");<br> t_on_failure("1");</p>
<p> # send it out now; use stateful forwarding as it works reliably<br> # even for UDP2TCP<br> xlog("L_INFO", "Request leaving server - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<br>
if (!t_relay()) {<br> if(isflagset(2))<br> end_media_session();<br> sl_reply_error();<br> };<br> exit;<br>}<br></p>
<div>The voice mail work fine only when someone call in and the UA is offline (not registered to the openser), if the UA is online, the call will ring the UA until the caller hang up.</div>
<div> </div>
<div>I want to set up some sort of timer, i.e. 60 second and the call will forwarded to the Voice mail.</div>
<div> </div>
<div>Can you suggest me an idea on how i can make this happen please?</div>
<div> </div>
<div>Regards,</div>
<div>Howard</div>
<div><br><br> </div>
<div><span class="gmail_quote">On 5/17/07, <b class="gmail_sendername">Bogdan-Andrei Iancu</b> <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Howard,<br><br>I guess you do not arm the failure route - use t_on_failure("1"); before<br>relaying the request.
<br><br>regards,<br>bogdan<br><br>Howard Tang wrote:<br>> 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>> <<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<br>> the Voice mail server when there is no answer from the UA after 60<br>> 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>> # 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>><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>
><br>> # backup R-URI<br>> avp_write("$ruri", "i:10");<br>> setflag(2);<br>> };<br>><br>> # native SIP destinations are handled using our USRLOC DB
<br>> if (!lookup("location")) {<br>> if(isflagset(2)) {<br>><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> <<a href="http://10.10.10.11:5060">http://10.10.10.11:5060</a>>");<br>> route(1);
<br>> } else {<br>> sl_send_reply("404", "Not Found");<br>><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>> #<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>><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>><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> <<a href="http://10.10.10.11:5060">
http://10.10.10.11:5060</a>>");<br>> route(1);<br>> }<br>><br>> failure_route[1] {<br>> if (t_was_cancelled()) {<br>><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>><br>> rewritehostport("<a href="http://10.10.10.11:5060">10.10.10.11:5060</a> <<a href="http://10.10.10.11:5060">http://10.10.10.11:5060</a>>");<br>> resetflag(2);<br>> route(1);
<br>><br>> }<br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@openser.org">
Users@openser.org</a><br>> <a href="http://openser.org/cgi-bin/mailman/listinfo/users">http://openser.org/cgi-bin/mailman/listinfo/users</a><br>><br><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Howard Tang
<br>ICQ : 259083<br>MSN : <a href="mailto:howard615@hotmail.com">howard615@hotmail.com</a>