<div dir="ltr"><div>Dear Team,<br><br></div>Still stuck with the issue. Kindly suggest where i did wrong. <br><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)">--<br>regards,</span></span></font></div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445</span></span></font></div></div>
<br><div class="gmail_quote">On 6 April 2018 at 20:50, Abdul Basit <span dir="ltr"><<a href="mailto:basit.engg@gmail.com" target="_blank">basit.engg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi team,<br><br></div>I am facing an issue while setting up IM server based on kamailio.<br></div><div>SIP-SIP online messaging is fine. For offline messaging i am using msilo module which is storing offline messages in 'silo' table.<br></div><div><div><div><br></div><div>As B-party come online ... it receive offline messages stored in database. But <br></div><div><b>Problem is</b>.. these messages will deliver to B-party as many time it REGISTER online.<br></div><div><br></div><div>How can I configure msilo module to mark messages delivery status? <br>or how can i delete the delivered messages so that there will be no chance of delivering them again on next REGISTER?<br><br></div><div>Message parts of kamailio.cfg are <br>....<br><span style="font-family:monospace,monospace">/* add local domain aliases */<br>alias="192.168.10.18"<br>port=9060<br><br><br># ----- msilo params -----<br>modparam("msilo", "db_url", DBURL)<br>modparam("msilo", "db_table", "silo")<br>modparam("msilo", "sc_mid", "id")<br>modparam("msilo","from_address<wbr>","<a href="http://sip:registrar@192.168.10.18:9060" target="_blank">sip:registrar@192.168.10.<wbr>18:9060</a>")<br>modparam("msilo","contact_hdr"<wbr>,"Contact: <a href="http://registrar@192.168.10.18:9060" target="_blank">registrar@192.168.10.18:9060</a>;m<wbr>silo=yes\r\n")<br>modparam("msilo","content_type<wbr>_hdr","Content-Type: text/plain\r\n")<br><br>........<br><br>route[MSILO_MESSAGE] {<br> if (!is_method("<span style="font-family:monospace,monospace">MESSAGE</span>")) return;<br> xlogl("L_NOTICE", "[$rm] r-uri: $ru d-uri: $du \n");<br> if (lookup("location")) {<br> xlogl("L_NOTICE", "[$rm] -> loaction found. Relying message [[$rb]] to the UAC \n");<br> t_relay();<br> } else {<br> if (!t_newtran()) {<br> xlogl("L_ERROR", "[$rm] -> ERROR creating new transaction \n");<br> sl_reply_error();<br> exit;<br> };<br> xlogl("L_NOTICE", "[$rm] -> Storing MSILO_MESSAGE \n [$ru]-[$tu]-[$ou] \n ");<br> if (m_store("$ru")) {<br> xlogl("L_NOTICE", "MSILO: offline message stored! \n");<br> if (!t_reply("202", "Accpeted and Strored")) {<br> xlogl("L_ERROR", "MSILO: Err sending 202 reply... \n");<br> sl_reply_error();<br> }<br> } else {<br> xlogl("L_ERROR", "MSILO: offline message NOT stored... \n");<br> if (!t_reply("503", "Service Unavailable")) {<br> sl_reply_error();<br> }<br> }<br> }<br> exit;<br>}<br><br>.....<br><br># Handle SIP registrations<br>route[REGISTRAR] {<br> if (!is_method("REGISTER")) return; // discard all non-REGISTER methods<br><br> if(isflagset(FLT_NATS)) {<br> setbflag(FLB_NATB);<br>#!ifdef WITH_NATSIPPING<br> setbflag(FLB_NATSIPPING); //# do SIP NAT pinging<br>#!endif<br> }<br> $avp(received) = "sip:" + $si + ":" + $sp + ";transport=" + $proto;<br> xlogl("L_INFO", "[$rm] -> UAC actual location $avp(received) \n");<br> if (!save("location",0x04)) {<br> xlogl("L_ERROR", "[$rm] -> Unable to save user location \n");<br> sl_reply_error();<br> }<br> else {<br> xlogl("L_INFO", "[$rm] -> dumping messages with MSILO \n");<br> # MSILO - dumping user's offline messages to user<br> if (m_dump("$fu")) {<br> xlogl("L_NOTICE", "MSILO: offline messages for $fu dumped - if they were \n");<br> }<br> else {<br> xlogl("L_NOTICE", "MSILO: no offline messages dumped \n");<br> };<br> }<br> exit;<br>}<br></span><br></div><div>Any idea?<br></div><div><br clear="all"><div><div class="m_-4069150568577490284m_7998149646663262327gmail_signature"><div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)">--<br>regards,</span></span></font></div><font size="2"><span style="font-family:verdana,sans-serif"><span style="color:rgb(39,78,19)"><br>abdul basit<br></span></span></font></div></div>
</div></div></div></div>
</blockquote></div><br></div>