Hi all!

doing some integrations with RTJson module for Kamailio 5.8.4, calling a REST API to return the RTJson's JSON object with 1 or multiple route elements. 
Kamailio converts the whole SIP headers to JSON using a Javascript function, executed by APP_JDST module, and POSTing the resulting object to the REST API via http_async module.

I couldn't find a way to get the current selected route, from the RTJson object, once Kamailio iterates through the JSON object (i.e: using rtjson_push_routes or  rtjson_next_route).

When the RTJson module iterates through the different routes of the JSON object, is there a way to get the JSON part that defines the route currently being used by RTJson?

The goal is to return some custom properties set in each route element of the route array. 
Once those properties are returned, Kamailio should process them. 
For example, RTJson supports From and To headers modification and appending new headers with the "extras" element, but there is no way that I know of to modify other headers or remove headers depending on the route.

Does anyone know how:
1 - to return current route element from the routes array of the RTJson object ?
2 - to modify / remove headers other than the From and To headers, according to the custom values set in the RTJson returned from a REST API ?

Thanks in advance!

Atenciosamente / Kind Regards / Cordialement / Un saludo,


Sérgio Charrua