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

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 1 15:31:54 CET 2013


Hello,

you have to set a failure route for MESSAGE request before relaying it. 
In failure route, you can call m_store().

If you look at current default config file, it has something similar for 
INVITE, to send it to voicemail if it is not answered.

Cheers,
Daniel

On 11/1/13 2:05 PM, Marc M. wrote:
> 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
>
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Nov 25-28
   - more details about Kamailio trainings at http://www.asipto.com -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131101/65738b79/attachment.html>


More information about the sr-users mailing list