Hi, htable can be accessed from failure_route. What you need to account for is the origin of $fU, $si and $sp values used as the key there, because failure_route does not correspond to any particular SIP message. Instead, it is a higher-level abstraction that can be set off by numerous kinds of failures, only some of which are reducible to a negative SIP reply. What you are probably looking for is: https://www.kamailio.org/wikidocs/cookbooks/5.7.x/pseudovariables/#t_rplpv e.g. $sht(mid_reg_token=>$T_rpl($fU)::$T_rpl($si)::$T_rpl($sp)) depending on your exact logic. -- Alex
On May 31, 2023, at 9:49 AM, Yuriy Nasida <ynasida@gmail.com> wrote:
Any advice ?
On Fri, 26 May 2023 at 20:40, Yuriy Nasida <ynasida@gmail.com> wrote: Hello,
https://lists.kamailio.org/pipermail/sr-users/2020-October/110792.html
I read this thread very carefully and I think I managed to implement all the steps described by Daniel. Thank you so much for the detailed description.
But it looks like I'm stuck on the last step. I can't delete records from htable when an incoming call cannot reach the registered device (e.g., no more internet access, power off at the device). I try to do this from failure route but looks like i kamailio has not access to htable from it.
failure_route[INTERNAL_TO_EXTERNAL_FAILURE] { if (t_check_status("408")) { xlog("L_WARN", "$ci|log| hello \n"); xlog("L_WARN", "$ci|log| mid reg token - $sht(mid_reg_token=>$fU::$si::$sp) \n"); } }
I do not see xlog message with mid reg token but i see 'hello'. Yes, htable record exists in case i check using: kamcmd htable.dump mid_reg_token
Also I need a way to remove registration at the registrar (Freeswitch in my case). This means I need to send api request from kamailio or just run some script that will do this. What is the best way ? module exec ?
Please advice, Thanks __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
-- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800