[sr-dev] Parsing list of headers
Henning Westerholt
hw at skalatan.de
Thu Jul 25 18:29:49 CEST 2019
Hello Ionut,
if you like to do it in the cfg - just some ideas:
- iterate in a loop over the number of headers $hdrc
- access with the loop variable the respective header $hdr[i]
- do your operation, save temporary results in another $avp
- finish the operation by appending your header from the $avp
These PVs are (as usual) documented in the cookbook.
Cheers,
Henning
Am 25.07.19 um 17:44 schrieb Ionut Razvan Ionita:
Hello all,
I am trying to implement RFC 7544 in kamailio.cfg, more specifically to transform Diversion header into History-Info. To do this I need to iterate over all Diversion headers and be able to get all the parameters from it. At first I discovered $di core variable, but I can access only the first header with it. I discovered kamailio selectors but I can't index them with a variable. I came to the point where I want to implement variable indexing to selectors but after I saw this API is quite complex I thought to ask here if there's any other solution to do this?!
Thanks,
Ionut
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev at lists.kamailio.org<mailto:sr-dev at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190725/4f62be5a/attachment.html>
More information about the sr-dev
mailing list