hi all,<br> <br> I am trying to implement offline messages. When a message is sent to a user who is offline the messages are getting stored. but when the user logs in the messages are not getting delivered. i am posting the extract of the opensips.cfg<br>
<br><b>route[2] {^M<br> ^M<br> ## Register request handler^M<br> if (is_uri_host_local()) {^M<br> if (!www_authorize("", "subscriber")) {^M<br> www_challenge("", "1");^M<br>
exit;^M<br> };<br><br> if (!check_to()) {^M<br> sl_send_reply("403", "Forbidden");^M<br> exit;^M<br> };^M<br> if(!search("^Contact:[ ]*\*") && client_nat_test("7")) {^M<br>
log(1,"-------NAT Checking\n");^M<br> setbflag(6);^M<br> fix_nated_contact();^M<br> force_rport();^M<br> };^M<br> save("location");<br>#--------------------------------------------------------- msilo testing--------------------------------------------------------------------<br>
log(1, "REGISTER received -> dumping messages with MSILO------------------- 1\n");<br> #append_hf("Contact: $ct\r\n");<br> # MSILO - dumping user's offline messages<br> xlog("L_INFO","***************************************** Request Body is :---------> $rb\n");<br>
if (m_dump())<br> {<br> log(1, "MSILO: offline messages dumped - if they were----------------------------------- 2\n");<br> }else{<br> log(1, "MSILO: no offline messages dumped\n");<br>
};^M<br> xlog("L_INFO,", "\n Method: [$rm] From-URI: [$fu] To URI [$tu] REply Status is : [$rs] ************************** Reply reason is: [$rr]");<br>#---------------------------------------------------------------------------------------------------------------------------------------------------<br>
exit;^M<br> } else if {^M<br> sl_send_reply("403", "Forbidden");^M<br> };^M<br>}^M</b><br><br>.......<br>.......<b><br><br> if (!lookup("location")) {<br>#----------Storing Offline Messages----------------------------<br>
if (!t_newtran())<br> {<br> sl_reply_error();<br> exit;<br> };<br> # we do not care about anything else but MESSAGEs<br> if (!method=="MESSAGE")<br>
{<br> if (!t_reply("404", "Not found"))<br> {<br> sl_reply_error();<br> };<br> exit;<br> };<br> log(1, "MESSAGE received -> storing using MSILO\n");<br>
# MSILO - storing as offline message<br> if (m_store("$ru"))<br> {<br> log(1, "MSILO: offline message stored\n");<br> log(1,"MSILO: ---------------------------------------> in lookup location------------------------------- 4\n");<br>
if (!t_reply("202", "Accepted"))<br> {<br> sl_reply_error();<br> };<br> }else{<br> log(1, "MSILO: offline message NOT stored\n");<br>
if (!t_reply("503", "Service Unavailable"))<br> {<br> sl_reply_error();<br> };<br> };<br> t_on_failure("3");<br>
# t_relay();^M<br>#-------------Finished, Storing Offline Messages------------------------------------<br>if (does_uri_exist()) {^M<br> ## User not registered at this time.^M<br> ## Use the IP Address of your e-mail server^M<br>
revert_uri();^M<br> prefix("u");^M<br> rewritehostport("192.168.1.149"); #Use the IP address of your voicemail server^M<br> route(6);^M<br> route(1);^M<br>
} else {^M<br> sl_send_reply("404", "Not Found");^M<br> exit;^M<br> } ^M<br> sl_send_reply("404", "Not Found");^M<br> exit;^M<br> };^M<br>
route(6); ^M<br> route(1);^M<br># }<br>}^M</b><br><br clear="all"><br>can anyone tell me where have i gone wrong.<br>-- <br>Thanking You,<br>Ashwini BR Naidu<br>