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.sel.hf_value
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 <bran...@cryy.com> wrote:
>
> Thanks for your time in advance!
>
> When dealing with multiple headers in different formats, i.e.
>
> Diversion: <sip:foo>, <sip:bar>
>
> $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
>
> Diversion: <sip:abc>, <sip:def>
>
> 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:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

__________________________________________________________
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:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to