[SR-Users] MSILO: SIP stored offline MESSAGE repetitive delivery
Abdul Basit
basit.engg at gmail.com
Mon Apr 9 16:34:52 CEST 2018
Dear Team,
I have added traces via pasetbin
MESSAGE Stored When B is OffLine https://pastebin.com/NLwMePmf
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
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
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 at 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 at 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 at lists.kamailio.org] *On Behalf
>> Of *Abdul Basit
>> *Sent:* 08 April 2018 18:43
>> *To:* Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>;
>> Kamailio (SER) - Users Mailing List <sr-users at 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 at 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 at 192.168.10.18:9060")
>> modparam("msilo","contact_hdr","Contact: registrar at 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 at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180409/de5cd3ef/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Issue 1-Store and Dlvr when B online.png
Type: image/png
Size: 30652 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180409/de5cd3ef/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Issue 2-IM onine delivery.png
Type: image/png
Size: 38100 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180409/de5cd3ef/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msg Stored with success when B offline.png
Type: image/png
Size: 26934 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180409/de5cd3ef/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msgdelivery.pcap
Type: application/octet-stream
Size: 9403 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180409/de5cd3ef/attachment.obj>
More information about the sr-users
mailing list