[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-users
Subject: Re: [Kamailio-Users] SUBSCRIBE message with a private header
From: Iñaki_Baz_Castillo <ibc () aliax ! net>
Date: 2008-09-26 16:10:13
Message-ID: 200809261810.13193.ibc () aliax ! net
[Download RAW message or body]
El Jueves, 25 de Septiembre de 2008, Yoo Chan Jeon escribió:
> Hi,
> Thank you for your reponse.
> By using $hdr(HEADER-NAME), it returns "Private-Header:value".
> Now I have other problems.
> I would like to check if the header exist, then I want to get the value.
> How do I get the value from $hdr(HEADER-NAME) ?
Well, let me explain:
Imagine the request contains a header like:
Private-Header-1: aaabbbccc
but not a header "Private-Header-2".
So if you do:
if $hdr(Private-Header-1) {
# block
}
it will return TRUE and the block executed.
If you want to read the header value you do it in the same way:
xlog("L_INFO","---private header 1 value = $hdr(Private-Header-1) ---\n");
If you want to check if Private-Header-2 then:
if $hdr(Private-Header-2) {
# block
}
This "if" return FALSE and the block is not runned since the header doesn't
exist.
Hope it clarifies you a bit.
--
Iñaki Baz Castillo
_______________________________________________
Users mailing list
Users@lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic