[SR-Users] Problems with MSILO module can't receive messages with m_dump.

Stoyan Mihaylov stoyan.v.mihaylov at gmail.com
Mon Feb 4 16:06:22 CET 2013


I had same problem long time ago. When I found enough time, I solved
it adding in
route[AUTH]{
..............
		if (from_uri==myself)
		{
+			if((is_method("MESSAGE"))){
+				if (is_domain_local("$si")) {
+					return;
+				}
+			}
............
}
Also, I think sources of m_dump have potential problem - as a matter
of fact, I got crashes, after solution, which I solved adding next
modification of msilio.c
diff --git a/modules/msilo/msilo.c b/modules/msilo/msilo.c
index 209b309..4bda8fa 100644
--- a/modules/msilo/msilo.c
+++ b/modules/msilo/msilo.c
@@ -1125,8 +1125,16 @@ static int m_dump(struct sip_msg* msg, str* owner_s)
                        memcpy(tmp_extra_hdrs.s, extra_hdrs_str.s,
extra_hdrs_str.len);
                        memcpy(tmp_extra_hdrs.s+extra_hdrs_str.len,
str_vals[4].s, str_vals[4].len);
                } else {
-                       tmp_extra_hdrs.len = 0;
-                       tmp_extra_hdrs.s = "";
+                       tmp_extra_hdrs.len = 0;
+                       if ((tmp_extra_hdrs.s = pkg_malloc(1)) == NULL)
+                       {
+                               LM_ERR("Out of pkg memory");
+                               if (msilo_dbf.free_result(db_con, db_res) < 0)
+                                       LM_ERR("failed to free the
query result\n");
+                               msg_list_set_flag(ml, mid, MS_MSG_ERRO);
+                               goto error;
+                       }
+                       tmp_extra_hdrs.s[0]='\x0';
                }
                hdr_str.len = 1024;
                if(m_build_headers(&hdr_str, str_vals[3] /*ctype*/,


On Mon, Feb 4, 2013 at 10:01 AM, Nord7 <nordseven at gmail.com> wrote:
> Hello i have two problems with module MSILO and  text messages from SIP
> client BRIA.
>
> 1. I can't send messages with m_dump.
> I have installed Kamailio 3.3 in default configuration. I'm added
> "m_dump("$fu")" to my config in route[REGISTRAR]. If i use client CSipSimple
> for sending messages to offline user "333".  i'm
>  receive notification message "*** User 333 offline!". Next i connect to
> Kamailio with user "333" and i see in kamailio log what "m_dumt" trying to
> send messages but can't because "request authorisation". How to disable
> authorisation request, without leak security.
>
> 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();
>
>                 if (m_dump("$fu"))
>                   {
>                   log("MSILO: offline messages dumped - if they were\n");
>                   }
>                   else
>                     {
>                     log("MSILO: no offline messages dumped\n");
>                     }
>                 exit;
>         }
> }
>
>
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>



More information about the sr-users mailing list