[Kamailio-Users] Search for text with a space in it

Alexandr Dubovikov voip at start4.info
Fri Oct 23 00:13:06 CEST 2009


CSB пишет:
> OpenSER 1.3
> When I try to match a phrase with a space in it I don't get a match. I'm
> looking for "User-Agent: My UA"
>
> None of the following seem to work:
> if (search("User-Agent:\sMy\sUA")) {
> if (search("User-Agent:[ ]My[ ]UA")) {
> if (search("User-Agent: My UA")) {
>
> Could anyone point out my obvious mistake?
>   
if(is_present_hf("User-Agent") && *$ua == "My UA")) {*
xlog("L_INFO", "Our header is [$ua]\n");
}

> Thanks
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>   
Wbr,
Alexandr

-- 
Alexandr Dubovikov * baron at iRC RusNet * mailto:shurik at start4.info
    AD1-UANIC      *  ICQ: 122351182  *  http://www.start4.info





More information about the Users mailing list