[SR-Users] How to detect and Hangup a call on network lost at Caller or Callee?

Hamid Hashmi hamid2kviii at hotmail.com
Fri Aug 31 07:49:19 CEST 2018


Sergiu

Thank you. It worked for me. I set the params as below

#-------------- Dialog params ----------------
modparam("dialog", "timeout_avp", "$avp(i:10)")
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "dlg_flag", 5)
modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 1)
modparam("dialog", "ka_timer", 10)
modparam("dialog", "ka_interval", 30)
modparam("dialog", "send_bye", 1)
modparam("dialog", "timer_procs", 1)
#--------------- SST params
modparam("sst", "sst_flag", 6)
modparam("sst", "timeout_avp", "$avp(i:10)")
modparam("sst", "min_se", 90)

and use dialog funtions in request_route

dlg_manage();
dlg_set_property("ka-src");
dlg_set_property("ka-dst");
dlg_set_property("timeout-noreset");

and below is the call scenario.

[cid:f99c816a-c84a-427a-a137-ec5d086476b8]


Regards


Hamid R. Hashmi

______________________________

www.hrhashmi.blogspot.com<http://www.trgworld.com/pakistan>

Mobile: +92 300 968 22 85 ; +92 322 636 32 66
Email: hamid.hashmi006 at gmail.com<mailto:hamidraza.hashmi at trgworld.com>; hamid2kviii at hotmail.com

Sype:  hamidrhashmi

________________________________
From: sr-users <sr-users-bounces at lists.kamailio.org> on behalf of Sergiu Pojoga <pojogas at gmail.com>
Sent: Thursday, August 30, 2018 6:32 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] How to detect and Hangup a call on network lost at Caller or Callee?

Joel,

I'm not all too sure about the ka_timer, but it must be more or less how you described it. In my observation below, when caller disappears from the network, Kamailio sends 10 OPTIONS requests followed by 10 BYE if no reply received, which is probably the value of ka_timer.

[image.png]

On Wed, Aug 29, 2018 at 2:58 PM Joel Serrano <joel at textplus.com<mailto:joel at textplus.com>> wrote:
I'm confused with these:

modparam("dialog", "ka_timer", 10)
modparam("dialog", "ka_interval", 300)

Would this be more or less correct:

ka_timer = "run the keep-alive timer every Xs"
ka_interval = "send options keep-alive packets every Xs"

But.. how are they related?

I think it's:

- The ka_timer is what sends the OPTIONS but they will only be sent every ka_interval to endpoints? So in the 10s example, the timer is run every 10s, it checks if ka_interval has passed since last OPTIONS was sent to endpoint, and acts accordingly... This means that the combinations of ka_timer=10 with ka_interval=300 would send OPTIONS ever 300-309s right?

Does this make sense?

Thanks,
Joel.



On Wed, Aug 29, 2018 at 10:20 AM, Alex Balashov <abalashov at evaristesys.com<mailto:abalashov at evaristesys.com>> wrote:
On Wed, Aug 29, 2018 at 01:18:24PM -0400, Sergiu Pojoga wrote:

> Hi Joel,
>
> I personally use the values from examples:
>
> modparam("dialog", "ka_timer", 10)
> modparam("dialog", "ka_interval", 300)
> modparam("dialog", "send_bye", 1)

That's more or less how I roll, too.

--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto: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/20180831/da4d70f2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 49958 bytes
Desc: image.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180831/da4d70f2/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 76482 bytes
Desc: image.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180831/da4d70f2/attachment-0001.png>


More information about the sr-users mailing list