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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users