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?
Google is your friend (it has been mine since 1997)
https://telnyx.com/resources/the-beginners-guide-to-sip-headers
https://www.iana.org/assignments/sip-parameters/sip-parameters.xhtml
Cheers
*Sérgio Charrua*
*www.voip.pt http://www.voip.pt/* Tel.: +351 callto:+351+91+104+12+6621 130 71 77
Email : *sergio.charrua@voip.pt sergio.charrua@voip.pt*
This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Fri, Jun 4, 2021 at 9:25 PM Evan Verma evan.verma@avoxi.com 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@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
I interpreted the original poster to be asking if there is a way to iterate over received headers in config script.
— Sent from mobile, with due apologies for brevity and errors.
On Jun 4, 2021, at 5:58 PM, Sergio Charrua sergio.charrua@voip.pt wrote:
Google is your friend (it has been mine since 1997)
https://telnyx.com/resources/the-beginners-guide-to-sip-headers
https://www.iana.org/assignments/sip-parameters/sip-parameters.xhtml
Cheers
Sérgio Charrua
www.voip.pt Tel.: +351 21 130 71 77 Email : sergio.charrua@voip.pt This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Fri, Jun 4, 2021 at 9:25 PM Evan Verma evan.verma@avoxi.com 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@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Kamailio - Users Mailing List - Non Commercial Discussions
- sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hello,
you can access arbitrary headers from the SIP request Kamailio is processing e.g., with the pseudo-variable $hdr(My-header-name) in the cfg.
You can also dump the complete SIP message with the PV $mb.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Evan Verma Sent: Friday, June 4, 2021 10:15 PM To: sr-users@lists.kamailio.org Subject: [SR-Users] List of Header Names
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?
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@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: