[Kamailio-Users] textops: regexp-based search/remove headers

Daniel-Constantin Mierla miconda at gmail.com
Mon Jan 12 14:09:52 CET 2009


Hello,

the textops module has two new functions that help to search and remove 
headers based on regular expressions:
- is_present_hf_re(regexp)
http://kamailio.org/docs/modules/devel/textops.html#id2506553
- remove_hf_re(regexp)
http://kamailio.org/docs/modules/devel/textops.html#id2506863

Particularly the second is useful to remove a bunch of headers in one 
step. For example, if you have several proxyes in your platform and you 
exchange information between them via X-Something headers, then you can 
remove all with:

remove_hf_re("^X-");

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list