[SR-Users] Accessing Transformations in KEMI

Ben Kaufman bkaufman at nexvortex.com
Wed Jul 28 17:36:55 CEST 2021


I get that, and in the general scope of things it's hard to argue against leveraging what should be a more feature rich language.  With that said, the desire to leverage transformations is:

1. To be able to quickly convert existing Kamailio scripts to KEMI.   Long term it's certainly best to evaluate line-by-line what to change, but the more that an existing config can simply 'drop in' to Kamailio, the easier this move could be facilitated.
2. Some of this comes to re-inventing the wheel.  A cursory look for python modules doesn't yield any results that I find as lightweight (twisted seems heavy for this purpose), simple, and battle tested as Kamailio's transformations for this specific purpose of parsing a tobody/nameaddr SIP header.  



-----Original Message-----
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Alex Balashov
Sent: Wednesday, July 28, 2021 10:05 AM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Accessing Transformations in KEMI

By way of further answer:

Kamailio’s transformations exist in order to provide some semblance of string utility & parsing functions to a custom, from-ground-up programming language that wouldn’t otherwise possess them, for lack of a standard library that general-purpose programming languages have. 

It has no built-in string primitives with accessor and mutator functions of various kinds[1], no String object with manipulation methods, no len(), no split(), etc. 

The transformations are Kamailio config script’s effort to provide a subset of this sort of capability that is most useful for processing SIP messages.

Things like {tobody.user} exist in Kamailio because there’s literally* no other way to do that. 

The whole point of doing Kamailio config scripting through KEMI in a more general language is to be able to leverage those general language capabilities, along with other libraries or modules, hot reload, etc.

— Alex

[1] Outside of the blunt instruments of textops* and friends.

-- 
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 - Users Mailing List - Non Commercial Discussions
  * sr-users at lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


More information about the sr-users mailing list