<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'><div><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"><span style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;">Dear All,</span><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;">We would like to store SIP text Messages when the destination Subscriber is Offline.</div><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;">We have insert into kamailio cfg file the configuration lines below.</div><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;">Unfortunately storing messages is unsuccessful.</div><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;">Any ideas of what missing or what could be wrong?</div><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; line-height: normal;">Best regards.</div><div><br></div><div>************************************************************************************************************</div></span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">loadmodule "msilo.so"</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">#!ifdef WITH_MSILO</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><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" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">modparam("msilo", "db_table", "silo")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">modparam("msilo","from_address","sip:registrar@xxxxxxx.local")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">modparam("msilo", "from_address", "sip:$rU@xxxxxxx.local")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><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" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">modparam("msilo","content_type_hdr","Content-Type: text/plain\r\n")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">modparam("msilo","offline_message","*** User $rU is offline!")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">#!endif</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">modparam("usrloc", "db_mode", 0) initial value was “1”</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">########################################################################</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">#Store messages to offline Subs</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">########################################################################</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">route</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">{</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    if ( !mf_process_maxfwd_header("10") )</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        sl_send_reply("483","To Many Hops");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    if (uri==myself) {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        # for testing purposes, simply okay all REGISTERs</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        if (method=="REGISTER")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            save("location");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            log("REGISTER received -> dumping messages with MSILO\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            # MSILO - dumping user's offline messages</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            if (m_dump())</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                log("MSILO: offline messages dumped - if they were\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            }else{</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                log("MSILO: no offline messages dumped\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        # domestic SIP destinations are handled using our USRLOC DB</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">       </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        if(!lookup("location"))</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            if (! t_newtran())</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                sl_reply_error();</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            # we do not care about anything else but MESSAGEs</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            if (!method=="MESSAGE")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                if (!t_reply("404", "Not found"))</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                    sl_reply_error();</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            log("MESSAGE received -> storing using MSILO\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            # MSILO - storing as offline message</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            if (m_store("$ru"))</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                log("MSILO: offline message stored\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                if (!t_reply("202", "Accepted"))</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                    sl_reply_error();</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            }else{</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                log("MSILO: offline message NOT stored\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                if (!t_reply("503", "Service Unavailable"))</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                    sl_reply_error();</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">                };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">            exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        # if the downstream UA does not support MESSAGE requests</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        # go to failure_route[1]</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        t_on_failure("1");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        t_relay();</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    # forward anything else</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    t_relay();</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">}</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">failure_route[1] {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    # forwarding failed -- check if the request was a MESSAGE</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    if (!method=="MESSAGE")</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        exit;</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">   </span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    log(1,"MSILO:the downstream UA doesn't support MESSAGEs\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    # we have changed the R-URI with the contact address, ignore it now</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    if (m_store("$ou"))</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    {</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        log("MSILO: offline message stored\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        t_reply("202", "Accepted");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    }else{</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        log("MSILO: offline message NOT stored\n");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">        t_reply("503", "Service Unavailable");</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">    };</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">}</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US">***********************************************************************************************</span></p><p class="ecxMsoNormal" style="line-height: 21px; margin-bottom: 1.35em; color: rgb(68, 68, 68); font-size: 15px;"><span lang="EN-US"> </span></p></div>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr"><div><br></div></div>
                                          </div></body>
</html>