[SR-Users] Search Un-Register Expires header

Olle E. Johansson oej at edvina.net
Mon Jan 19 15:01:46 CET 2015


On 19 Jan 2015, at 14:01, Julia Boudniatsky <juliabo at gmail.com> wrote:

> For header Contact  :
> 
> if($sel(contact.expires) == "0") {
+1 for using selects. I missed that. Cool!

Thank you Julia.
/O
> 
> also may be used.
> 
> BR,
> 
> Julia
> 
> On Mon, Jan 19, 2015 at 2:56 PM, Emilio Soler Muñoz <emiliosoler at gmail.com> wrote:
> Thank you all for the help.
> Finally, considering that according to the RFC in Contact header can only come expires = 0 
> I set this in my config file:
> .......
> if (($ hdr (Expires) == "0") || ($ hdr (Contact) = ~ "expires = 0")
> .......
> 
> 2015-01-19 13:16 GMT+01:00 Olle E. Johansson <oej at edvina.net>:
> Try
> 
> if ($hdr(Expires) == "0")
> 
> 
> Note that expires can also be a contact parameter.
> 
> /O
> On 19 Jan 2015, at 12:44, Emilio Soler Muñoz <emiliosoler at gmail.com> wrote:
> 
>> Hi,
>> I find a problem when I try to search the header "Expires" with value 0.
>> 
>> At my kamailio.cfg the configuration is:
>> if ( search_hf("Expires", ":0@", "a") )
>> {                           
>>  xlog("L_INFO", "Encontrado expires 0 ($rm)");
>> }
>> 
>> This way find nothing.
>> 
>> I test with 0 (no wildcards regular expression), but this make matches in any Register with header Expires content 0. Example:
>> ...
>> if ( search_hf("Expires", "0", "a") )
>> ....
>> 
>> I saw some people control  expires=0 at contact header, but not my case. Example: 
>> if (search("expires=0"))
>> {
>>    xlog("L_INFO", "Encontrado expires 0 ($rm)");
>> }
>> 
>> Regards,
>> 
>> -- 
>> Emilio Soler
>> emiliosoler at gmail.com
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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
> 
> 
> 
> 
> -- 
> Emilio Soler Muñoz
> 665801225
> emiliosoler at gmail.com
> 
> _______________________________________________
> 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
> 
> 
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150119/c72d5119/attachment.html>


More information about the sr-users mailing list