Re: [SR-Users] Diversion Header & Header management - $hdrc

2022-03-10 Thread James Browne
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  wrote:
>
> Thanks for your time in advance!
>
> When dealing with multiple headers in different formats, i.e.
>
> Diversion: , 
>
> $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: 
>
> or
>
> Diversion: , 
>
> or
>
> Diversion: 
> Diversion: , 
>
> 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


[SR-Users] Diversion Header & Header management - $hdrc

2022-03-07 Thread Brandon Armstead
Thanks for your time in advance!

When dealing with multiple headers in different formats, i.e.

Diversion: , 

$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: 

or

Diversion: , 

or

Diversion: 
Diversion: , 

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