[SR-Users] testing Supported and Require keywords

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 14 17:53:52 CET 2013


I am not sure if Supported can appear many times in a message, that 
might require using the [*] index as Juha pointed.

For sake of completion, the search_hf() could be an alternative for now, 
getting a flag to walk through all headers matching the name:

- http://kamailio.org/docs/modules/stable/modules/textops.html#id2535899

Cheers,
Daniel

On 3/14/13 11:05 AM, Hugh Waite wrote:
> We've used this to detect a Supported keyword:
>
> if ((is_present_hf("Supported")) && in_list("timer", 
> "$hdr(Supported)", "," )) {
> ...
> }
>
> Hugh
>
> On 14/03/2013 03:27, Juha Heinanen wrote:
>> is there currently a proper way to test if a particular keyword appears
>> in Supported or Require header or is a regex test on $hdr(X)[*] the
>> only possibility?
>>
>> -- juha
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -




More information about the sr-users mailing list