Thanks for your time in advance!
When dealing with multiple headers in different formats, i.e.
$hdrc(Diversion) returns 1 header instead of 2. Is this expected behavior? What is the best way to manage all scenarios of possible multiple header values? It seems currently there is no easy way to iterate over ALL diversion headers, including scenarios like the following below:
Diversion: sip:abc
or
or
Diversion: sip:abc Diversion: sip:def, sip:ghi
etc.
- Brandon
What you're looking for is to manage the header field _values_ (as you mention), not the header _fields_.
Maybe try the "@hf_value" Select from the textopsx module. https://www.kamailio.org/docs/modules/5.5.x/modules/textopsx.html#textopsx.s... You might try code something like this pseudocode.
while ( ! @hf_value.diversion[$var(i)] == "" ) { ...
James
On Mon, 7 Mar 2022 at 23:42, Brandon Armstead brandon@cryy.com wrote:
Thanks for your time in advance!
When dealing with multiple headers in different formats, i.e.
$hdrc(Diversion) returns 1 header instead of 2. Is this expected behavior? What is the best way to manage all scenarios of possible multiple header values? It seems currently there is no easy way to iterate over ALL diversion headers, including scenarios like the following below:
Diversion: sip:abc
or
or
Diversion: sip:abc Diversion: sip:def, sip:ghi
etc.
- Brandon
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: