[SR-Users] List of Header Names
Daniel-Constantin Mierla
miconda at gmail.com
Mon Jun 7 22:52:26 CEST 2021
Hello,
probably you can use {line} transformation in a while loop:
* https://www.kamailio.org/wiki/cookbooks/devel/transformations#lineat_pos
Skip first one and go until the line is only "\r\n", which marks the end
of the headers.
For each line test if it starts with [a-zA-Z] and take the name with
{s.select,0,:}.
The alternative is to use embedded interpreters for other scripting
languages that provide more string parsing flexibility, like app_lua,
app_python, ...
Cheers,
Daniel
On 04.06.21 22:14, Evan Verma wrote:
> hello! new to working with sip/kamailio. I am currently trying to get
> a list of all of the header names on the invite the SBC receives. I am
> having trouble finding a way to do this. Does anyone know of a good
> solution?
>
> __________________________________________________________
> 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
--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online - June 7-10, 2021 (America Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210607/e03711ed/attachment.htm>
More information about the sr-users
mailing list