[SR-Users] Kamailio and MSILO with TLS AORs

Roberto Fichera kernel at tekno-soft.it
Wed Apr 16 19:15:13 CEST 2014


On 04/16/2014 06:53 PM, Daniel-Constantin Mierla wrote:
> Hello,

Ciao Daniel,

>
> most likely the messages are looped back, be sure you allow requests from 'myself' without authentication.
>
> You can watch loopback interface with ngrep to see if the messages are sent out.

Yep! Allowing requests from myself solved the problem! Thanks!

Another thing regarding MSILO, I would like to preserve some custom header fields
for both instant message and notification. How can I do it?

Cheers,
Roberto Fichera.

>
> Cheers,
> Daniel
>
> On 16/04/14 18:46, Roberto Fichera wrote:
>> Hi All,
>>
>> I've started to play with  MSILO module on kamailio v4.1.2, but it seems that all the stored
>> messages aren't delivered to the give user even if, looking at the debug log, the given messages
>> are found and queued for shipping. Another info I can add is that all the users are connected in
>> TLS. The relevant conf is below. Doe anyone can suggest a working setup for TLS users?
>>
>> Thanks in advance,
>> Roberto Fichera.
>>
>> # ----- msilo params -----
>> modparam("msilo", "db_url", DBURL)
>> modparam("msilo", "from_address", "sip:$rU at test.net")
>> modparam("msilo", "contact_hdr", "Contact: msilo at test.net:5060;msilo=yes\r\n")
>> modparam("msilo", "content_type_hdr", "Content-Type: text/plain\r\n")
>>
>> # Handle SIP registrations
>> route[REGISTRAR] {
>>          if (is_method("REGISTER"))
>>          {
>>              if(isflagset(FLT_NATS))
>>              {
>>                    setbflag(FLB_NATB);
>>                     # uncomment next line to do SIP NAT pinging
>>                     ## setbflag(FLB_NATSIPPING);
>>             }
>>
>>            # MSILO - dumping user's offline messages
>>           if (m_dump())
>>           {
>>              xlog("MSILO: offline messages dumped - if they were for user $fu\n");
>>           }
>>           else
>>           {
>>             xlog("MSILO: no offline messages dumped\n");
>>           }
>>
>>           exit;
>>      }
>> }
>>
>> and in the route[LOCATION] I've this snippet
>>
>>       xlog( "Checking the destination user $rU exists\n");
>>        if(avp_db_query("select username from subscriber where username='$rU'"))
>>        {
>>            xlog("MESSAGE received $ru -> storing using MSILO user=$rU\n");
>>            if(m_store("$ru"))
>>            {
>>               xlog("MSILO: offline message stored\n");
>>               if (!t_reply("202", "Accepted"))
>>               {
>>                  sl_reply_error();
>>               }
>>            }
>>            else
>>            {
>>               xlog("MSILO: offline message NOT stored\n");
>>               if (!t_reply("503", "Service Unavailable"))
>>               {
>>                  sl_reply_error();
>>               }
>>            }
>>            # if the downstream UA doesn't support MESSAGE requests
>>            # go to failure_route[1]
>>            t_on_failure("1");
>>            exit;
>>        }
>>        else
>>        {
>>            # The destination recipiend doen't exist
>>            xlog( "Unable to store message for $ru because the user doesn't exist" );
>>            if (!t_reply("404", "Not Found"))
>>            {
>>               sl_reply_error();
>>            }
>>            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