Hi Team,
My issue for IM handling has been resolved.
@MS helped to look into the matter. From to the example
https://www.kamailio.org/docs/modules/5.1.x/modules/msilo.html#idp45433036
# -- tm params --
modparam("tm", "fr_timer", 10 )
modparam("tm", "fr_inv_timer", 15 )
modparam("tm", "wt_timer", 10 )
I replaced it as below
# -- tm params --
modparam("tm", "fr_timer", 10000 )
modparam("tm", "fr_inv_timer", 15 )
modparam("tm", "wt_timer", 10 )
Lower fr_timer was initiating 408 without waiting for 200 OK from
destination because 10ms is too low. This was confusing msilo module and
the sender device that MESSAGE sent was failed.
Increasing the fr_timer value resolved the issue.
This also resolved a ripple effect. i.e, kamailio delivery of offline
messages from DB store to the destination party.
Since kamailio was get message delivery error, it was
executing failure_route[1] that was storing the message again in DB store
as offline message and so on.
lower fr_timer values are also exits in 3.x, 4.x, 5x and dev branches
documentation.
Correction is required.
--
regards,
abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445
>
> On 9 April 2018 at 19:34, Abdul Basit <basit.engg(a)gmail.com> wrote:
>
>> Dear Team,
>>
>> I have added traces via pasetbin
>>
>> MESSAGE Stored When B is OffLine https://pastebin.com/NLwMePmf
>>
>> [trace screenshot removed]
>>
>> Next this messages should be delivered when B party REGISTER with the
>> server
>>
>> *Issue 1*: Message was delivered to B-party but it didn't remove form DB
>> and as a result MESSAGE deliver to B-party as many times it come line
>> https://pastebin.com/7pb0wCKx
>> [trace screenshot removed]
>>
>> Now next issue is
>> *Issue 2*: Messages deliver to B-party when its already online without
>> storing in DB. B-party receive MESSAGE successfully but A-party gets
>> MESSAGE delivery failed.
>> https://pastebin.com/zgDbK4F6
>>
>> [trace screenshot removed]
>>
>> I intentionally modified the 202 - description for better troubleshooting.
>>
>> See if attachments were received properly through mailing list.
>>
>> For convenience I have attached the pcap as well.
>>
>> MESSAGE: 1: Accepted and Stored as expected
>> MESSAGE: 2: Server delivered Message when B comes online
>> MESSAGE: 3: Both A & B are online. A-party receives MESSAGE delivery
>> failure where as B-party receives MESSAGE successfully
>>
>>
>> Modified default kamailio.cfg is https://pastebin.com/thZig5RC
>> It looks that mingled up the configuration.
>>
>> Please see whats gone wrong here.
>>
>>
>> --
>> regards,
>>
>> abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445
>>
>> On 9 April 2018 at 18:20, Abdul Basit <basit.engg(a)gmail.com> wrote:
>>
>>> Dear team,
>>>
>>> Thank you for your reply.
>>>
>>> @MS & @ Davld, Let me test again and share traces.
>>>
>>> @Zaka, I will check the save() result as you suggested. Location is
>>> being saved and properly looked up because messages are being delivered
>>> (and not stored in DB ) when both parties are online.
>>>
>>> --
>>> regards,
>>>
>>> abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445
>>>
>>> On 9 April 2018 at 16:38, Muhammad Zaka <muhammad.zaka(a)cloudcall.com>
>>> wrote:
>>>
>>>> Please check the return value of save and replace the logic: -
>>>>
>>>>
>>>>
>>>> $var(save_result) = save("location") ;
>>>>
>>>> if ($var(save_result) <= -1) {
>>>>
>>>> xlogl("L_ERROR", "[$rm] -> Unable to save user location \n");
>>>> sl_reply_error();
>>>>
>>>> exit();
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> if ($var(save_result) == 1) {
>>>>
>>>> xlogl("L_INFO", "[$rm] -> dumping messages with MSILO \n");
>>>> # MSILO - dumping user's offline messages to user
>>>> if (m_dump("$fu")) {
>>>> xlogl("L_NOTICE", "MSILO: offline messages for $fu dumped - if
>>>> they were \n");
>>>> }
>>>> else {
>>>> xlogl("L_NOTICE", "MSILO: no offline messages dumped \n");
>>>> };
>>>> }
>>>>
>>>>
>>>>
>>>> This means dump the message only when it is not re-registration.
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> Regards
>>>>
>>>> Muhammad Zaka
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *From:* sr-users [mailto:sr-users-bounces@lists.kamailio.org] *On
>>>> Behalf Of *Abdul Basit
>>>> *Sent:* 08 April 2018 18:43
>>>> *To:* Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>;
>>>> Kamailio (SER) - Users Mailing List <sr-users(a)lists.sip-router.org>
>>>> *Subject:* Re: [SR-Users] MSILO: SIP stored offline MESSAGE repetitive
>>>> delivery
>>>>
>>>>
>>>>
>>>> Dear Team,
>>>>
>>>> Still stuck with the issue. Kindly suggest where i did wrong.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> regards,
>>>>
>>>>
>>>> abdul basit | p: +92 32 1416 4196 | o: +92 30 0841 1445
>>>>
>>>>
>>>>
>>>> On 6 April 2018 at 20:50, Abdul Basit <basit.engg(a)gmail.com> wrote:
>>>>
>>>> Hi team,
>>>>
>>>> I am facing an issue while setting up IM server based on kamailio.
>>>>
>>>> SIP-SIP online messaging is fine. For offline messaging i am using
>>>> msilo module which is storing offline messages in 'silo' table.
>>>>
>>>>
>>>>
>>>> As B-party come online ... it receive offline messages stored in
>>>> database. But
>>>>
>>>> *Problem is*.. these messages will deliver to B-party as many time it
>>>> REGISTER online.
>>>>
>>>>
>>>>
>>>> How can I configure msilo module to mark messages delivery status?
>>>> or how can i delete the delivered messages so that there will be no
>>>> chance of delivering them again on next REGISTER?
>>>>
>>>> Message parts of kamailio.cfg are
>>>> ....
>>>> /* add local domain aliases */
>>>> alias="192.168.10.18"
>>>> port=9060
>>>>
>>>>
>>>> # ----- msilo params -----
>>>> modparam("msilo", "db_url", DBURL)
>>>> modparam("msilo", "db_table", "silo")
>>>> modparam("msilo", "sc_mid", "id")
>>>> modparam("msilo","from_address","sip:registrar@192.168.10.18:9060")
>>>> modparam("msilo","contact_hdr","Contact: registrar@192.168.10.18:9060;m
>>>> silo=yes\r\n")
>>>> modparam("msilo","content_type_hdr","Content-Type: text/plain\r\n")
>>>>
>>>> ........
>>>>
>>>> route[MSILO_MESSAGE] {
>>>> if (!is_method("MESSAGE")) return;
>>>> xlogl("L_NOTICE", "[$rm] r-uri: $ru d-uri: $du \n");
>>>> if (lookup("location")) {
>>>> xlogl("L_NOTICE", "[$rm] -> loaction found. Relying message
>>>> [[$rb]] to the UAC \n");
>>>> t_relay();
>>>> } else {
>>>> if (!t_newtran()) {
>>>> xlogl("L_ERROR", "[$rm] -> ERROR creating new transaction
>>>> \n");
>>>> sl_reply_error();
>>>> exit;
>>>> };
>>>> xlogl("L_NOTICE", "[$rm] -> Storing MSILO_MESSAGE \n
>>>> [$ru]-[$tu]-[$ou] \n ");
>>>> if (m_store("$ru")) {
>>>> xlogl("L_NOTICE", "MSILO: offline message stored! \n");
>>>> if (!t_reply("202", "Accpeted and Strored")) {
>>>> xlogl("L_ERROR", "MSILO: Err sending 202 reply... \n");
>>>> sl_reply_error();
>>>> }
>>>> } else {
>>>> xlogl("L_ERROR", "MSILO: offline message NOT stored... \n");
>>>> if (!t_reply("503", "Service Unavailable")) {
>>>> sl_reply_error();
>>>> }
>>>> }
>>>> }
>>>> exit;
>>>> }
>>>>
>>>> .....
>>>>
>>>> # Handle SIP registrations
>>>> route[REGISTRAR] {
>>>> if (!is_method("REGISTER")) return; // discard all non-REGISTER
>>>> methods
>>>>
>>>> if(isflagset(FLT_NATS)) {
>>>> setbflag(FLB_NATB);
>>>> #!ifdef WITH_NATSIPPING
>>>> setbflag(FLB_NATSIPPING); //# do SIP NAT pinging
>>>> #!endif
>>>> }
>>>> $avp(received) = "sip:" + $si + ":" + $sp + ";transport=" + $proto;
>>>> xlogl("L_INFO", "[$rm] -> UAC actual location $avp(received) \n");
>>>> if (!save("location",0x04)) {
>>>> xlogl("L_ERROR", "[$rm] -> Unable to save user location \n");
>>>> sl_reply_error();
>>>> }
>>>> else {
>>>> xlogl("L_INFO", "[$rm] -> dumping messages with MSILO \n");
>>>> # MSILO - dumping user's offline messages to user
>>>> if (m_dump("$fu")) {
>>>> xlogl("L_NOTICE", "MSILO: offline messages for $fu dumped -
>>>> if they were \n");
>>>> }
>>>> else {
>>>> xlogl("L_NOTICE", "MSILO: no offline messages dumped \n");
>>>> };
>>>> }
>>>> exit;
>>>> }
>>>>
>>>> Any idea?
>>>>
>>>>
>>>> --
>>>> regards,
>>>>
>>>>
>>>> abdul basit
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users(a)lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>
>
Hi,
I want to limit Kamailios accepted methods to REGISTER, INVITE and their
related methods like BYE and CANCEL. How to do this in Kamailio? Is there a
standard way or I should use is_method function?
Regards
Another thought...
Perhaps 'async_task_route()' automatically creates a transaction, which is why I was having problems with the calls to 't_newtran()' and 't_release()' after the route had been changed to execute through 'async_task_route()'.
If so, then maybe it's safe for my async presence route to not call 't_newtran()' and 't_release()'.
Thanks.
Hello.
I have read that the primary use of 't_newtran()' is to handle SIP retransmissions.
Given that, is there any reason to use it when operating over TCP/TLS?
I recently changed a route to operate asynchronously through 'async_task_route()'. When I did, calls to 't_newtran()' started failing.
I'm hoping that I can safely remove all the calls to 't_newtran()' and the matching calls to 't_release()' on this async route, because I am using TLS as the transport.
Does that sound correct?
Thanks.
Hello !
Since I moved my OS to RHEL 7, the logs management has changed. I cannot
have all logs in /var/log/messages as I used to have. Indeed, there is
journald/rsyslog which blocked logs to be written after hundreds/thousands
of messages.
I tried to set these values to 0:
vim /etc/systemd/journald.conf
[Journal]
[.]
RateLimitInterval=0
RateLimitBurst=0
But the problem is still present.
Anyone has already solved this problem?
Regards,
Igor.