On 04/16/2014 07:15 PM, Roberto Fichera wrote:
Hi All,
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?
I was able to solve this issue too, pretty straight I mean, there is the extra_hdrs_avp param which did the trick. BTW, is there a way to send back the notification to the sender that the message has been sent correctly via m_dump(), so to get a 200 about the given m_dump()ed message?
Thanks in advance, Roberto Fichera.
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@test.net") modparam("msilo", "contact_hdr", "Contact: msilo@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users