<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
you have to set a failure route for MESSAGE request before relaying
it. In failure route, you can call m_store().<br>
<br>
If you look at current default config file, it has something similar
for INVITE, to send it to voicemail if it is not answered.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 11/1/13 2:05 PM, Marc M. wrote:<br>
</div>
<blockquote cite="mid:DUB119-W38BFBF20FFDAFFAE39AF92B9F50@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi!<br>
<br>
I have a simple msilo setup which is working fine:<br>
<br>
-If the user is registered, the messages are delivered right
away<br>
-If the user is not registered, the messages are stored in msilo
and got deliverd at the next register<br>
<br>
Here is the relevant part of the cfg:<br>
<br>
---------------<br>
if (is_method("MESSAGE"))<br>
{<br>
log(1,"-------------------------------------------------------->WE
HAVE A NEW MESSAGE\n");<br>
route(MSILO_MESSAGE);<br>
}<br>
.<br>
.<br>
.<br>
route[MSILO_MESSAGE]{<br>
if (lookup("location")){<br>
t_relay();<br>
}else{<br>
m_store("$ru");<br>
sl_send_reply("200", "OK");<br>
<br>
}<br>
exit;<br>
}<br>
.<br>
.<br>
.<br>
route[REGISTRAR] {<br>
if (is_method("REGISTER"))<br>
{<br>
if(isflagset(FLT_NATS))<br>
{<br>
setbflag(FLB_NATB);<br>
# uncomment next line to do SIP NAT pinging <br>
setbflag(FLB_NATSIPPING);<br>
}<br>
if (!save("location"))<br>
sl_reply_error();<br>
# MSILO - dumping user's offline messages<br>
m_dump();<br>
exit;<br>
}<br>
}<br>
-------------------<br>
Thats working fine.<br>
<br>
Now, we have a use case where a user is registered, but got
terminated in between abd not reachable.<br>
So the user is in the userloc table, but not reachable.<br>
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.<br>
<br>
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.<br>
<br>
<br>
I was trying this:<br>
<br>
<br>
------------<br>
<br>
##storing offline messages (new)<br>
route[MSILO_MESSAGE]{<br>
if (lookup("location")){<br>
if (!t_relay()) {<br>
m_store("$ru");<br>
sl_send_reply("200", "OK");<br>
}<br>
exit;<br>
}<br>
else{<br>
m_store("$ru");<br>
sl_send_reply("200", "OK");<br>
}<br>
exit;<br>
}<br>
<br>
-------- <br>
<br>
but i have still the same behaviour.<br>
<br>
Can you help me, what do I wrong?<br>
<br>
Many thnaks<br>
<br>
Marc. M<br>
<br>
<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Trainings - Berlin, Nov 25-28
- more details about Kamailio trainings at <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
</body>
</html>