[SR-Users] IMS: maybe a bug in S-CSCF: should we create an issue?

Valentin Christoph Christoph.Valentin at kapsch.net
Mon Feb 19 13:56:18 CET 2018


Hi all,

We are using kamailio 5.1.0 as S-CSCF as follows:

We have two machines and two kamailio instances, one on each machine, both working on the same database (together they build one highly available S-CSCF).

After registering a user via the first kamailio instance, then the first instance is stopped (simulating an outage), and the HSS sends an RTR to the second instance.

However, the second instance does not find the registered user in its cache and it does not access the database --> the deregistration fails.

Configuration:
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "enable_debug_file", 0)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "matching_mode", 0)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "db_url", DB_URL)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "db_mode", 2)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "timer_interval", 10)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "timer_procs", 4)

Does anyone immediately "see" a mis-configuration, or should we create an issue?

Details in the mail below.

Thanks,
Christoph


From: Friedrich Peter
Sent: Friday, February 16, 2018 6:38 PM
To: Valentin Christoph <Christoph.Valentin at kapsch.net>
Cc: Onic Roman <Roman.Onic at kapsch.net>; Habashizadeh Mahmoud <Mahmoud.Habashizadeh at kapsch.net>
Subject: AW: Kein RTR Message nachdem SCSCF-1 outage

Hello,

following scenario at REGISTER of catt subscriber:  start with empty db and empty usrloc cache

node1(.23):
MariaDB [scscf]> select * from impu;
Empty set (0.00 sec)

[root at vict-ims ~]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
[root at vict-ims ~]#


[root at vict-ims2 etc]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
[root at vict-ims2 etc]#


After catt REGISTER:    catt_subscriber visible in DB and usrloc cache of .23 but missing in usrloc cache of .24


MariaDB [scscf]> select * from impu;
+-----+---------------------------------+---------+-----------+------+------+------+------+----------------------------------------------------------------------------------------------------------------------+
| id  | impu                            | barring | reg_state | ccf1 | ccf2 | ecf1 | ecf2 | ims_subscription_data                                                                                                |
+-----+---------------------------------+---------+-----------+------+------+------+------+----------------------------------------------------------------------------------------------------------------------+
| 196 | sip:catt178 at vict-ims.net        |       0 |         1 | NULL | NULL | NULL | NULL |  catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>    sip:catt178 at vict-ims.net  sip:+4350255872178 at vict-ims.net  tel:+4350255872178         |
| 197 | sip:+4350255872178 at vict-ims.net |       0 |         1 | NULL | NULL | NULL | NULL |  catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>    sip:catt178 at vict-ims.net  sip:+4350255872178 at vict-ims.net  tel:+4350255872178         |
| 198 | tel:+4350255872178              |       0 |         1 | NULL | NULL | NULL | NULL |  catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>    sip:catt178 at vict-ims.net  sip:+4350255872178 at vict-ims.net  tel:+4350255872178         |
+-----+---------------------------------+---------+-----------+------+------+------+------+----------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

MariaDB [scscf]>



[root at vict-ims ~]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
{
        impu: sip:catt178 at vict-ims.net
        state: registered
        barring: 0
        ccf1:
        ccf2:
        ecf1:
        ecf2:
        subscription: {
                impi: catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>
                service profiles: {
                        1: {
                                impus: {
                                        1: sip:catt178 at vict-ims.net
                                        2: sip:+4350255872178 at vict-ims.net
                                        3: tel:+4350255872178
                                }
                        }
                }
        }
        contacts: {
                sip:catt178 at 193.154.113.40:5060;transport=UDP;rinstance=317-catt178: {
                        expires: 3542
                        client: n/a
                }
        }
}
[root at vict-ims ~]#


[root at vict-ims2 etc]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
[root at vict-ims2 etc]#



After kamctl stop + kamctl start of .24 catt_subscriber is visible in usrloc cache of (.24):  preload_data loads data from db at module init

[root at vict-ims2 ~]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
{
        impu: sip:catt178 at vict-ims.net
        state: registered
        barring: 0
        ccf1:
        ccf2:
        ecf1:
        ecf2:
        subscription: {
                impi: catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>
                service profiles: {
                        1: {
                                impus: {
                                        1: sip:catt178 at vict-ims.net
                                        2: sip:+4350255872178 at vict-ims.net
                                        3: tel:+4350255872178
                                }
                        }
                }
        }
        contacts: {
                sip:catt178 at 193.154.113.40:5060;transport=UDP;rinstance=317-catt178: {
                        expires: 2949
                        client: n/a
                }
        }
}
[root at vict-ims2 ~]#


Now deregister catt_subscriber from HSS1:   catt_subscriber disappears from db and usrloc cache of (.23) but persists on (.24) as registered in usrloc cache

HSS >hss.deregister_subscriber catt178 at vict-ims.net<mailto:catt178 at vict-ims.net> 0


[root at vict-ims ~]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
[root at vict-ims ~]#


MariaDB [scscf]> select * from impu;
Empty set (0.00 sec)

MariaDB [scscf]>


[root at vict-ims2 ~]# kamctl kamcmd ulscscf.showimpu sip:catt178 at vict-ims.net
{
        impu: sip:catt178 at vict-ims.net
        state: registered
        barring: 0
        ccf1:
        ccf2:
        ecf1:
        ecf2:
        subscription: {
                impi: catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>
                service profiles: {
                        1: {
                                impus: {
                                        1: sip:catt178 at vict-ims.net
                                        2: sip:+4350255872178 at vict-ims.net
                                        3: tel:+4350255872178
                                }
                        }
                }
        }
        contacts: {
                sip:catt178 at 193.154.113.40:5060;transport=UDP;rinstance=317-catt178: {
                        expires: 2571
                        client: n/a
                }
        }
}
[root at vict-ims2 ~]#



Scenario of RTR from HSS after REGISTER of catt_subscriber at (.23) and  outage of (.23):
subscr. visible in db but not visible in usrloc cache of .24
HSS sends diameter RTR message to (.24) and deregister callback in (.24) searches in usrloc cache and does not find catt_subscriber and fails.

MariaDB [scscf]> select * from impu;
+-----+---------------------------------+---------+-----------+------+------+------+------+----------------------------------------------------------------------------------------------------------------------+
| id  | impu                            | barring | reg_state | ccf1 | ccf2 | ecf1 | ecf2 | ims_subscription_data                                                                                                |
+-----+---------------------------------+---------+-----------+------+------+------+------+----------------------------------------------------------------------------------------------------------------------+
| 196 | sip:catt178 at vict-ims.net        |       0 |         1 | NULL | NULL | NULL | NULL |  catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>    sip:catt178 at vict-ims.net  sip:+4350255872178 at vict-ims.net  tel:+4350255872178         |
| 197 | sip:+4350255872178 at vict-ims.net |       0 |         1 | NULL | NULL | NULL | NULL |  catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>    sip:catt178 at vict-ims.net  sip:+4350255872178 at vict-ims.net  tel:+4350255872178         |
| 198 | tel:+4350255872178              |       0 |         1 | NULL | NULL | NULL | NULL |  catt178 at vict-ims.net<mailto:catt178 at vict-ims.net>    sip:catt178 at vict-ims.net  sip:+4350255872178 at vict-ims.net  tel:+4350255872178         |
+-----+---------------------------------+---------+-----------+------+------+------+------+----------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)


Cfg file of (.24):
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "enable_debug_file", 0)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "matching_mode", 0)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "db_url", "cluster://cluster1")
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "db_url", DB_URL)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "db_mode", 2)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "timer_interval", 10)
kamailio-scscf/kamailio-scscf-modules.cfg:modparam("ims_usrloc_scscf", "timer_procs", 4)

lg
P



The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof, and is kindly asked to notify the sender and delete the e-mail immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180219/298fc8ed/attachment.html>


More information about the sr-users mailing list