[Kamailio-Users] i want to get user defined header value
Alex Balashov
abalashov at evaristesys.com
Tue Nov 24 09:57:09 CET 2009
Daniel-Constantin Mierla wrote:
> Hello,
>
> On 24.11.2009 9:50 Uhr, Alex Balashov wrote:
>> Daniel-Constantin Mierla wrote:
>>
>>> Hello,
>>>
>>> On 23.11.2009 11:37 Uhr, Alex Balashov wrote:
>>>> Please don't forget to copy your responses back to the list so that
>>>> others can benefit from this discussion.
>>>>
>>>> I must have misunderstood your intended meaning of "user-defined."
>>>> $hdr(...) takes only string literals as arguments, not pseudovariables.
>>> actually $hdr(...) should be able to take PV as header name:
>>>
>>> $var(n) = "From";
>>> xlog("--- $hdr($var(n))\n");
>>>
>>> If it is no longer working, that should be fixed.
>>
>> I came to the same conclusion a few hours ago after reviewing the
>> code. It is strange that it does not work.
>
> have you tested and does not work? Any error message in the logs? I can
> test later today...
>
> Thanks,
> Daniel
>
>
It does not with Kamailio 1.5.1:
Nov 24 03:45:25 diminuendo-1 /usr/local/sbin/kamailio[25362]:
ERROR:core:pv_get_spec_name: name type is PV_NAME_OTHER - cannot resolve
Nov 24 03:45:25 diminuendo-1 /usr/local/sbin/kamailio[25362]:
ERROR:pv:pv_get_hdr: invalid name
Nov 24 03:45:25 diminuendo-1 /usr/local/sbin/kamailio[25362]:
[R-2:SDl9o0101-a1aa80162d5fbfc1911a608785ad814e-omv02r3] -> From header:
This is attempting to do:
$var(n) = "From";
xlog("L_INFO", "[R-2:$ci] -> From header: $hdr($var(n))\n");
--
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
More information about the Users
mailing list