Hello,
you can find some example KEMI configuration in the “misc/examples” directory, and probably also linked in the KEMI tutorials.
This should give you some hints.
Cheers,
Henning
From: mohsen khashei <mkhashei@gmail.com>
Sent: Friday, February 10, 2023 2:43 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] kemi equivalent config
Hi all I have some existing kamailio config and I want to migrate to KEMI framework.
I want to know what is the equivalent of this config in kemi JavaScript code:
$avp(s:contact) = $hdr(Contact);
$avp(s:contact_fix) = $hdr(Contact);
avp_subst("$avp(s:contact_fix)", "/@([0-9]+).([0-9]+).([0-9]+).([0-9]+)/@$sel(cfg_get.kamailio.ss_ip)/gi");
remove_hf("Contact");
append_hf("Contact: $avp(s:contact_fix)\r\n");
t_on_reply("REG_FIX");
thanks for your attention.
Sent from
Mail for Windows