<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dear All,<div><br></div><div>Is there any update regarding the a<span style="font-size: 11pt;">forementioned issue</span><span style="font-size: 12pt;">?</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Best regards.</span></div><div><br><div><hr id="stopSpelling">From: a.tseiko@hotmail.com<br>To: apogrebennyk@sipwise.com<br>Date: Thu, 16 May 2013 15:48:46 +0300<br>CC: spce-user@lists.sipwise.com<br>Subject: Re: [Spce-user] SIP "MESSAGE" to offline user<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Dear Andrew,<div><br></div><div><p class="ecxMsoNormal"><span lang="EN-US">Dear Andrew,</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">According to
your recommendations we have inserted the following configuration lines into
file /etc/ngcp-config/templates/etc/kamailio/proxy
“kamailio.cfg.tt2”.</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">Nevertheless
messages cannot be stored in silo db table and though cannot be sent to sub
when he will be back on line.</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">Do we need
something more?</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">loadmodule
"msilo.so"</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">#!ifdef
WITH_MSILO</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo","db_url","mysql://[%
kamailio.proxy.dbrwuser %]:[% kamailio.proxy.dbrwpw %]@[% database.dbhost %]/[%
kamailio.proxy.dbname %]")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo",
"db_table", "silo")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo","from_address","sip:registrar@xxxxxxx.local")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo",
"from_address", "sip:$rU@xxxxxxx.local")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo","contact_hdr","Contact:
<sip:registrar@xx.xx.xx.xx:5062>;msilo=yes\r\n")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo","content_type_hdr","Content-Type:
text/plain\r\n")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("msilo","offline_message","***
User $rU is offline!")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">#!endif</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">modparam("usrloc",
"db_mode", 0) initial value was “1”</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">########################################################################</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">#Store
messages to offline Subs</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">########################################################################</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">route</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">{</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if ( !mf_process_maxfwd_header("10")
)</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> sl_send_reply("483","To
Many Hops");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (uri==myself) {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # for testing purposes, simply okay all
REGISTERs</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (method=="REGISTER")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> save("location");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("REGISTER received ->
dumping messages with MSILO\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # MSILO - dumping user's offline
messages</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (m_dump())</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MSILO: offline
messages dumped - if they were\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> }else{</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MSILO: no offline
messages dumped\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # domestic SIP destinations are handled
using our USRLOC DB</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if(!lookup("location")) </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (! t_newtran())</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> sl_reply_error();</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # we do not care about anything
else but MESSAGEs</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (!method=="MESSAGE")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (!t_reply("404",
"Not found")) </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> sl_reply_error();</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MESSAGE received ->
storing using MSILO\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # MSILO - storing as offline
message</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (m_store("$ru"))</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">
{</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MSILO: offline
message stored\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (!t_reply("202",
"Accepted")) </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> sl_reply_error();</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> }else{</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MSILO: offline
message NOT stored\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (!t_reply("503",
"Service Unavailable")) </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> sl_reply_error();</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # if the downstream UA does not support
MESSAGE requests</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # go to failure_route[1]</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> t_on_failure("1");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> t_relay();</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # forward anything else</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> t_relay();</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">}</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">failure_route[1]
{</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # forwarding failed -- check if the request
was a MESSAGE </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (!method=="MESSAGE")</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> exit;</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log(1,"MSILO:the downstream UA doesn't
support MESSAGEs\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> # we have changed the R-URI with the
contact address, ignore it now</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> if (m_store("$ou"))</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> {</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MSILO: offline message
stored\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> t_reply("202",
"Accepted"); </span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> }else{</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> log("MSILO: offline message NOT
stored\n");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> t_reply("503", "Service
Unavailable");</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> };</span></p>
<p class="ecxMsoNormal"><span lang="EN-US">}</span></p>
<p class="ecxMsoNormal"><span lang="EN-US"> </span></p>
<p class="ecxMsoNormal"><span lang="EN-US">Best regards.</span></p><br><div>> Date: Wed, 15 May 2013 16:42:41 +0200<br>> From: apogrebennyk@sipwise.com<br>> To: a.tseiko@hotmail.com<br>> CC: spce-user@lists.sipwise.com<br>> Subject: Re: [Spce-user] SIP "MESSAGE" to offline user<br>> <br>> Hi,<br>> You need msilo module - it should be pretty straightforward to add it to<br>> kamailio config: http://kamailio.org/docs/modules/3.3.x/modules_k/msilo.html<br>> <br>> BR,<br>> Andrew<br>> <br>> On 05/15/2013 04:32 PM, andreas tseiko wrote:<br>> > Dear All,<br>> > <br>> > When we send a instant message to a subcriber that is currently offline<br>> > the message sending is unsuccessful.<br>> > Is it possible this message to be stored and retrasmitted when this<br>> > subscriber will be again on-line?<br>> > If not, is there any other workaround?<br>> > <br>> > Best regards.<br>> > <br></div></div> </div>
<br>_______________________________________________
Spce-user mailing list
Spce-user@lists.sipwise.com
http://lists.sipwise.com/listinfo/spce-user</div></div> </div></body>
</html>