[SR-Users] msilo - use case: registered but not reachable

Marc M. proycon at hotmail.com
Fri Nov 1 14:05:42 CET 2013


Hi!
 
I have a simple msilo setup which is working fine:
 
-If the user is registered, the messages are delivered right away
-If the user is not registered, the messages are stored in msilo and got deliverd at the next register
 
Here is the relevant part of the cfg:
 
---------------
if (is_method("MESSAGE"))
        {
         log(1,"-------------------------------------------------------->WE HAVE A NEW MESSAGE\n");
         route(MSILO_MESSAGE);
        }
.
.
.
route[MSILO_MESSAGE]{
if (lookup("location")){
t_relay();
 }else{
  m_store("$ru");
  sl_send_reply("200", "OK");
 
}
 exit;
}
.
.
.
route[REGISTRAR] {
 if (is_method("REGISTER"))
 {
  if(isflagset(FLT_NATS))
  {
   setbflag(FLB_NATB);
   # uncomment next line to do SIP NAT pinging 
   setbflag(FLB_NATSIPPING);
  }
  if (!save("location"))
   sl_reply_error();
   # MSILO - dumping user's offline messages
                        m_dump();
                        exit;
 }
}
-------------------
Thats working fine.
 
Now, we have a use case where a user is registered, but got terminated in between abd not reachable.
So the user is in the userloc table, but not reachable.
In this case ,since the user is still in userloc, the t_relay() will be executed, and it drops a 408 (timeout) code which is fine. However, the process end here. The message is then dropped.
 
What i would like to achieve is to make sure that t_relay() was executed with 200, otherwise store the message and deliver it at the next register.
 
 
I was trying this:
 
 
------------
 
##storing offline messages (new)
route[MSILO_MESSAGE]{
  if (lookup("location")){
   if (!t_relay()) {
    m_store("$ru");
   sl_send_reply("200", "OK");
   }
   exit;
 }
 else{
   m_store("$ru");
  sl_send_reply("200", "OK");
  }
 exit;
}
 
-------- 
 
but i have still the same behaviour.
 
Can you help me, what do I wrong?
 
Many thnaks
 
Marc. M
 
 
 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131101/f55fc846/attachment.html>


More information about the sr-users mailing list