[OpenSIPS-Users] Extracting a value from a header and assigning it to an AVP

Sven Schulz svens at psu.edu
Wed Sep 28 15:49:21 CEST 2011


Ok, I fixed it. I was hitting  the condition. My problem was that the other
SIP server was adding the value as a string not an integer.

So this worked:

$avp(i:20)=$(hdr(P-Hint){s.int});


On 9/28/11 1:41 AM, "Sam Govind" <govoiper at gmail.com> wrote:

> Print an xlog there, I think it's not hitting this condition ! 
> 
> On Wed, Sep 28, 2011 at 1:26 AM, Sven Schulz <svens at psu.edu> wrote:
>> Lets say for example, another SIP server sends my opensips server a header
>> ³P-Hint: 3².
>> I would like to extract the value (3) from that header (P-Hint:) and assign
>> it to an AVP.
>> How do I do this?
>> 
>> I tried this but it doesn¹t seem to work:
>> 
>> if (is_present_hf("P-Hint")) {
>>                 $avp(i:20)=$(hdr(P-Hint));
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110928/937c7a70/attachment.htm>


More information about the Users mailing list